Метод | Описание | |
---|---|---|
CodeGenerator ( |
Initializes a new instance of the CodeGenerator class.
|
|
CreateLocalBuilderForInvocationResult ( ILGenerator generator, Type returnType, Type nativeReturnType ) : LocalBuilder |
Creates a local builder to store the result of the invocation.
|
|
CreateLocalVariableForByRefParameters ( ILGenerator generator, ParameterInfo parameterInfos ) : ByRefParameter[] |
Emit local variable for each by-ref parameters. These variables will hold the result until the marshalling occurs.
|
|
EmitLoadArgument ( ILGenerator generator, int index ) : void | ||
EmitManagedToNativeMarshallingForByRefParameters ( ILGenerator generator, Type nativeParameterTypes, ByRefParameter byRefLocalVariables ) : void |
Emit the code needed to marshal back the local variables to by-ref parameters.
|
|
EmitNativeToManagedMarshallingForByRefParameters ( ILGenerator generator, Type nativeParameterTypes, ByRefParameter byRefLocalVariables ) : void |
For by-ref parameters passed as reference (without [out] attribute), we first set the value of local variables
|
|
EmitParametersLoadingOnStack ( ILGenerator generator, Type parameterTypes, Type nativeParameterTypes, ByRefParameter byRefLocalVariables, int parameterOffset ) : void |
Genenerate optimized IL for stacking parameters : - For the third or fourth parameter, use the short OpCode - For all the parameters left, use the long OpCode
|
|
GetReturnType ( MethodBase methodBase ) : Type |
Gets the return type of the method base.
|
|
GetUniqueName ( MethodBase methodBase ) : String |
Gets a unique name of the method base.
|
|
UnwrapResultOfInvocation ( ILGenerator generator, LocalBuilder result, Type returnType, Type nativeReturnType, bool hasByRef ) : void |
Unwraps the result of invocation.
|
Метод | Описание | |
---|---|---|
DefineProxyDelegateFieldInfo ( TypeBuilder typeBuilder, |
Defines the proxy delegate field info.
|
|
DefineStaticConstructor ( TypeBuilder typeBuilder, IEnumerable |
Defines a static constructor.
|
|
EmitManagedToNativeMarshallingCast ( ILGenerator generator, LocalBuilder local, Type localType, int i ) : void | ||
EmitNativeToManagedMarshallingCast ( ILGenerator generator, Type localType ) : void |
Emits the native to managed marshalling cast.
|
protected CodeGenerator ( |
||
assembly | The assembly. | |
is64Bits | bool |
protected static CreateLocalBuilderForInvocationResult ( ILGenerator generator, Type returnType, Type nativeReturnType ) : LocalBuilder | ||
generator | ILGenerator | The IL generator. |
returnType | Type | The return type. |
nativeReturnType | Type | The native return type. |
Результат | LocalBuilder |
protected static CreateLocalVariableForByRefParameters ( ILGenerator generator, ParameterInfo parameterInfos ) : ByRefParameter[] | ||
generator | ILGenerator | |
parameterInfos | ParameterInfo | |
Результат | ByRefParameter[] |
protected static EmitLoadArgument ( ILGenerator generator, int index ) : void | ||
generator | ILGenerator | |
index | int | |
Результат | void |
protected EmitManagedToNativeMarshallingForByRefParameters ( ILGenerator generator, Type nativeParameterTypes, ByRefParameter byRefLocalVariables ) : void | ||
generator | ILGenerator | |
nativeParameterTypes | Type | |
byRefLocalVariables | ByRefParameter | |
Результат | void |
protected EmitNativeToManagedMarshallingForByRefParameters ( ILGenerator generator, Type nativeParameterTypes, ByRefParameter byRefLocalVariables ) : void | ||
generator | ILGenerator | |
nativeParameterTypes | Type | |
byRefLocalVariables | ByRefParameter | |
Результат | void |
protected static EmitParametersLoadingOnStack ( ILGenerator generator, Type parameterTypes, Type nativeParameterTypes, ByRefParameter byRefLocalVariables, int parameterOffset ) : void | ||
generator | ILGenerator | |
parameterTypes | Type | |
nativeParameterTypes | Type | |
byRefLocalVariables | ByRefParameter | |
parameterOffset | int | |
Результат | void |
protected static GetReturnType ( MethodBase methodBase ) : Type | ||
methodBase | MethodBase | |
Результат | Type |
protected static GetUniqueName ( MethodBase methodBase ) : String | ||
methodBase | MethodBase | |
Результат | String |
protected static UnwrapResultOfInvocation ( ILGenerator generator, LocalBuilder result, Type returnType, Type nativeReturnType, bool hasByRef ) : void | ||
generator | ILGenerator | Generator. |
result | LocalBuilder | Result. |
returnType | Type | Return type. |
nativeReturnType | Type | Native return type. |
hasByRef | bool | If set to |
Результат | void |