DynamicMethod.GetCustomAttributes 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
메서드에 적용된 사용자 지정 특성을 반환합니다.
오버로드
GetCustomAttributes(Boolean) |
이 메서드에 대해 정의된 모든 사용자 지정 특성을 반환합니다. |
GetCustomAttributes(Type, Boolean) |
메서드에 적용된 지정된 형식의 사용자 지정 특성을 반환합니다. |
GetCustomAttributes(Boolean)
이 메서드에 대해 정의된 모든 사용자 지정 특성을 반환합니다.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
매개 변수
- inherit
- Boolean
상속 체인을 검색하여 사용자 지정 특성을 찾으려면true
이고, 현재 메서드만 확인하려면 false
입니다.
반환
- Object[]
이 메서드의 모든 사용자 지정 특성을 나타내는 개체 배열입니다.
설명
동적 메서드의 경우 메서드가 true
형식에 inherit
선언되지 않으므로 지정해도 아무 효과가 없습니다.
참고
사용자 지정 특성은 현재 동적 메서드에서 지원되지 않습니다. 반환되는 유일한 특성은 MethodImplAttribute메서드를 사용하여 GetMethodImplementationFlags 메서드 구현 플래그를 더 쉽게 가져올 수 있다는 것입니다.
추가 정보
적용 대상
GetCustomAttributes(Type, Boolean)
메서드에 적용된 지정된 형식의 사용자 지정 특성을 반환합니다.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
매개 변수
- inherit
- Boolean
상속 체인을 검색하여 사용자 지정 특성을 찾으려면true
이고, 현재 메서드만 확인하려면 false
입니다.
반환
- Object[]
attributeType
형식의 메서드 또는 attributeType
형식에서 파생된 메서드의 특성을 나타내는 개체의 배열입니다.
예외
attributeType
이(가) null
인 경우
설명
동적 메서드의 경우 메서드가 true
형식에 inherit
선언되지 않으므로 지정해도 아무 효과가 없습니다.
참고
사용자 지정 특성은 현재 동적 메서드에서 지원되지 않습니다. 반환되는 유일한 특성은 MethodImplAttribute메서드를 사용하여 GetMethodImplementationFlags 메서드 구현 플래그를 더 쉽게 가져올 수 있다는 것입니다.