Share via


ExtensionPointPackage.CreateSearchProvider Method

Creates the global search 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 CreateSearchProvider ( _
    provider As Guid _
) As IVsSearchProvider
protected virtual IVsSearchProvider CreateSearchProvider(
    Guid provider
)
protected:
virtual IVsSearchProvider^ CreateSearchProvider(
    Guid provider
)
abstract CreateSearchProvider : 
        provider:Guid -> IVsSearchProvider  
override CreateSearchProvider : 
        provider:Guid -> IVsSearchProvider
protected function CreateSearchProvider(
    provider : Guid
) : IVsSearchProvider

Parameters

  • provider
    Type: 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