IExtenderProvider.GetExtender Method
Gets an extender for the given object in the specified category.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Function GetExtender ( _
ExtenderCATID As String, _
ExtenderName As String, _
ExtendeeObject As Object, _
ExtenderSite As IExtenderSite, _
Cookie As Integer _
) As Object
Object GetExtender(
string ExtenderCATID,
string ExtenderName,
Object ExtendeeObject,
IExtenderSite ExtenderSite,
int Cookie
)
Object^ GetExtender(
[InAttribute] String^ ExtenderCATID,
[InAttribute] String^ ExtenderName,
[InAttribute] Object^ ExtendeeObject,
[InAttribute] IExtenderSite^ ExtenderSite,
[InAttribute] int Cookie
)
abstract GetExtender :
ExtenderCATID:string *
ExtenderName:string *
ExtendeeObject:Object *
ExtenderSite:IExtenderSite *
Cookie:int -> Object
function GetExtender(
ExtenderCATID : String,
ExtenderName : String,
ExtendeeObject : Object,
ExtenderSite : IExtenderSite,
Cookie : int
) : Object
Parameters
ExtenderCATID
Type: System.StringThe CATID for the extender being requested.
ExtenderName
Type: System.StringThe name for the extender being requested.
ExtendeeObject
Type: System.ObjectThe extendee object.
ExtenderSite
Type: EnvDTE.IExtenderSiteThe extender site, represented by an IExtenderSite interface.
Cookie
Type: System.Int32The cookie identifying the extender.
Return Value
Type: System.Object
An extender.
Remarks
GetExtender returns the extender for the given CATID and name for the specified extendee instance. This method is called only if CanExtend returns true.
The extender provider must keep the ExtenderSite object and Cookie.
Warning
The extender manager maintains an internal cache of extender objects, and must be notified when they are being destroyed. You must call NotifyDelete immediately upon destroying extender objects. You must not wait for the application to become idle, because other Visual Studio components may try to access the destroyed extender object before you call the method. If this happens, Visual Studio may crash.
.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.