ExtensionPointPackage.CreateDiagnosticsProvider Method
Creates the diagnostics provider for the given registered provider GUID.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣告
Protected Overridable Function CreateDiagnosticsProvider ( _
provider As Guid _
) As IVsDiagnosticsProvider
protected virtual IVsDiagnosticsProvider CreateDiagnosticsProvider(
Guid provider
)
Parameters
- provider
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.