Compartir a través de


ExtensionPointPackage.CreateDiagnosticsProvider Method

Creates the diagnostics provider for the given registered provider GUID.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Protected Overridable Function CreateDiagnosticsProvider ( _
    provider As Guid _
) As IVsDiagnosticsProvider
protected virtual IVsDiagnosticsProvider CreateDiagnosticsProvider(
    Guid provider
)
protected:
virtual IVsDiagnosticsProvider^ CreateDiagnosticsProvider(
    Guid provider
)
abstract CreateDiagnosticsProvider : 
        provider:Guid -> IVsDiagnosticsProvider  
override CreateDiagnosticsProvider : 
        provider:Guid -> IVsDiagnosticsProvider
protected function CreateDiagnosticsProvider(
    provider : Guid
) : IVsDiagnosticsProvider

Parameters

  • provider
    Type: Guid

    GUID of the requested diagnostics provider.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsDiagnosticsProvider
The requested diagnostics provider.

Exceptions

Exception Condition
ArgumentException

The requested provider was not found.

InvalidCastException

The requested provider does not implement the IVsDiagnosticsProvider interface.

Remarks

This method is called by the base class in response to a request for the ExtId_VsComponentDiagnostics extension point. The base implementation searches for the ProvideComponentDiagnosticsAttribute attributes on the package class and instantiates the appropriate provider. This method may be overridden.

.NET Framework Security

See Also

Reference

ExtensionPointPackage Class

Microsoft.VisualStudio.Shell Namespace