Partager via


ExtensionPointPackage.CreateExtensionPoint(Guid, Guid) Method

Definition

Called by the base class in order to satisfy a request for an extension point. Extension points are implemented by packages and requested on demand by shared components. This is the reverse of the 'factory' pattern where packages register factories with a central service. The base class implements discovery mechanisms for well-known extension points. Derived classes may override this and optionally call the base class.

protected:
 virtual System::Object ^ CreateExtensionPoint(Guid extensionPoint, Guid instance);
protected virtual object CreateExtensionPoint (Guid extensionPoint, Guid instance);
abstract member CreateExtensionPoint : Guid * Guid -> obj
override this.CreateExtensionPoint : Guid * Guid -> obj
Protected Overridable Function CreateExtensionPoint (extensionPoint As Guid, instance As Guid) As Object

Parameters

extensionPoint
Guid

The requested extension point type

instance
Guid

Instance identifier of the requested extension point

Returns

The requested extension point or null on failure. If null is returned the package will throw an ArgumentException to its caller.

Remarks

This method is called by the base class in order to satisfy a request for an extension point. Extension points are implemented by packages and requested on demand by shared components. This is the reverse of the “factory” pattern, where packages register factories with a central service.

The base class implements discovery mechanisms for well-known extension points. Derived classes may override this and optionally call the base class.

Applies to