PropertyBuilder 클래스

정의

형식에 대한 속성을 정의합니다.

public ref class PropertyBuilder sealed : System::Reflection::PropertyInfo
public ref class PropertyBuilder abstract : System::Reflection::PropertyInfo
public ref class PropertyBuilder sealed : System::Reflection::PropertyInfo, System::Runtime::InteropServices::_PropertyBuilder
public sealed class PropertyBuilder : System.Reflection.PropertyInfo
public abstract class PropertyBuilder : System.Reflection.PropertyInfo
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
public sealed class PropertyBuilder : System.Reflection.PropertyInfo, System.Runtime.InteropServices._PropertyBuilder
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class PropertyBuilder : System.Reflection.PropertyInfo, System.Runtime.InteropServices._PropertyBuilder
type PropertyBuilder = class
    inherit PropertyInfo
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
type PropertyBuilder = class
    inherit PropertyInfo
    interface _PropertyBuilder
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type PropertyBuilder = class
    inherit PropertyInfo
    interface _PropertyBuilder
Public NotInheritable Class PropertyBuilder
Inherits PropertyInfo
Public MustInherit Class PropertyBuilder
Inherits PropertyInfo
Public NotInheritable Class PropertyBuilder
Inherits PropertyInfo
Implements _PropertyBuilder
상속
PropertyBuilder
특성
구현

예제

다음 코드 샘플에서는 를 통해 TypeBuilder.DefineProperty 얻은 를 사용하여 속성 프레임워크를 만들고 속성 내에서 IL 논리를 구현하기 위해 연결된 MethodBuilder 을 사용하여 PropertyBuilder 동적 형식의 속성을 구현하는 방법을 보여 줍니다.

using namespace System;
using namespace System::Threading;
using namespace System::Reflection;
using namespace System::Reflection::Emit;
Type^ BuildDynamicTypeWithProperties()
{
   AppDomain^ myDomain = Thread::GetDomain();
   AssemblyName^ myAsmName = gcnew AssemblyName;
   myAsmName->Name = "MyDynamicAssembly";
   
   // To generate a persistable assembly, specify AssemblyBuilderAccess::RunAndSave.
   AssemblyBuilder^ myAsmBuilder = 
       myDomain->DefineDynamicAssembly( myAsmName, AssemblyBuilderAccess::RunAndSave );
   
   // Generate a persistable single-module assembly.
   ModuleBuilder^ myModBuilder = 
       myAsmBuilder->DefineDynamicModule( myAsmName->Name, myAsmName->Name + ".dll" );
   TypeBuilder^ myTypeBuilder = myModBuilder->DefineType( "CustomerData", TypeAttributes::Public );

   // Define a private field to hold the property value.
   FieldBuilder^ customerNameBldr = myTypeBuilder->DefineField( "customerName", String::typeid, FieldAttributes::Private );
   
   // The last argument of DefineProperty is an empty array of Type
   // objects, because the property has no parameters. (Alternatively,
   // you can specify a null value.)
   PropertyBuilder^ custNamePropBldr = 
       myTypeBuilder->DefineProperty( "CustomerName", PropertyAttributes::HasDefault, String::typeid, gcnew array<Type^>(0) );
   
   // The property set and property get methods require a special
   // set of attributes.
   MethodAttributes getSetAttr = 
       MethodAttributes::Public | MethodAttributes::SpecialName |
           MethodAttributes::HideBySig;

   // Define the "get" accessor method for CustomerName.
   MethodBuilder^ custNameGetPropMthdBldr = 
       myTypeBuilder->DefineMethod( "get_CustomerName", 
                                    getSetAttr,
                                    String::typeid, 
                                    Type::EmptyTypes );

   ILGenerator^ custNameGetIL = custNameGetPropMthdBldr->GetILGenerator();
   custNameGetIL->Emit( OpCodes::Ldarg_0 );
   custNameGetIL->Emit( OpCodes::Ldfld, customerNameBldr );
   custNameGetIL->Emit( OpCodes::Ret );
   
   // Define the "set" accessor method for CustomerName.
   array<Type^>^temp2 = {String::typeid};
   MethodBuilder^ custNameSetPropMthdBldr = 
       myTypeBuilder->DefineMethod( "set_CustomerName", 
                                    getSetAttr,
                                    nullptr, 
                                    temp2 );

   ILGenerator^ custNameSetIL = custNameSetPropMthdBldr->GetILGenerator();
   custNameSetIL->Emit( OpCodes::Ldarg_0 );
   custNameSetIL->Emit( OpCodes::Ldarg_1 );
   custNameSetIL->Emit( OpCodes::Stfld, customerNameBldr );
   custNameSetIL->Emit( OpCodes::Ret );
   
   // Last, we must map the two methods created above to our PropertyBuilder to
   // their corresponding behaviors, "get" and "set" respectively.
   custNamePropBldr->SetGetMethod( custNameGetPropMthdBldr );
   custNamePropBldr->SetSetMethod( custNameSetPropMthdBldr );

   Type^ retval = myTypeBuilder->CreateType();

   // Save the assembly so it can be examined with Ildasm.exe,
   // or referenced by a test program.
   myAsmBuilder->Save(myAsmName->Name + ".dll");
   return retval;
}

