Show / Hide Table of Contents

    Class ILGeneratorExtensions

    Represents the il generator extensions.

    Inheritance
    Object
    ILGeneratorExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Platform.Reflection
    Assembly: Platform.Reflection.dll
    Syntax
    public static class ILGeneratorExtensions

    Methods

    | Improve this Doc View Source

    Add(ILGenerator)

    Adds the generator.

    Declaration
    public static void Add(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    And(ILGenerator)

    Ands the generator.

    Declaration
    public static void And(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    Box(ILGenerator, Type)

    Boxes the generator.

    Declaration
    public static void Box(this ILGenerator generator, Type boxedType)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type boxedType

    The boxed type.

    | Improve this Doc View Source

    Box<TBox>(ILGenerator)

    Boxes the generator.

    Declaration
    public static void Box<TBox>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TBox

    The box.

    | Improve this Doc View Source

    BranchIfGreaterOrEqual(ILGenerator, Label)

    Branches the if greater or equal using the specified generator.

    Declaration
    public static void BranchIfGreaterOrEqual(this ILGenerator generator, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Label label

    The label.

    | Improve this Doc View Source

    BranchIfGreaterOrEqual(ILGenerator, Boolean, Label)

    Branches the if greater or equal using the specified generator.

    Declaration
    public static void BranchIfGreaterOrEqual(this ILGenerator generator, bool isSigned, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isSigned

    The is signed.

    Label label

    The label.

    | Improve this Doc View Source

    BranchIfLessOrEqual(ILGenerator, Label)

    Branches the if less or equal using the specified generator.

    Declaration
    public static void BranchIfLessOrEqual(this ILGenerator generator, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Label label

    The label.

    | Improve this Doc View Source

    BranchIfLessOrEqual(ILGenerator, Boolean, Label)

    Branches the if less or equal using the specified generator.

    Declaration
    public static void BranchIfLessOrEqual(this ILGenerator generator, bool isSigned, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isSigned

    The is signed.

    Label label

    The label.

    | Improve this Doc View Source

    Call(ILGenerator, MethodInfo)

    Calls the generator.

    Declaration
    public static void Call(this ILGenerator generator, MethodInfo method)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    MethodInfo method

    The method.

    | Improve this Doc View Source

    CheckedConvert<TSource, TTarget>(ILGenerator)

    Checkeds the convert using the specified generator.

    Declaration
    public static void CheckedConvert<TSource, TTarget>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TSource

    The source.

    TTarget

    The target.

    Exceptions
    Type Condition
    NotSupportedException

    | Improve this Doc View Source

    CheckedMultiply<T>(ILGenerator)

    Checkeds the multiply using the specified generator.

    Declaration
    public static void CheckedMultiply<T>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    CompareGreaterThan(ILGenerator)

    Compares the greater than using the specified generator.

    Declaration
    public static void CompareGreaterThan(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    CompareGreaterThan(ILGenerator, Boolean)

    Compares the greater than using the specified generator.

    Declaration
    public static void CompareGreaterThan(this ILGenerator generator, bool isSigned)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isSigned

    The is signed.

    | Improve this Doc View Source

    CompareLessThan(ILGenerator)

    Compares the less than using the specified generator.

    Declaration
    public static void CompareLessThan(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    CompareLessThan(ILGenerator, Boolean)

    Compares the less than using the specified generator.

    Declaration
    public static void CompareLessThan(this ILGenerator generator, bool isSigned)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isSigned

    The is signed.

    | Improve this Doc View Source

    DeclareLocal<T>(ILGenerator)

    Declares the local using the specified generator.

    Declaration
    public static LocalBuilder DeclareLocal<T>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Returns
    Type Description
    LocalBuilder

    The local builder

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    Decrement(ILGenerator, Type)

    Decrements the generator.

    Declaration
    public static void Decrement(this ILGenerator generator, Type valueType)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type valueType

    The value type.

    | Improve this Doc View Source

    Decrement<TValue>(ILGenerator)

    Decrements the generator.

    Declaration
    public static void Decrement<TValue>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TValue

    The value.

    | Improve this Doc View Source

    Divide<T>(ILGenerator)

    Divides the generator.

    Declaration
    public static void Divide<T>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    Increment(ILGenerator, Type)

    Increments the generator.

    Declaration
    public static void Increment(this ILGenerator generator, Type valueType)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type valueType

    The value type.

    | Improve this Doc View Source

    Increment<TValue>(ILGenerator)

    Increments the generator.

    Declaration
    public static void Increment<TValue>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TValue

    The value.

    | Improve this Doc View Source

    LoadArgument(ILGenerator, Int32)

    Loads the argument using the specified generator.

    Declaration
    public static void LoadArgument(this ILGenerator generator, int argumentIndex)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int32 argumentIndex

    The argument index.

    | Improve this Doc View Source

    LoadArguments(ILGenerator, Int32[])

    Loads the arguments using the specified generator.

    Declaration
    public static void LoadArguments(this ILGenerator generator, params int[] argumentIndices)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int32[] argumentIndices

    The argument indices.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Boolean)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, bool value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Byte)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, byte value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Byte value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Double)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, double value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Double value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Int16)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, short value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int16 value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Int32)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, int value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int32 value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Int64)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, long value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int64 value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, SByte)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, sbyte value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    SByte value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Single)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, float value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Single value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, Type, Object)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, Type constantType, object constantValue)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type constantType

    The constant type.

    Object constantValue

    The constant value.

    Exceptions
    Type Condition
    NotSupportedException

    | Improve this Doc View Source

    LoadConstant(ILGenerator, UInt16)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, ushort value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    UInt16 value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, UInt32)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, uint value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    UInt32 value

    The value.

    | Improve this Doc View Source

    LoadConstant(ILGenerator, UInt64)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant(this ILGenerator generator, ulong value)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    UInt64 value

    The value.

    | Improve this Doc View Source

    LoadConstant<TConstant>(ILGenerator, TConstant)

    Loads the constant using the specified generator.

    Declaration
    public static void LoadConstant<TConstant>(this ILGenerator generator, TConstant constantValue)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    TConstant constantValue

    The constant value.

    Type Parameters
    Name Description
    TConstant

    The constant.

    | Improve this Doc View Source

    LoadConstantOne(ILGenerator, Type)

    Loads the constant one using the specified generator.

    Declaration
    public static void LoadConstantOne(this ILGenerator generator, Type constantType)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type constantType

    The constant type.

    Exceptions
    Type Condition
    NotSupportedException

    | Improve this Doc View Source

    LoadConstantOne<TConstant>(ILGenerator)

    Loads the constant one using the specified generator.

    Declaration
    public static void LoadConstantOne<TConstant>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TConstant

    The constant.

    | Improve this Doc View Source

    LoadIndirect(ILGenerator, Type, Boolean, Nullable<Byte>)

    Loads the indirect using the specified generator.

    Declaration
    public static void LoadIndirect(this ILGenerator generator, Type type, bool isVolatile = false, byte? unaligned = default(byte? ))
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type type

    The type.

    Boolean isVolatile

    The is volatile.

    Nullable<Byte> unaligned

    The unaligned.

    Exceptions
    Type Condition
    InvalidOperationException

    ArgumentException

    unaligned must be null, 1, 2, or 4

    | Improve this Doc View Source

    LoadIndirect<T>(ILGenerator, Boolean, Nullable<Byte>)

    Loads the indirect using the specified generator.

    Declaration
    public static void LoadIndirect<T>(this ILGenerator generator, bool isVolatile = false, byte? unaligned = default(byte? ))
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isVolatile

    The is volatile.

    Nullable<Byte> unaligned

    The unaligned.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    LoadLocal(ILGenerator, LocalBuilder)

    Loads the local using the specified generator.

    Declaration
    public static void LoadLocal(this ILGenerator generator, LocalBuilder local)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    LocalBuilder local

    The local.

    | Improve this Doc View Source

    Multiply(ILGenerator)

    Multiplies the generator.

    Declaration
    public static void Multiply(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    Negate(ILGenerator)

    Negates the generator.

    Declaration
    public static void Negate(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    NewObject(ILGenerator, ConstructorInfo)

    News the object using the specified generator.

    Declaration
    public static void NewObject(this ILGenerator generator, ConstructorInfo constructor)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    ConstructorInfo constructor

    The constructor.

    | Improve this Doc View Source

    NewObject(ILGenerator, Type, Type[])

    News the object using the specified generator.

    Declaration
    public static void NewObject(this ILGenerator generator, Type type, params Type[] parameterTypes)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type type

    The type.

    Type[] parameterTypes

    The parameter types.

    Exceptions
    Type Condition
    InvalidOperationException

    | Improve this Doc View Source

    Not(ILGenerator)

    Nots the generator.

    Declaration
    public static void Not(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    Or(ILGenerator)

    Ors the generator.

    Declaration
    public static void Or(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    Return(ILGenerator)

    Returns the generator.

    Declaration
    public static void Return(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    ShiftLeft(ILGenerator)

    Shifts the left using the specified generator.

    Declaration
    public static void ShiftLeft(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    ShiftRight<T>(ILGenerator)

    Shifts the right using the specified generator.

    Declaration
    public static void ShiftRight<T>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    StoreArgument(ILGenerator, Int32)

    Stores the argument using the specified generator.

    Declaration
    public static void StoreArgument(this ILGenerator generator, int argumentIndex)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Int32 argumentIndex

    The argument index.

    | Improve this Doc View Source

    StoreIndirect(ILGenerator, Type, Boolean, Nullable<Byte>)

    Stores the indirect using the specified generator.

    Declaration
    public static void StoreIndirect(this ILGenerator generator, Type type, bool isVolatile = false, byte? unaligned = default(byte? ))
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type type

    The type.

    Boolean isVolatile

    The is volatile.

    Nullable<Byte> unaligned

    The unaligned.

    Exceptions
    Type Condition
    InvalidOperationException

    ArgumentException

    unaligned must be null, 1, 2, or 4

    | Improve this Doc View Source

    StoreIndirect<T>(ILGenerator, Boolean, Nullable<Byte>)

    Stores the indirect using the specified generator.

    Declaration
    public static void StoreIndirect<T>(this ILGenerator generator, bool isVolatile = false, byte? unaligned = default(byte? ))
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean isVolatile

    The is volatile.

    Nullable<Byte> unaligned

    The unaligned.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    StoreLocal(ILGenerator, LocalBuilder)

    Stores the local using the specified generator.

    Declaration
    public static void StoreLocal(this ILGenerator generator, LocalBuilder local)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    LocalBuilder local

    The local.

    | Improve this Doc View Source

    Subtract(ILGenerator)

    Subtracts the generator.

    Declaration
    public static void Subtract(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    Throw<T>(ILGenerator)

    Throws the generator.

    Declaration
    public static void Throw<T>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    T

    The .

    | Improve this Doc View Source

    Unbox(ILGenerator, Type)

    Unboxes the generator.

    Declaration
    public static void Unbox(this ILGenerator generator, Type typeToUnbox)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type typeToUnbox

    The type to unbox.

    | Improve this Doc View Source

    Unbox<TUnbox>(ILGenerator)

    Unboxes the generator.

    Declaration
    public static void Unbox<TUnbox>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TUnbox

    The unbox.

    | Improve this Doc View Source

    UnboxValue(ILGenerator, Type)

    Unboxes the value using the specified generator.

    Declaration
    public static void UnboxValue(this ILGenerator generator, Type typeToUnbox)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type typeToUnbox

    The type to unbox.

    | Improve this Doc View Source

    UnboxValue<TUnbox>(ILGenerator)

    Unboxes the value using the specified generator.

    Declaration
    public static void UnboxValue<TUnbox>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TUnbox

    The unbox.

    | Improve this Doc View Source

    UncheckedConvert<TSource, TTarget>(ILGenerator)

    Uncheckeds the convert using the specified generator.

    Declaration
    public static void UncheckedConvert<TSource, TTarget>(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Type Parameters
    Name Description
    TSource

    The source.

    TTarget

    The target.

    | Improve this Doc View Source

    UncheckedConvert<TSource, TTarget>(ILGenerator, Boolean)

    Uncheckeds the convert using the specified generator.

    Declaration
    public static void UncheckedConvert<TSource, TTarget>(this ILGenerator generator, bool extendSign)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Boolean extendSign

    The extend sign.

    Type Parameters
    Name Description
    TSource

    The source.

    TTarget

    The target.

    | Improve this Doc View Source

    UnsignedBranchIfGreaterOrEqual(ILGenerator, Label)

    Unsigneds the branch if greater or equal using the specified generator.

    Declaration
    public static void UnsignedBranchIfGreaterOrEqual(this ILGenerator generator, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Label label

    The label.

    | Improve this Doc View Source

    UnsignedBranchIfLessOrEqual(ILGenerator, Label)

    Unsigneds the branch if less or equal using the specified generator.

    Declaration
    public static void UnsignedBranchIfLessOrEqual(this ILGenerator generator, Label label)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    Label label

    The label.

    | Improve this Doc View Source

    UnsignedCompareGreaterThan(ILGenerator)

    Unsigneds the compare greater than using the specified generator.

    Declaration
    public static void UnsignedCompareGreaterThan(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    | Improve this Doc View Source

    UnsignedCompareLessThan(ILGenerator)

    Unsigneds the compare less than using the specified generator.

    Declaration
    public static void UnsignedCompareLessThan(this ILGenerator generator)
    Parameters
    Type Name Description
    ILGenerator generator

    The generator.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX