ICustomAttributeProvider.GetCustomAttributes 메서드

정의

이 멤버에 정의된 사용자 지정 특성을 반환합니다.

오버로드

GetCustomAttributes(Boolean)

명명된 특성을 제외하고 이 멤버에 정의된 모든 사용자 지정 특성의 배열을 반환하거나 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

GetCustomAttributes(Type, Boolean)

형식으로 식별되는 이 멤버에 정의된 사용자 지정 특성의 배열을 반환하거나 해당 형식의 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

GetCustomAttributes(Boolean)

명명된 특성을 제외하고 이 멤버에 정의된 모든 사용자 지정 특성의 배열을 반환하거나 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

public:
 cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public object[] GetCustomAttributes (bool inherit);
abstract member GetCustomAttributes : bool -> obj[]
Public Function GetCustomAttributes (inherit As Boolean) As Object()

매개 변수

inherit
Boolean

true이면 상속된 사용자 지정 특성에 대한 계층 구조 체인을 조회합니다.

반환

Object[]

사용자 지정 특성을 나타내는 개체 배열이거나 빈 배열입니다.

예외

사용자 지정 특성 형식을 로드할 수 없는 경우

이 멤버에 대해 attributeType 형식의 특성이 2개 이상 정의되어 있습니다.

설명

호출 ICustomAttributeProvider.GetCustomAttributesPropertyInfo 또는 EventInfo 때의 inherit 의 매개 변수 GetCustomAttributestrue 형식 계층 구조를 검색 하지 않습니다. 사용 하 여 System.Attribute 사용자 지정 특성을 상속 합니다.

이 메서드는 상속 되지 않은 구성원만에 직접 정의 된 사용자 지정 특성을 반환 합니다.

적용 대상

GetCustomAttributes(Type, Boolean)

형식으로 식별되는 이 멤버에 정의된 사용자 지정 특성의 배열을 반환하거나 해당 형식의 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

public:
 cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public object[] GetCustomAttributes (Type attributeType, bool inherit);
abstract member GetCustomAttributes : Type * bool -> obj[]
Public Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()

매개 변수

attributeType
Type

사용자 지정 특성의 형식입니다.

inherit
Boolean

true이면 상속된 사용자 지정 특성에 대한 계층 구조 체인을 조회합니다.

반환

Object[]

사용자 지정 특성을 나타내는 개체 배열이거나 빈 배열입니다.

예외

사용자 지정 특성 형식을 로드할 수 없는 경우

attributeType이(가) null인 경우

설명

경우 attributeType 는 기본 클래스 또는 인터페이스에서이 메서드 해당 형식의 구현을 반환 합니다.

이 메서드는 상속 되지 않은 구성원만에 직접 정의 된 사용자 지정 특성을 반환 합니다.

호출 ICustomAttributeProvider.GetCustomAttributesPropertyInfo 또는 EventInfo 때의 inherit 의 매개 변수 GetCustomAttributestrue 형식 계층 구조를 검색 하지 않습니다. 사용 하 여 System.Attribute 사용자 지정 특성을 상속 합니다.

적용 대상