int main()
{
   Type^ custDataType = BuildDynamicTypeWithProperties();
   array<PropertyInfo^>^custDataPropInfo = custDataType->GetProperties();
   System::Collections::IEnumerator^ myEnum = custDataPropInfo->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      PropertyInfo^ pInfo = safe_cast<PropertyInfo^>(myEnum->Current);
      Console::WriteLine( "Property '{0}' created!", pInfo );
   }

   Console::WriteLine( "---" );
   
   // Note that when invoking a property, you need to use the proper BindingFlags -
   // BindingFlags::SetProperty when you invoke the "set" behavior, and
   // BindingFlags::GetProperty when you invoke the "get" behavior. Also note that
   // we invoke them based on the name we gave the property, as expected, and not
   // the name of the methods we bound to the specific property behaviors.
   Object^ custData = Activator::CreateInstance( custDataType );
   array<Object^>^temp3 = {"Joe User"};
   custDataType->InvokeMember( "CustomerName", BindingFlags::SetProperty, nullptr, custData, temp3 );
   Console::WriteLine( "The customerName field of instance custData has been set to '{0}'.", custDataType->InvokeMember( "CustomerName", BindingFlags::GetProperty, nullptr, custData, gcnew array<Object^>(0) ) );
}

// --- O U T P U T ---
// The output should be as follows:
// -------------------
// Property 'System.String CustomerName' created!
// ---
// The customerName field of instance custData has been set to 'Joe User'.
// -------------------
using System;
using System.Threading;
using System.Reflection;
using System.Reflection.Emit;

class PropertyBuilderDemo
{
   public static Type BuildDynamicTypeWithProperties()
   {
        AppDomain myDomain = Thread.GetDomain();
        AssemblyName myAsmName = new AssemblyName();
        myAsmName.Name = "MyDynamicAssembly";

        // To generate a persistable assembly, specify AssemblyBuilderAccess.RunAndSave.
        AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(myAsmName,
                                                        AssemblyBuilderAccess.RunAndSave);
        // Generate a persistable single-module assembly.
        ModuleBuilder myModBuilder =
            myAsmBuilder.DefineDynamicModule(myAsmName.Name, myAsmName.Name + ".dll");

        TypeBuilder myTypeBuilder = myModBuilder.DefineType("CustomerData",
                                                        TypeAttributes.Public);

        FieldBuilder customerNameBldr = myTypeBuilder.DefineField("customerName",
                                                        typeof(string),
                                                        FieldAttributes.Private);

        // The last argument of DefineProperty is null, because the
        // property has no parameters. (If you don't specify null, you must
        // specify an array of Type objects. For a parameterless property,
        // use an array with no elements: new Type[] {})
        PropertyBuilder custNamePropBldr = myTypeBuilder.DefineProperty("CustomerName",
                                                         PropertyAttributes.HasDefault,
                                                         typeof(string),
                                                         null);

        // The property set and property get methods require a special
        // set of attributes.
        MethodAttributes getSetAttr =
            MethodAttributes.Public | MethodAttributes.SpecialName |
                MethodAttributes.HideBySig;

        // Define the "get" accessor method for CustomerName.
        MethodBuilder custNameGetPropMthdBldr =
            myTypeBuilder.DefineMethod("get_CustomerName",
                                       getSetAttr,
                                       typeof(string),
                                       Type.EmptyTypes);

        ILGenerator custNameGetIL = custNameGetPropMthdBldr.GetILGenerator();

        custNameGetIL.Emit(OpCodes.Ldarg_0);
        custNameGetIL.Emit(OpCodes.Ldfld, customerNameBldr);
        custNameGetIL.Emit(OpCodes.Ret);

        // Define the "set" accessor method for CustomerName.
        MethodBuilder custNameSetPropMthdBldr =
            myTypeBuilder.DefineMethod("set_CustomerName",
                                       getSetAttr,
                                       null,
                                       new Type[] { typeof(string) });

        ILGenerator custNameSetIL = custNameSetPropMthdBldr.GetILGenerator();

        custNameSetIL.Emit(OpCodes.Ldarg_0);
        custNameSetIL.Emit(OpCodes.Ldarg_1);
        custNameSetIL.Emit(OpCodes.Stfld, customerNameBldr);
        custNameSetIL.Emit(OpCodes.Ret);

        // Last, we must map the two methods created above to our PropertyBuilder to
        // their corresponding behaviors, "get" and "set" respectively.
        custNamePropBldr.SetGetMethod(custNameGetPropMthdBldr);
        custNamePropBldr.SetSetMethod(custNameSetPropMthdBldr);

        Type retval = myTypeBuilder.CreateType();

        // Save the assembly so it can be examined with Ildasm.exe,
        // or referenced by a test program.
        myAsmBuilder.Save(myAsmName.Name + ".dll");
        return retval;
   }

