C# Class IKVM.Reflection.Emit.TypeBuilder

Inheritance: System.Type, ITypeOwner
Mostrar archivo Open project: samskivert/ikvm-monotouch Class Usage Examples

Private Properties

Property Type Description
CheckBaked void
CreateMethodBuilder MethodBuilder
DefineNestedType TypeBuilder
DefinePropertyImpl IKVM.Reflection.Emit.PropertyBuilder
GetGenericTypeArgument System.Type
GetModuleBuilderToken int
LookupMethod MethodBase
PopulatePropertyAndEventTables void
ResolveMethodAndFieldTokens void
SetStructLayoutPseudoCustomAttribute void
TypeBuilder System
WriteFieldRecords void
WriteMethodDefRecords void
WriteParamRecords void
WriteTypeDefRecord void

Public Methods

Method Description
AddDeclarativeSecurity ( System securityAction, System permissionSet ) : void
AddInterfaceImplementation ( Type interfaceType ) : void
CreateType ( ) : Type
DefineConstructor ( MethodAttributes attribs, CallingConventions callConv, Type parameterTypes ) : IKVM.Reflection.Emit.ConstructorBuilder
DefineConstructor ( MethodAttributes attribs, CallingConventions callingConvention, Type parameterTypes, Type requiredCustomModifiers, Type optionalCustomModifiers ) : IKVM.Reflection.Emit.ConstructorBuilder
DefineDefaultConstructor ( MethodAttributes attributes ) : IKVM.Reflection.Emit.ConstructorBuilder
DefineEvent ( string name, EventAttributes attributes, Type eventtype ) : IKVM.Reflection.Emit.EventBuilder
DefineField ( string name, Type fieldType, FieldAttributes attribs ) : FieldBuilder
DefineField ( string fieldName, Type type, Type requiredCustomModifiers, Type optionalCustomModifiers, FieldAttributes attributes ) : FieldBuilder
DefineGenericParameters ( ) : IKVM.Reflection.Emit.GenericTypeParameterBuilder[]
DefineInitializedData ( string name, byte data, FieldAttributes attributes ) : FieldBuilder
DefineMethod ( string name, MethodAttributes attribs ) : MethodBuilder
DefineMethod ( string name, MethodAttributes attribs, CallingConventions callingConvention ) : MethodBuilder
DefineMethod ( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes ) : MethodBuilder
DefineMethod ( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : MethodBuilder
DefineMethod ( string name, MethodAttributes attribs, Type returnType, Type parameterTypes ) : MethodBuilder
DefineMethodOverride ( MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration ) : void
DefineNestedType ( string name ) : TypeBuilder
DefineNestedType ( string name, TypeAttributes attribs ) : TypeBuilder
DefineNestedType ( string name, TypeAttributes attr, Type parent ) : TypeBuilder
DefineNestedType ( string name, TypeAttributes attr, Type parent, PackingSize packSize ) : TypeBuilder
DefineNestedType ( string name, TypeAttributes attr, Type parent, Type interfaces ) : TypeBuilder
DefineNestedType ( string name, TypeAttributes attr, Type parent, int typeSize ) : TypeBuilder
DefinePInvokeMethod ( string name, string dllName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
DefinePInvokeMethod ( string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
DefinePInvokeMethod ( string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
DefineProperty ( string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : IKVM.Reflection.Emit.PropertyBuilder
DefineProperty ( string name, PropertyAttributes attributes, Type returnType, Type parameterTypes ) : IKVM.Reflection.Emit.PropertyBuilder
DefineProperty ( string name, PropertyAttributes attributes, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : IKVM.Reflection.Emit.PropertyBuilder
DefineTypeInitializer ( ) : IKVM.Reflection.Emit.ConstructorBuilder
DefineUninitializedData ( string name, int size, FieldAttributes attributes ) : FieldBuilder
GetConstructor ( Type type, ConstructorInfo constructor ) : ConstructorInfo
GetField ( Type type, FieldInfo field ) : FieldInfo
GetGenericArguments ( ) : System.Type[]
GetGenericTypeDefinition ( ) : Type
GetMethod ( Type type, MethodInfo method ) : MethodInfo
IsCreated ( ) : bool
SetCustomAttribute ( ConstructorInfo con, byte binaryAttribute ) : void
SetCustomAttribute ( CustomAttributeBuilder customBuilder ) : void
SetParent ( Type parent ) : void
__AddDeclarativeSecurity ( CustomAttributeBuilder customBuilder ) : void
__DefineNestedType ( string ns, string name ) : TypeBuilder
__GetDeclaredEvents ( ) : EventInfo[]
__GetDeclaredFields ( ) : FieldInfo[]
__GetDeclaredInterfaces ( ) : System.Type[]
__GetDeclaredMethods ( ) : MethodBase[]
__GetDeclaredProperties ( ) : PropertyInfo[]
__GetDeclaredTypes ( ) : System.Type[]
__GetGenericArgumentsOptionalCustomModifiers ( ) : System.Type[][]
__GetGenericArgumentsRequiredCustomModifiers ( ) : System.Type[][]
__SetAttributes ( TypeAttributes attributes ) : void

Private Methods

Method Description
CheckBaked ( ) : void
CreateMethodBuilder ( string name, MethodAttributes attributes, CallingConventions callingConvention ) : MethodBuilder
DefineNestedType ( string name, TypeAttributes attr, Type parent, PackingSize packSize, int typeSize ) : TypeBuilder
DefinePropertyImpl ( string name, PropertyAttributes attributes, CallingConventions callingConvention, bool patchCallingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : IKVM.Reflection.Emit.PropertyBuilder
GetGenericTypeArgument ( int index ) : Type
GetModuleBuilderToken ( ) : int
LookupMethod ( int token ) : MethodBase
PopulatePropertyAndEventTables ( ) : void
ResolveMethodAndFieldTokens ( int &methodToken, int &fieldToken, int &parameterToken ) : void
SetStructLayoutPseudoCustomAttribute ( CustomAttributeBuilder customBuilder ) : void
TypeBuilder ( ITypeOwner owner, string ns, string name ) : System
WriteFieldRecords ( IKVM.Reflection.Writer.MetadataWriter mw ) : void
WriteMethodDefRecords ( int baseRVA, IKVM.Reflection.Writer.MetadataWriter mw, int &paramList ) : void
WriteParamRecords ( IKVM.Reflection.Writer.MetadataWriter mw ) : void
WriteTypeDefRecord ( IKVM.Reflection.Writer.MetadataWriter mw, int &fieldList, int &methodList ) : void

Method Details

AddDeclarativeSecurity() public method

public AddDeclarativeSecurity ( System securityAction, System permissionSet ) : void
securityAction System
permissionSet System
return void

AddInterfaceImplementation() public method

public AddInterfaceImplementation ( Type interfaceType ) : void
interfaceType System.Type
return void

CreateType() public method

public CreateType ( ) : Type
return System.Type

DefineConstructor() public method

public DefineConstructor ( MethodAttributes attribs, CallingConventions callConv, Type parameterTypes ) : IKVM.Reflection.Emit.ConstructorBuilder
attribs MethodAttributes
callConv CallingConventions
parameterTypes System.Type
return IKVM.Reflection.Emit.ConstructorBuilder

DefineConstructor() public method

public DefineConstructor ( MethodAttributes attribs, CallingConventions callingConvention, Type parameterTypes, Type requiredCustomModifiers, Type optionalCustomModifiers ) : IKVM.Reflection.Emit.ConstructorBuilder
attribs MethodAttributes
callingConvention CallingConventions
parameterTypes System.Type
requiredCustomModifiers System.Type
optionalCustomModifiers System.Type
return IKVM.Reflection.Emit.ConstructorBuilder

DefineDefaultConstructor() public method

public DefineDefaultConstructor ( MethodAttributes attributes ) : IKVM.Reflection.Emit.ConstructorBuilder
attributes MethodAttributes
return IKVM.Reflection.Emit.ConstructorBuilder

DefineEvent() public method

public DefineEvent ( string name, EventAttributes attributes, Type eventtype ) : IKVM.Reflection.Emit.EventBuilder
name string
attributes EventAttributes
eventtype System.Type
return IKVM.Reflection.Emit.EventBuilder

DefineField() public method

public DefineField ( string name, Type fieldType, FieldAttributes attribs ) : FieldBuilder
name string
fieldType System.Type
attribs FieldAttributes
return FieldBuilder

DefineField() public method

public DefineField ( string fieldName, Type type, Type requiredCustomModifiers, Type optionalCustomModifiers, FieldAttributes attributes ) : FieldBuilder
fieldName string
type System.Type
requiredCustomModifiers System.Type
optionalCustomModifiers System.Type
attributes FieldAttributes
return FieldBuilder

DefineGenericParameters() public method

public DefineGenericParameters ( ) : IKVM.Reflection.Emit.GenericTypeParameterBuilder[]
return IKVM.Reflection.Emit.GenericTypeParameterBuilder[]

DefineInitializedData() public method

public DefineInitializedData ( string name, byte data, FieldAttributes attributes ) : FieldBuilder
name string
data byte
attributes FieldAttributes
return FieldBuilder

DefineMethod() public method

public DefineMethod ( string name, MethodAttributes attribs ) : MethodBuilder
name string
attribs MethodAttributes
return MethodBuilder

DefineMethod() public method

public DefineMethod ( string name, MethodAttributes attribs, CallingConventions callingConvention ) : MethodBuilder
name string
attribs MethodAttributes
callingConvention CallingConventions
return MethodBuilder

DefineMethod() public method

public DefineMethod ( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes ) : MethodBuilder
name string
attributes MethodAttributes
callingConvention CallingConventions
returnType System.Type
parameterTypes System.Type
return MethodBuilder

DefineMethod() public method

public DefineMethod ( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : MethodBuilder
name string
attributes MethodAttributes
callingConvention CallingConventions
returnType System.Type
returnTypeRequiredCustomModifiers System.Type
returnTypeOptionalCustomModifiers System.Type
parameterTypes System.Type
parameterTypeRequiredCustomModifiers System.Type
parameterTypeOptionalCustomModifiers System.Type
return MethodBuilder

DefineMethod() public method

public DefineMethod ( string name, MethodAttributes attribs, Type returnType, Type parameterTypes ) : MethodBuilder
name string
attribs MethodAttributes
returnType System.Type
parameterTypes System.Type
return MethodBuilder

DefineMethodOverride() public method

public DefineMethodOverride ( MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration ) : void
methodInfoBody MethodInfo
methodInfoDeclaration MethodInfo
return void

DefineNestedType() public method

public DefineNestedType ( string name ) : TypeBuilder
name string
return TypeBuilder

DefineNestedType() public method

public DefineNestedType ( string name, TypeAttributes attribs ) : TypeBuilder
name string
attribs TypeAttributes
return TypeBuilder

DefineNestedType() public method

public DefineNestedType ( string name, TypeAttributes attr, Type parent ) : TypeBuilder
name string
attr TypeAttributes
parent System.Type
return TypeBuilder

DefineNestedType() public method

public DefineNestedType ( string name, TypeAttributes attr, Type parent, PackingSize packSize ) : TypeBuilder
name string
attr TypeAttributes
parent System.Type
packSize PackingSize
return TypeBuilder

DefineNestedType() public method

public DefineNestedType ( string name, TypeAttributes attr, Type parent, Type interfaces ) : TypeBuilder
name string
attr TypeAttributes
parent System.Type
interfaces System.Type
return TypeBuilder

DefineNestedType() public method

public DefineNestedType ( string name, TypeAttributes attr, Type parent, int typeSize ) : TypeBuilder
name string
attr TypeAttributes
parent System.Type
typeSize int
return TypeBuilder

DefinePInvokeMethod() public method

public DefinePInvokeMethod ( string name, string dllName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
name string
dllName string
attributes MethodAttributes
callingConvention CallingConventions
returnType System.Type
parameterTypes System.Type
nativeCallConv CallingConvention
nativeCharSet CharSet
return MethodBuilder

DefinePInvokeMethod() public method

public DefinePInvokeMethod ( string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
name string
dllName string
entryName string
attributes MethodAttributes
callingConvention CallingConventions
returnType System.Type
parameterTypes System.Type
nativeCallConv CallingConvention
nativeCharSet CharSet
return MethodBuilder

DefinePInvokeMethod() public method

public DefinePInvokeMethod ( string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers, CallingConvention nativeCallConv, CharSet nativeCharSet ) : MethodBuilder
name string
dllName string
entryName string
attributes MethodAttributes
callingConvention CallingConventions
returnType System.Type
returnTypeRequiredCustomModifiers System.Type
returnTypeOptionalCustomModifiers System.Type
parameterTypes System.Type
parameterTypeRequiredCustomModifiers System.Type
parameterTypeOptionalCustomModifiers System.Type
nativeCallConv CallingConvention
nativeCharSet CharSet
return MethodBuilder

DefineProperty() public method

public DefineProperty ( string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : IKVM.Reflection.Emit.PropertyBuilder
name string
attributes PropertyAttributes
callingConvention CallingConventions
returnType System.Type
returnTypeRequiredCustomModifiers System.Type
returnTypeOptionalCustomModifiers System.Type
parameterTypes System.Type
parameterTypeRequiredCustomModifiers System.Type
parameterTypeOptionalCustomModifiers System.Type
return IKVM.Reflection.Emit.PropertyBuilder

DefineProperty() public method

public DefineProperty ( string name, PropertyAttributes attributes, Type returnType, Type parameterTypes ) : IKVM.Reflection.Emit.PropertyBuilder
name string
attributes PropertyAttributes
returnType System.Type
parameterTypes System.Type
return IKVM.Reflection.Emit.PropertyBuilder

DefineProperty() public method

public DefineProperty ( string name, PropertyAttributes attributes, Type returnType, Type returnTypeRequiredCustomModifiers, Type returnTypeOptionalCustomModifiers, Type parameterTypes, Type parameterTypeRequiredCustomModifiers, Type parameterTypeOptionalCustomModifiers ) : IKVM.Reflection.Emit.PropertyBuilder
name string
attributes PropertyAttributes
returnType System.Type
returnTypeRequiredCustomModifiers System.Type
returnTypeOptionalCustomModifiers System.Type
parameterTypes System.Type
parameterTypeRequiredCustomModifiers System.Type
parameterTypeOptionalCustomModifiers System.Type
return IKVM.Reflection.Emit.PropertyBuilder

DefineTypeInitializer() public method

public DefineTypeInitializer ( ) : IKVM.Reflection.Emit.ConstructorBuilder
return IKVM.Reflection.Emit.ConstructorBuilder

DefineUninitializedData() public method

public DefineUninitializedData ( string name, int size, FieldAttributes attributes ) : FieldBuilder
name string
size int
attributes FieldAttributes
return FieldBuilder

GetConstructor() public static method

public static GetConstructor ( Type type, ConstructorInfo constructor ) : ConstructorInfo
type System.Type
constructor ConstructorInfo
return ConstructorInfo

GetField() public static method

public static GetField ( Type type, FieldInfo field ) : FieldInfo
type System.Type
field FieldInfo
return FieldInfo

GetGenericArguments() public method

public GetGenericArguments ( ) : System.Type[]
return System.Type[]

GetGenericTypeDefinition() public method

public GetGenericTypeDefinition ( ) : Type
return System.Type

GetMethod() public static method

public static GetMethod ( Type type, MethodInfo method ) : MethodInfo
type System.Type
method MethodInfo
return MethodInfo

IsCreated() public method

public IsCreated ( ) : bool
return bool

SetCustomAttribute() public method

public SetCustomAttribute ( ConstructorInfo con, byte binaryAttribute ) : void
con ConstructorInfo
binaryAttribute byte
return void

SetCustomAttribute() public method

public SetCustomAttribute ( CustomAttributeBuilder customBuilder ) : void
customBuilder CustomAttributeBuilder
return void

SetParent() public method

public SetParent ( Type parent ) : void
parent System.Type
return void

__AddDeclarativeSecurity() public method

public __AddDeclarativeSecurity ( CustomAttributeBuilder customBuilder ) : void
customBuilder CustomAttributeBuilder
return void

__DefineNestedType() public method

public __DefineNestedType ( string ns, string name ) : TypeBuilder
ns string
name string
return TypeBuilder

__GetDeclaredEvents() public method

public __GetDeclaredEvents ( ) : EventInfo[]
return EventInfo[]

__GetDeclaredFields() public method

public __GetDeclaredFields ( ) : FieldInfo[]
return FieldInfo[]

__GetDeclaredInterfaces() public method

public __GetDeclaredInterfaces ( ) : System.Type[]
return System.Type[]

__GetDeclaredMethods() public method

public __GetDeclaredMethods ( ) : MethodBase[]
return MethodBase[]

__GetDeclaredProperties() public method

public __GetDeclaredProperties ( ) : PropertyInfo[]
return PropertyInfo[]

__GetDeclaredTypes() public method

public __GetDeclaredTypes ( ) : System.Type[]
return System.Type[]

__GetGenericArgumentsOptionalCustomModifiers() public method

public __GetGenericArgumentsOptionalCustomModifiers ( ) : System.Type[][]
return System.Type[][]

__GetGenericArgumentsRequiredCustomModifiers() public method

public __GetGenericArgumentsRequiredCustomModifiers ( ) : System.Type[][]
return System.Type[][]

__SetAttributes() public method

public __SetAttributes ( TypeAttributes attributes ) : void
attributes TypeAttributes
return void