ICustomAttributeProvider.GetCustomAttributes 메서드

정의

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

오버로드

Name Description
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[]

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

예외

사용자 지정 특성 유형을 로드할 수 없습니다.

설명

ICustomAttributeProvider.GetCustomAttributes PropertyInfo 매개 변수가 inherit 호출되거나 EventInfo 이 매개 변수 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[]

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

예외

사용자 지정 특성 유형을 로드할 수 없습니다.

attributeTypenull입니다.

설명

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

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

ICustomAttributeProvider.GetCustomAttributes PropertyInfo 매개 변수가 inherit 호출되거나 EventInfo 이 매개 변수 GetCustomAttributestrue 형식 계층 구조를 걷지 않는 경우 사용자 지정 특성을 상속하는 데 사용합니다 System.Attribute .

적용 대상