   public static void Main()
   {
        Type custDataType = BuildDynamicTypeWithProperties();

        PropertyInfo[] custDataPropInfo = custDataType.GetProperties();
        foreach (PropertyInfo pInfo in custDataPropInfo) {
           Console.WriteLine("Property '{0}' created!", pInfo.ToString());
        }

        Console.WriteLine("---");
        // Note that when invoking a property, you need to use the proper BindingFlags -
        // BindingFlags.SetProperty when you invoke the "set" behavior, and
        // BindingFlags.GetProperty when you invoke the "get" behavior. Also note that
        // we invoke them based on the name we gave the property, as expected, and not
        // the name of the methods we bound to the specific property behaviors.

        object custData = Activator.CreateInstance(custDataType);
        custDataType.InvokeMember("CustomerName", BindingFlags.SetProperty,
                                      null, custData, new object[]{ "Joe User" });

        Console.WriteLine("The customerName field of instance custData has been set to '{0}'.",
                           custDataType.InvokeMember("CustomerName", BindingFlags.GetProperty,
                                                      null, custData, new object[]{ }));
   }
}

// --- O U T P U T ---
// The output should be as follows:
// -------------------
// Property 'System.String CustomerName' created!
// ---
// The customerName field of instance custData has been set to 'Joe User'.
// -------------------
Imports System.Threading
Imports System.Reflection
Imports System.Reflection.Emit

