Compartilhar via


IVsPackageExtensionProvider Interface

Provides "pull"-style extension points for packages.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<GuidAttribute("1FC6AF83-7F43-467E-B2C4-28E2B1B376AB")> _
Public Interface IVsPackageExtensionProvider
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("1FC6AF83-7F43-467E-B2C4-28E2B1B376AB")]
public interface IVsPackageExtensionProvider
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
[GuidAttribute(L"1FC6AF83-7F43-467E-B2C4-28E2B1B376AB")]
public interface class IVsPackageExtensionProvider
[<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>]
[<GuidAttribute("1FC6AF83-7F43-467E-B2C4-28E2B1B376AB")>]
type IVsPackageExtensionProvider =  interface end
public interface IVsPackageExtensionProvider

The IVsPackageExtensionProvider type exposes the following members.

Methods

  Name Description
Public method CreateExtensionInstance Creates an instance of the requested extension.

Top

Remarks

This interface is an alternative to the more usual “factory” model where a package, in its SetSite method, registers instances of factories with a central registrar. That model requires that the central registrar be created even if that feature is not yet desired. That is a "push"-style, where the package pushes its factory implementation to the environment.

With IVsPackageExtensionProvider, instances of the extension point are "pulled" on demand from packages as needed. This allows the package to delay creation of extension point instances until they are actually needed.

It is possible to re-implement traditional project, editor, and UI factories in terms of IVsPackageExtensionProvider.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace