Interface IConstantLoader
Defines a set of members that must be implemented by a type that can load constant values into an MSIL instruction sequence.
Namespace: TheXDS.MCART.Types.Extensions.ConstantLoaders
Assembly: MCART.TypeFactory.dll
Syntax
public interface IConstantLoader
Properties
| Edit this page View SourceConstantType
Gets the type of constant that this IConstantLoader can load into the MSIL instruction sequence.
Declaration
Type ConstantType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Methods
| Edit this page View SourceCanLoadConstant(object?)
Indicates if the specified value can be loaded using this instance.
Declaration
bool CanLoadConstant(object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | Value to be loaded. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified value can be loaded using this instance, false otherwise. |
Emit(ILGenerator, object?)
Loads a constant value into the MSIL instruction sequence.
Declaration
void Emit(ILGenerator il, object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| ILGenerator | il | IL generator to use. |
| object | value | Constant value to load into the instruction sequence. |