Compartilhar via


IExtenderProvider.CanExtend Method

Returns whether or not the provider can provide an extender for the given object in the specified category.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Function CanExtend ( _
    ExtenderCATID As String, _
    ExtenderName As String, _
    ExtendeeObject As Object _
) As Boolean
bool CanExtend(
    string ExtenderCATID,
    string ExtenderName,
    Object ExtendeeObject
)
bool CanExtend(
    [InAttribute] String^ ExtenderCATID, 
    [InAttribute] String^ ExtenderName, 
    [InAttribute] Object^ ExtendeeObject
)
abstract CanExtend : 
        ExtenderCATID:string * 
        ExtenderName:string * 
        ExtendeeObject:Object -> bool
function CanExtend(
    ExtenderCATID : String, 
    ExtenderName : String, 
    ExtendeeObject : Object
) : boolean

Parameters

  • ExtenderCATID
    Type: System.String

    The CATID for the extender being requested.

  • ExtenderName
    Type: System.String

    The name for the extender being requested.

Return Value

Type: System.Boolean
true if the provider can provide an extender for the given object with the specified category and name.

Remarks

CanExtend returns whether an extender is available for the given CATID and name for the specified extendee instance. The extender provider may need to inspect the extendee instance to determine whether or not it should provide an extender for it. For example, an extender provider may be chartered to create an "ATLClass" extender to a class object, but only if Class.Language has a value of "C++." The extender provider is expected to do this kind of check in this CanExtend method.

.NET Framework Security

See Also

Reference

IExtenderProvider Interface

EnvDTE Namespace

Other Resources

Implementing and Using Automation Extenders