Class PropertyBuilderDemo
   
   Public Shared Function BuildDynamicTypeWithProperties() As Type
      Dim myDomain As AppDomain = Thread.GetDomain()
      Dim myAsmName As New AssemblyName()
      myAsmName.Name = "MyDynamicAssembly"
      
      ' To generate a persistable assembly, specify AssemblyBuilderAccess.RunAndSave.
      Dim myAsmBuilder As AssemblyBuilder = myDomain.DefineDynamicAssembly(myAsmName, _
                                                        AssemblyBuilderAccess.RunAndSave)
      
      ' Generate a persistable, single-module assembly.
      Dim myModBuilder As ModuleBuilder = _
          myAsmBuilder.DefineDynamicModule(myAsmName.Name, myAsmName.Name & ".dll")
      
      Dim myTypeBuilder As TypeBuilder = myModBuilder.DefineType("CustomerData", TypeAttributes.Public)
      
      ' Define a private field to hold the property value.
      Dim customerNameBldr As FieldBuilder = myTypeBuilder.DefineField("customerName", _
                                             GetType(String), FieldAttributes.Private)
      
      ' The last argument of DefineProperty is Nothing, because the
      ' property has no parameters. (If you don't specify Nothing, you must
      ' specify an array of Type objects. For a parameterless property,
      ' use an array with no elements: New Type() {})
      Dim custNamePropBldr As PropertyBuilder = _
          myTypeBuilder.DefineProperty("CustomerName", _
                                       PropertyAttributes.HasDefault, _
                                       GetType(String), _
                                       Nothing)
      
      ' The property set and property get methods require a special
      ' set of attributes.
      Dim getSetAttr As MethodAttributes = _
          MethodAttributes.Public Or MethodAttributes.SpecialName _
              Or MethodAttributes.HideBySig

      ' Define the "get" accessor method for CustomerName.
      Dim custNameGetPropMthdBldr As MethodBuilder = _
          myTypeBuilder.DefineMethod("GetCustomerName", _
                                     getSetAttr, _
                                     GetType(String), _
                                     Type.EmptyTypes)
      
      Dim custNameGetIL As ILGenerator = custNameGetPropMthdBldr.GetILGenerator()
      
      custNameGetIL.Emit(OpCodes.Ldarg_0)
      custNameGetIL.Emit(OpCodes.Ldfld, customerNameBldr)
      custNameGetIL.Emit(OpCodes.Ret)
      
      ' Define the "set" accessor method for CustomerName.
      Dim custNameSetPropMthdBldr As MethodBuilder = _
          myTypeBuilder.DefineMethod("get_CustomerName", _
                                     getSetAttr, _
                                     Nothing, _
                                     New Type() {GetType(String)})
      
      Dim custNameSetIL As ILGenerator = custNameSetPropMthdBldr.GetILGenerator()
      
      custNameSetIL.Emit(OpCodes.Ldarg_0)
      custNameSetIL.Emit(OpCodes.Ldarg_1)
      custNameSetIL.Emit(OpCodes.Stfld, customerNameBldr)
      custNameSetIL.Emit(OpCodes.Ret)
      
      ' Last, we must map the two methods created above to our PropertyBuilder to 
      ' their corresponding behaviors, "get" and "set" respectively. 
      custNamePropBldr.SetGetMethod(custNameGetPropMthdBldr)
      custNamePropBldr.SetSetMethod(custNameSetPropMthdBldr)
            
      Dim retval As Type = myTypeBuilder.CreateType()

      ' Save the assembly so it can be examined with Ildasm.exe,
      ' or referenced by a test program.
      myAsmBuilder.Save(myAsmName.Name & ".dll")
      return retval
   End Function 'BuildDynamicTypeWithProperties
    
   
   Public Shared Sub Main()
      Dim custDataType As Type = BuildDynamicTypeWithProperties()
      
      Dim custDataPropInfo As PropertyInfo() = custDataType.GetProperties()
      Dim pInfo As PropertyInfo
      For Each pInfo In  custDataPropInfo
         Console.WriteLine("Property '{0}' created!", pInfo.ToString())
      Next pInfo
      
      Console.WriteLine("---")
      ' Note that when invoking a property, you need to use the proper BindingFlags -
      ' BindingFlags.SetProperty when you invoke the "set" behavior, and 
      ' BindingFlags.GetProperty when you invoke the "get" behavior. Also note that
      ' we invoke them based on the name we gave the property, as expected, and not
      ' the name of the methods we bound to the specific property behaviors.
      Dim custData As Object = Activator.CreateInstance(custDataType)
      custDataType.InvokeMember("CustomerName", BindingFlags.SetProperty, Nothing, _
                                custData, New Object() {"Joe User"})
      
      Console.WriteLine("The customerName field of instance custData has been set to '{0}'.", _
                        custDataType.InvokeMember("CustomerName", BindingFlags.GetProperty, _
                        Nothing, custData, New Object() {}))
   End Sub
End Class


' --- O U T P U T ---
' The output should be as follows:
' -------------------
' Property 'System.String CustomerName' created!
' ---
' The customerName field of instance custData has been set to 'Joe User'.
' -------------------

설명

PropertyBuilder 은 항상 와 TypeBuilder연결됩니다. TypeBuilder DefineProperty 메서드는 클라이언트에 새 PropertyBuilder 를 반환합니다.

생성자

PropertyBuilder()

