Class DelegateHelpers
Represents the delegate helpers.
Inherited Members
Namespace: Platform.Reflection
Assembly: Platform.Reflection.dll
Syntax
public static class DelegateHelpers
Methods
| Improve this Doc View SourceCompile<TDelegate>(Action<ILGenerator>)
Compiles the emit code.
Declaration
public static TDelegate Compile<TDelegate>(Action<ILGenerator> emitCode)
where TDelegate : Delegate
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|
Compile<TDelegate>(Action<ILGenerator>, Boolean)
Compiles the emit code.
Declaration
public static TDelegate Compile<TDelegate>(Action<ILGenerator> emitCode, bool typeMemberMethod)
where TDelegate : Delegate
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Boolean | typeMemberMethod | The type member method.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate.
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|
CompileDynamicMethod<TDelegate>(Action<ILGenerator>)
Compiles the dynamic method using the specified emit code.
Declaration
public static TDelegate CompileDynamicMethod<TDelegate>(Action<ILGenerator> emitCode)
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|
CompileOrDefault<TDelegate>(Action<ILGenerator>)
Compiles the or default using the specified emit code.
Declaration
public static TDelegate CompileOrDefault<TDelegate>(Action<ILGenerator> emitCode)
where TDelegate : Delegate
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|
CompileOrDefault<TDelegate>(Action<ILGenerator>, Boolean)
Compiles the or default using the specified emit code.
Declaration
public static TDelegate CompileOrDefault<TDelegate>(Action<ILGenerator> emitCode, bool typeMemberMethod)
where TDelegate : Delegate
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Boolean | typeMemberMethod | The type member method.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate.
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|
CompileTypeMemberMethod<TDelegate>(Action<ILGenerator>)
Compiles the type member method using the specified emit code.
Declaration
public static TDelegate CompileTypeMemberMethod<TDelegate>(Action<ILGenerator> emitCode)
Parameters
Type | Name | Description |
---|---|---|
Action<ILGenerator> | emitCode | The emit code.
|
Returns
Type | Description |
---|---|
TDelegate | The delegate
|
Type Parameters
Name | Description |
---|---|
TDelegate | The delegate.
|