C# 클래스 Yea.Reflection.Emit.TypeBuilder

Helper class for defining types
상속: IType
파일 보기 프로젝트 열기: OxPatient/Rule-Engine 1 사용 예제들

공개 메소드들

메소드 설명
Create ( ) : Type

Creates the type

CreateConstructor ( MethodAttributes attributes = MethodAttributes.Public, IEnumerable parameterTypes = null, CallingConventions callingConventions = CallingConventions.Standard ) : IMethodBuilder

Creates a constructor

CreateDefaultConstructor ( MethodAttributes attributes = MethodAttributes.Public ) : IMethodBuilder

Creates a default constructor

CreateDefaultProperty ( string name, Type propertyType, PropertyAttributes attributes = PropertyAttributes.SpecialName, MethodAttributes getMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, MethodAttributes setMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, IEnumerable parameters = null ) : IPropertyBuilder

Creates a default property (ex int Property{get;set;}

CreateField ( string name, Type fieldType, FieldAttributes attributes = FieldAttributes.Public ) : FieldBuilder

Creates a field

CreateMethod ( string name, MethodAttributes attributes = MethodAttributes.Public|MethodAttributes.Virtual, Type returnType = null, IEnumerable parameterTypes = null ) : IMethodBuilder

Creates a method

CreateProperty ( string name, Type propertyType, PropertyAttributes attributes = PropertyAttributes.SpecialName, MethodAttributes getMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, MethodAttributes setMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, IEnumerable parameters = null ) : IPropertyBuilder

Creates a property

ToString ( ) : string

Writes out the type builder to a readable string

TypeBuilder ( Assembly assembly, string name, IEnumerable interfaces, Type baseClass, TypeAttributes attributes ) : System

Constructor

메소드 상세

Create() 공개 메소드

Creates the type
public Create ( ) : Type
리턴 System.Type

CreateConstructor() 공개 메소드

Creates a constructor
public CreateConstructor ( MethodAttributes attributes = MethodAttributes.Public, IEnumerable parameterTypes = null, CallingConventions callingConventions = CallingConventions.Standard ) : IMethodBuilder
attributes MethodAttributes attributes for the constructor (public, private, etc.)
parameterTypes IEnumerable The types for the parameters
callingConventions CallingConventions The calling convention used
리턴 IMethodBuilder

CreateDefaultConstructor() 공개 메소드

Creates a default constructor
public CreateDefaultConstructor ( MethodAttributes attributes = MethodAttributes.Public ) : IMethodBuilder
attributes MethodAttributes attributes for the constructor (public, private, etc.)
리턴 IMethodBuilder

CreateDefaultProperty() 공개 메소드

Creates a default property (ex int Property{get;set;}
public CreateDefaultProperty ( string name, Type propertyType, PropertyAttributes attributes = PropertyAttributes.SpecialName, MethodAttributes getMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, MethodAttributes setMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, IEnumerable parameters = null ) : IPropertyBuilder
name string name of the property
propertyType System.Type Type of the property
attributes PropertyAttributes attributes for the property (special name, etc.)
getMethodAttributes MethodAttributes Get method's attributes (public, private, etc.)
setMethodAttributes MethodAttributes Set method's attributes (public, private, etc.)
parameters IEnumerable Parameter types
리턴 IPropertyBuilder

CreateField() 공개 메소드

Creates a field
public CreateField ( string name, Type fieldType, FieldAttributes attributes = FieldAttributes.Public ) : FieldBuilder
name string name of the field
fieldType System.Type Type of the field
attributes FieldAttributes attributes for the field (public, private, etc.)
리턴 FieldBuilder

CreateMethod() 공개 메소드

Creates a method
public CreateMethod ( string name, MethodAttributes attributes = MethodAttributes.Public|MethodAttributes.Virtual, Type returnType = null, IEnumerable parameterTypes = null ) : IMethodBuilder
name string Method name
attributes MethodAttributes attributes for the method (public, virtual, etc.)
returnType System.Type Return type
parameterTypes IEnumerable Parameter types
리턴 IMethodBuilder

CreateProperty() 공개 메소드

Creates a property
public CreateProperty ( string name, Type propertyType, PropertyAttributes attributes = PropertyAttributes.SpecialName, MethodAttributes getMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, MethodAttributes setMethodAttributes = MethodAttributes.Public|MethodAttributes.Virtual, IEnumerable parameters = null ) : IPropertyBuilder
name string name of the property
propertyType System.Type Type of the property
attributes PropertyAttributes attributes for the property (special name, etc.)
getMethodAttributes MethodAttributes Get method's attributes (public, private, etc.)
setMethodAttributes MethodAttributes Set method's attributes (public, private, etc.)
parameters IEnumerable Parameter types
리턴 IPropertyBuilder

ToString() 공개 메소드

Writes out the type builder to a readable string
public ToString ( ) : string
리턴 string

TypeBuilder() 공개 메소드

Constructor
public TypeBuilder ( Assembly assembly, string name, IEnumerable interfaces, Type baseClass, TypeAttributes attributes ) : System
assembly Assembly Assembly to generate the type within
name string name of the type
interfaces IEnumerable Interfaces that the type implements
baseClass System.Type Base class for the type
attributes TypeAttributes attributes for the type (public, private, etc.)
리턴 System