Type.GetPropertyImpl 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
파생 클래스에서 재정의되는 경우 지정된 바인딩 제약 조건을 사용하여 매개 변수가 지정된 인수 형식 및 한정자와 일치하는 지정된 속성을 검색합니다.
protected:
abstract System::Reflection::PropertyInfo ^ GetPropertyImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, Type ^ returnType, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)]
protected abstract System.Reflection.PropertyInfo? GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected abstract System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, Type returnType, Type[] types, System.Reflection.ParameterModifier[] modifiers);
protected abstract System.Reflection.PropertyInfo? GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, Type? returnType, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>]
abstract member GetPropertyImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
abstract member GetPropertyImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Protected MustOverride Function GetPropertyImpl (name As String, bindingAttr As BindingFlags, binder As Binder, returnType As Type, types As Type(), modifiers As ParameterModifier()) As PropertyInfo
매개 변수
- name
- String
가져올 속성의 이름을 포함하는 문자열입니다.
- binder
- Binder
속성 집합을 정의하고 바인딩을 사용하도록 설정하는 개체로, 오버로드된 멤버 선택, 인수 형식 강제 변환 및 리플렉션을 통해 멤버 호출을 포함할 수 있습니다.
-또는-
Nothing 사용하는 null 참조(Visual Basic DefaultBinder)입니다.
- returnType
- Type
속성의 반환 형식입니다.
- types
- Type[]
가져올 인덱싱된 속성에 Type 대한 매개 변수의 수, 순서 및 형식을 나타내는 개체의 배열입니다.
-또는-
인덱싱되지 않은 속성을 가져오는 형식 Type 의 빈 배열(즉, Type[] types = new Type[0])입니다.
- modifiers
- ParameterModifier[]
배열의 ParameterModifier 해당 요소와 연결된 특성을 나타내는 개체의 types 배열입니다. 기본 바인더는 이 매개 변수를 처리하지 않습니다.
반품
지정된 요구 사항과 일치하는 속성을 나타내는 개체입니다(있는 경우). 그렇지 않으면 . null
- 특성
예외
지정된 이름과 지정된 바인딩 제약 조건과 일치하는 두 개 이상의 속성이 있습니다.
설명
기본 바인더는 ParameterModifier를 처리하지 않지만 (modifiers 매개 변수) 추상 System.Reflection.Binder 클래스를 사용하여 modifiers를 처리하는 사용자 지정 바인더를 작성할 수 있습니다.
ParameterModifier 는 COM interop을 통해 호출할 때만 사용되며 참조로 전달되는 매개 변수만 처리됩니다.
다음 BindingFlags 필터 플래그를 사용하여 검색에 포함할 속성을 정의할 수 있습니다.
반환을 얻으려면
BindingFlags.Instance또는BindingFlags.Static중 하나를 지정해야 합니다.검색에 공용 속성을 포함하도록 지정
BindingFlags.Public합니다.검색에 public이 아닌 속성(즉, 프라이빗, 내부 및 보호된 속성)을 포함하도록 지정
BindingFlags.NonPublic합니다.위계에서
BindingFlags.FlattenHierarchy및public정적 멤버를 포함하도록protected을(를) 지정하세요. 상속된 클래스에서는private정적 멤버가 포함되지 않습니다.
다음 BindingFlags 한정자 플래그를 사용하여 검색 작동 방식을 변경할 수 있습니다.
BindingFlags.IgnoreCase의 대소문자를 무시합니다.BindingFlags.DeclaredOnly단순히 상속된 속성을 검색하지 않고 Type에 선언된 속성만 검색합니다.
자세한 내용은 System.Reflection.BindingFlags을 참조하세요.