PropertyBuilder 클래스의 새 인스턴스를 초기화합니다.

속성

Attributes

이 속성의 특성을 가져옵니다.

CanRead

속성을 읽을 수 있는지를 나타내는 값을 가져옵니다.

CanWrite

속성에 쓸 수 있는지를 나타내는 값을 가져옵니다.

CustomAttributes

이 멤버의 사용자 지정 특성을 포함하는 컬렉션을 가져옵니다.

(다음에서 상속됨 MemberInfo)
DeclaringType

이 멤버를 선언하는 클래스를 가져옵니다.

GetMethod

이 속성의 get 접근자를 가져옵니다.

(다음에서 상속됨 PropertyInfo)
IsCollectible

MemberInfo 개체가 수집 가능한 AssemblyLoadContext에 보관된 어셈블리의 일부인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 MemberInfo)
IsSpecialName

속성의 이름이 특수한지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 PropertyInfo)
MemberType

이 멤버가 속성임을 나타내는 MemberTypes 값을 가져옵니다.

(다음에서 상속됨 PropertyInfo)
MetadataToken

메타데이터 요소를 식별하는 값을 가져옵니다.

(다음에서 상속됨 MemberInfo)
Module

현재 속성을 선언하는 형식이 정의될 모듈을 가져옵니다.

Module

현재 MemberInfo가 나타내는 멤버를 선언하는 형식이 정의된 모듈을 가져옵니다.

(다음에서 상속됨 MemberInfo)
Name

이 멤버의 이름을 가져옵니다.

PropertyToken

이 속성에 대한 토큰을 검색합니다.

PropertyType

이 속성의 필드 형식을 가져옵니다.

ReflectedType

MemberInfo의 이 인스턴스를 가져오는 데 사용된 클래스 개체를 가져옵니다.

ReflectedType

MemberInfo의 이 인스턴스를 가져오는 데 사용된 클래스 개체를 가져옵니다.

(다음에서 상속됨 MemberInfo)
SetMethod

이 속성의 set 접근자를 가져옵니다.

(다음에서 상속됨 PropertyInfo)

메서드

AddOtherMethod(MethodBuilder)

이 속성에 연결된 다른 메서드 중 하나를 추가합니다.

AddOtherMethodCore(MethodBuilder)

파생 클래스에서 재정의되는 경우 이 속성과 연결된 다른 메서드 중 하나를 추가합니다.

Equals(Object)

이 인스턴스가 지정된 개체와 같은지를 나타내는 값을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetAccessors()

현재 인스턴스에서 리플렉션한 속성의 public getset 접근자를 리플렉션하는 요소의 배열을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetAccessors(Boolean)

이 속성에 대한 공용 및 비공용 getset 접근자의 배열을 반환합니다.

GetAccessors(Boolean)

현재 인스턴스에 의해 리플렉션되는 속성의 public 및 non-public(지정된 경우) getset 접근자를 리플렉션하는 요소가 포함된 배열을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetConstantValue()

컴파일러에서 속성과 연결한 리터럴 값을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetCustomAttributes(Boolean)

이 속성에 대한 사용자 지정 특성의 배열을 모두 반환합니다.

GetCustomAttributes(Boolean)

파생 클래스에서 재정의되는 경우 이 멤버에 적용된 모든 사용자 지정 특성의 배열을 반환합니다.

(다음에서 상속됨 MemberInfo)
GetCustomAttributes(Type, Boolean)

Type으로 식별된 사용자 지정 특성의 배열을 반환합니다.

GetCustomAttributes(Type, Boolean)

파생된 클래스에서 재정의하는 경우 이 멤버에 적용되고 Type으로 식별되는 사용자 지정 특성의 배열을 반환합니다.

(다음에서 상속됨 MemberInfo)
GetCustomAttributesData()

대상 멤버에 적용된 특성에 대한 데이터를 나타내는 CustomAttributeData 개체의 목록을 반환합니다.

(다음에서 상속됨 MemberInfo)
GetGetMethod()

이 속성의 public get 접근자를 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetGetMethod(Boolean)

이 속성에 대한 public 및 public이 아닌 get 접근자를 반환합니다.

GetGetMethod(Boolean)

