Compartilhar via


ExtensionPointPackage.CreateSearchProvider Method

Creates the global search 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

'Declaração
Protected Overridable Function CreateSearchProvider ( _
    provider As Guid _
) As IVsSearchProvider
protected virtual IVsSearchProvider CreateSearchProvider(
    Guid provider
)

Parameters

  • provider
    Type: System.Guid
    GUID of the requested search provider.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsSearchProvider
The requested search provider.

Exceptions

Exception Condition
ArgumentException

The requested provider was not found.

InvalidCastException

The requested provider does not implement the IVsSearchProvider interface.

Remarks

This method is called in response to a request for the IVsSearchProvider extension point. The implementation searches for ProvideSearchProvider attributes on the package class and instantiates the appropriate provider. This method can be overridden.

.NET Framework Security

See Also

Reference

ExtensionPointPackage Class

Microsoft.VisualStudio.Shell Namespace