ICustomAttributeProviderContract.IsDefined Method

This API supports the Visual Studio Tools for Applications infrastructure and is not intended to be used directly from your code.

Indicates whether one or more instances of attributes that correspond to the type that is specified by the canonical name are defined on the current object.

Namespace:  Microsoft.VisualStudio.Tools.Applications.Contract
Assembly:  Microsoft.VisualStudio.Tools.Applications.Contract.v9.0 (in Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll)

Syntax

'Declaration
Function IsDefined ( _
    canonicalName As String, _
    inherit As Boolean _
) As Boolean
'Usage
Dim instance As ICustomAttributeProviderContract 
Dim canonicalName As String 
Dim inherit As Boolean 
Dim returnValue As Boolean 

returnValue = instance.IsDefined(canonicalName, _
    inherit)
bool IsDefined(
    string canonicalName,
    bool inherit
)
bool IsDefined(
    String^ canonicalName, 
    bool inherit
)
function IsDefined(
    canonicalName : String, 
    inherit : boolean
) : boolean

Parameters

  • canonicalName
    Type: System.String

    A string value that uniquely identifies the custom attribute type.

  • inherit
    Type: System.Boolean

    true to look up the hierarchy chain for the inherited custom attribute.

Return Value

Type: System.Boolean
true if the attribute type specified by the canonical name is defined on the current object; otherwise, false.

See Also

Reference

ICustomAttributeProviderContract Interface

ICustomAttributeProviderContract Members

Microsoft.VisualStudio.Tools.Applications.Contract Namespace