파생 클래스에서 재정의되는 경우 이 속성에 대한 공용 또는 공용이 아닌 get 접근자를 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetIndexParameters()

해당 속성에 대한 인덱스 매개 변수의 배열을 모두 반환합니다.

GetModifiedPropertyType()

이 속성 개체의 수정된 형식을 가져옵니다.

(다음에서 상속됨 PropertyInfo)
GetOptionalCustomModifiers()

속성의 선택적 사용자 지정 한정자를 나타내는 형식의 배열을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetRawConstantValue()

컴파일러에서 속성과 연결한 리터럴 값을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetRequiredCustomModifiers()

속성의 필수적 사용자 지정 한정자를 나타내는 형식의 배열을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetSetMethod()

이 속성의 public set 접근자를 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetSetMethod(Boolean)

이 속성의 set 접근자를 반환합니다.

GetSetMethod(Boolean)

파생 클래스에서 재정의되는 경우 이 속성에 대한 set 접근자를 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetType()

속성의 특성을 검색하고 속성 메타데이터에 대한 액세스를 제공합니다.

(다음에서 상속됨 PropertyInfo)
GetValue(Object)

지정된 개체의 속성 값을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetValue(Object, BindingFlags, Binder, Object[], CultureInfo)

지정된 바인딩, 인덱스 및 CultureInfo가 있는 속성의 값을 가져옵니다.

GetValue(Object, BindingFlags, Binder, Object[], CultureInfo)

파생된 클래스에서 재정의된 경우 지정된 바인딩, 인덱스 및 문화별 정보가 있는 지정된 개체의 속성 값을 반환합니다.

(다음에서 상속됨 PropertyInfo)
GetValue(Object, Object[])

속성의 getter 메서드를 호출하여 인덱싱된 속성의 값을 가져옵니다.

HasSameMetadataDefinitionAs(MemberInfo)

형식에 대한 속성을 정의합니다.

(다음에서 상속됨 MemberInfo)
IsDefined(Type, Boolean)

attributeType의 인스턴스가 이 속성에 하나 이상 정의되어 있는지 여부를 나타냅니다.

IsDefined(Type, Boolean)

파생 클래스에서 재정의되는 경우 지정된 형식 또는 파생 형식의 특성이 하나 이상 이 멤버에 적용되는지 여부를 나타냅니다.

(다음에서 상속됨 MemberInfo)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
SetConstant(Object)

이 속성의 기본값을 설정합니다.

SetConstantCore(Object)

파생 클래스에서 재정의되는 경우 이 속성의 기본값을 설정합니다.

SetCustomAttribute(ConstructorInfo, Byte[])

지정된 사용자 지정 특성 blob을 사용하여 사용자 지정 특성을 설정합니다.

SetCustomAttribute(CustomAttributeBuilder)

사용자 지정 특성 작성기를 사용하여 사용자 지정 특성을 설정합니다.

SetCustomAttributeCore(ConstructorInfo, ReadOnlySpan<Byte>)

파생 클래스에서 재정의되는 경우 이 어셈블리에서 사용자 지정 특성을 설정합니다.

SetGetMethod(MethodBuilder)

속성 값을 가져오는 메서드를 설정합니다.

SetGetMethodCore(MethodBuilder)

파생 클래스에서 재정의되는 경우 속성 값을 가져오는 메서드를 설정합니다.

SetSetMethod(MethodBuilder)

속성 값을 설정하는 메서드를 설정합니다.

SetSetMethodCore(MethodBuilder)

파생 클래스에서 재정의되는 경우 속성 값을 설정하는 메서드를 설정합니다.

SetValue(Object, Object)

지정된 개체의 속성 값을 설정합니다.

(다음에서 상속됨 PropertyInfo)
SetValue(Object, Object, BindingFlags, Binder, Object[], CultureInfo)

지정된 개체의 속성 값을 지정된 값으로 설정합니다.

SetValue(Object, Object, BindingFlags, Binder, Object[], CultureInfo)

파생된 클래스에서 재정의된 경우 지정된 바인딩, 인덱스 및 문화별 정보가 있는 지정된 개체에 대해 속성 값을 설정합니다.

(다음에서 상속됨 PropertyInfo)
SetValue(Object, Object, Object[])

