CodeAttributeArgument Interface

 

Represents a single argument (name/value pair) in a code attribute.

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

[GuidAttribute("80F4779B-835D-4873-8356-2F34A759A514")]
public interface CodeAttributeArgument

NameDescription
System_CAPS_pubpropertyChildren

Gets the collection of child attributes for the specified code attribute argument.

System_CAPS_pubpropertyCollection

Gets the collection containing the object that supports this property.

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object, in this case the DTE2 object.

System_CAPS_pubpropertyEndPoint

Gets a TextPoint object defining the end of the code attribute argument.

System_CAPS_pubpropertyExtender[String]

Returns the Extender for the code attribute argument.

System_CAPS_pubpropertyExtenderCATID

Gets the category ID (CATID) for the Extender of the code attribute argument.

System_CAPS_pubpropertyExtenderNames

Gets the names of the Extenders for the code attribute arguments.

System_CAPS_pubpropertyFullName

Gets the fully qualified name of the code attribute argument's definition.

System_CAPS_pubpropertyInfoLocation

Gets a constant indicating the location of the code attribute argument.

System_CAPS_pubpropertyIsCodeType

Gets a value indicating whether a CodeType object can be obtained from this code attribute argument.

System_CAPS_pubpropertyKind

Gets an enumeration value that defines the type of code element.

System_CAPS_pubpropertyLanguage

Gets the programming language that is used to author the code.

System_CAPS_pubpropertyName

Gets or sets a string representing the name of the object.

System_CAPS_pubpropertyProjectItem

Gets the associated ProjectItem object.

System_CAPS_pubpropertyStartPoint

Gets a TextPoint object defining the start of the code attribute argument.

System_CAPS_pubpropertyValue

Sets or gets the value of an attribute argument.

NameDescription
System_CAPS_pubmethodDelete()

Removes a single argument from a code attribute.

System_CAPS_pubmethodGetEndPoint(vsCMPart)

Returns a TextPoint object that marks the end of the attribute argument.

System_CAPS_pubmethodGetStartPoint(vsCMPart)

Gets a TextPoint object that marks the start of the attribute argument.

All arguments for a code attribute are contained in the Collection property.

System_CAPS_noteNote

The values of code model elements such as classes, structs, functions, attributes, delegates, and so forth can be non-deterministic after making certain kinds of edits, meaning that their values cannot be relied upon to always remain the same. For more information, see the section Code Model Element Values Can Change in Discovering Code by Using the Code Model (Visual Basic).

' Macro code.
Sub codeArgExample()
    Dim sel As TextSelection = _
    CType(DTE.ActiveDocument.Selection, TextSelection)
    Dim cls As CodeClass2 = CType(sel.ActivePoint. _
    CodeElement(vsCMElement.vsCMElementClass), CodeClass2)
    Dim attr As CodeAttribute2
    Dim attrArg As CodeAttributeArgument
    Dim msg As String

    ' Loop through all of the attributes in the class.
    For Each attr In cls.Attributes
        ' Loop through all of the arguments for the attribute.
        For Each attrArg In attr.Arguments
            msg += attrArg.Value & " "
        Next
    Next
    ' List the arguments for the attribute.
    MsgBox("Attribute parameters for " & attr.Name _
    & ": " & msg)
End Sub
Return to top
Show: