다음을 통해 공유


CodeAttributeArgument 인터페이스

코드 특성에서 단일 인수(이름/값 쌍)를 나타냅니다.

네임스페이스:  EnvDTE80
어셈블리:  EnvDTE80(EnvDTE80.dll)

구문

‘선언
<GuidAttribute("80F4779B-835D-4873-8356-2F34A759A514")> _
Public Interface CodeAttributeArgument
[GuidAttribute("80F4779B-835D-4873-8356-2F34A759A514")]
public interface CodeAttributeArgument
[GuidAttribute(L"80F4779B-835D-4873-8356-2F34A759A514")]
public interface class CodeAttributeArgument
[<GuidAttribute("80F4779B-835D-4873-8356-2F34A759A514")>]
type CodeAttributeArgument =  interface end
public interface CodeAttributeArgument

CodeAttributeArgument 형식에서는 다음과 같은 멤버를 노출합니다.

속성

  이름 설명
Public 속성 Children 지정된 코드 특성 인수에 대한 자식 특성의 컬렉션을 가져옵니다.
Public 속성 Collection 이 속성을 지원하는 개체가 포함된 컬렉션을 가져옵니다.
Public 속성 DTE 최상위 확장성 개체를 가져옵니다. 이 경우에는 DTE2 개체를 가져옵니다.
Public 속성 EndPoint 코드 특성 인수의 끝을 정의하는 TextPoint 개체를 가져옵니다.
Public 속성 Extender 코드 특성 인수에 대한 Extender를 반환합니다.
Public 속성 ExtenderCATID 코드 특성 인수의 Extender에 대한 CATID(범주 ID)를 가져옵니다.
Public 속성 ExtenderNames 코드 특성 인수에 대한 Extender의 이름을 가져옵니다.
Public 속성 FullName 코드 특성 인수의 정의에 대한 정규화된 이름을 가져옵니다.
Public 속성 InfoLocation 코드 특성 인수의 위치를 나타내는 상수를 가져옵니다.
Public 속성 IsCodeType 이 코드 특성 인수에서 CodeType 개체를 얻을 수 있는지 여부를 나타내는 값을 가져옵니다.
Public 속성 Kind 코드 요소의 형식을 정의하는 열거형 값을 가져옵니다.
Public 속성 Language 코드를 작성하는 데 사용되는 프로그래밍 언어를 가져옵니다.
Public 속성 Name 개체의 이름을 나타내는 문자열을 가져오거나 설정합니다.
Public 속성 ProjectItem 관련된 ProjectItem 개체를 가져옵니다.
Public 속성 StartPoint 코드 특성 인수의 시작을 정의하는 TextPoint 개체를 가져옵니다.
Public 속성 Value 특성 인수의 값을 설정하거나 가져옵니다.

위쪽

메서드

  이름 설명
Public 메서드 Delete 코드 특성에서 단일 인수를 제거합니다.
Public 메서드 GetEndPoint 특성 인수의 끝을 표시하는 TextPoint 개체를 반환합니다.
Public 메서드 GetStartPoint 특성 인수의 시작을 표시하는 TextPoint 개체를 가져옵니다.

위쪽

설명

코드 특성의 모든 인수는 Collection 속성에 포함되어 있습니다.

참고

클래스, 구조체, 함수, 특성, 대리자 등의 코드 모델 요소를 특정한 방식으로 편집한 후에는 요소의 값이 명확하지 않을 수 있습니다. 즉, 요소의 값이 항상 같다고 할 수 없습니다. 자세한 내용은 코드 모델을 사용하여 코드 검색(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

참고 항목

참조

EnvDTE80 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행

코드 모델을 사용하여 코드 검색(Visual Basic)

코드 모델을 사용하여 코드 검색(Visual C#)