인덱스 속성에 대한 선택적 인덱스 값을 사용하여 속성 값을 설정합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

_MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 MemberInfo)
_MemberInfo.GetType()

Type 클래스를 나타내는 MemberInfo 개체를 가져옵니다.

(다음에서 상속됨 MemberInfo)
_MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 MemberInfo)
_MemberInfo.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 MemberInfo)
_MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

(다음에서 상속됨 MemberInfo)
_PropertyBuilder.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

_PropertyBuilder.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

_PropertyBuilder.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

_PropertyBuilder.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

_PropertyInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 PropertyInfo)
_PropertyInfo.GetType()

Type 형식을 나타내는 PropertyInfo 개체를 가져옵니다.

(다음에서 상속됨 PropertyInfo)
_PropertyInfo.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 PropertyInfo)
_PropertyInfo.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 PropertyInfo)
_PropertyInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

(다음에서 상속됨 PropertyInfo)
ICustomAttributeProvider.GetCustomAttributes(Boolean)

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

(다음에서 상속됨 MemberInfo)
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

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

(다음에서 상속됨 MemberInfo)
ICustomAttributeProvider.IsDefined(Type, Boolean)

하나 이상의 attributeType 인스턴스가 이 멤버에 대해 정의되는지 여부를 나타냅니다.

(다음에서 상속됨 MemberInfo)

확장 메서드

GetCustomAttribute(MemberInfo, Type)

지정된 멤버에 적용된 지정된 형식의 사용자 지정 특성을 검색합니다.

GetCustomAttribute(MemberInfo, Type, Boolean)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되는 컬렉션을 검색하거나 선택적으로 해당 멤버의 상위 항목을 검사합니다.

GetCustomAttribute<T>(MemberInfo)

지정된 멤버에 적용된 지정된 형식의 사용자 지정 특성을 검색합니다.

GetCustomAttribute<T>(MemberInfo, Boolean)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되는 컬렉션을 검색하거나 선택적으로 해당 멤버의 상위 항목을 검사합니다.

GetCustomAttributes(MemberInfo)

지정된 멤버에 적용된 사용자 지정 특성 컬렉션을 검색합니다.

GetCustomAttributes(MemberInfo, Boolean)

사용자 지정 특성이 지정된 멤버에 적용되는 컬렉션을 검색하거나 선택적으로 해당 멤버의 상위 항목을 검사합니다.

GetCustomAttributes(MemberInfo, Type)

지정된 멤버에 적용된 지정된 형식의 사용자 지정 특성 컬렉션을 검색합니다.

GetCustomAttributes(MemberInfo, Type, Boolean)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되는 컬렉션을 검색하거나 선택적으로 해당 멤버의 상위 항목을 검사합니다.

GetCustomAttributes<T>(MemberInfo)

지정된 멤버에 적용된 지정된 형식의 사용자 지정 특성 컬렉션을 검색합니다.

GetCustomAttributes<T>(MemberInfo, Boolean)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되는 컬렉션을 검색하거나 선택적으로 해당 멤버의 상위 항목을 검사합니다.

IsDefined(MemberInfo, Type)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되었는지 여부를 나타냅니다.

IsDefined(MemberInfo, Type, Boolean)

지정된 형식의 사용자 지정 특성이 지정된 멤버에 적용되었는지, 또는 선택적으로 상위 항목에 적용되었는지 여부를 결정합니다.

GetMetadataToken(MemberInfo)

사용 가능한 경우 지정된 멤버의 메타데이터 토큰을 가져옵니다.

HasMetadataToken(MemberInfo)

지정된 멤버에 대해 메타데이터 토큰을 사용할 수 있는지를 나타내는 값을 반환합니다.

GetAccessors(PropertyInfo)

형식에 대한 속성을 정의합니다.

GetAccessors(PropertyInfo, Boolean)

형식에 대한 속성을 정의합니다.

GetGetMethod(PropertyInfo)

형식에 대한 속성을 정의합니다.

GetGetMethod(PropertyInfo, Boolean)

형식에 대한 속성을 정의합니다.

GetSetMethod(PropertyInfo)

형식에 대한 속성을 정의합니다.

GetSetMethod(PropertyInfo, Boolean)

형식에 대한 속성을 정의합니다.

적용 대상