System.Reflection.Emit.ILGeneration
Helps build custom attributes.
Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute and the arguments to the constructor.
The constructor for the custom attribute.
The arguments to the constructor of the custom attribute.
is static or private.-or- The number of supplied arguments does not match the number of parameters of the constructor as required by the calling convention of the constructor.-or- The type of supplied argument does not match the type of the parameter declared in the constructor. -or-A supplied argument is a reference type other than or .
or is null.
Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, and a set of named field/value pairs.
The constructor for the custom attribute.
The arguments to the constructor of the custom attribute.
Named fields of the custom attribute.
Values for the named fields of the custom attribute.
The lengths of the and arrays are different.-or- is static or private.-or- The number of supplied arguments does not match the number of parameters of the constructor as required by the calling convention of the constructor.-or- The type of supplied argument does not match the type of the parameter declared in the constructor.-or- The types of the field values do not match the types of the named fields.-or- The field does not belong to the same class or base class as the constructor. -or-A supplied argument or named field is a reference type other than or .
One of the parameters is null.
Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, and a set of named property or value pairs.
The constructor for the custom attribute.
The arguments to the constructor of the custom attribute.
Named properties of the custom attribute.
Values for the named properties of the custom attribute.
The lengths of the and arrays are different.-or- is static or private.-or- The number of supplied arguments does not match the number of parameters of the constructor as required by the calling convention of the constructor.-or- The type of supplied argument does not match the type of the parameter declared in the constructor.-or- The types of the property values do not match the types of the named properties.-or- A property has no setter method.-or- The property does not belong to the same class or base class as the constructor. -or-A supplied argument or named property is a reference type other than or .
One of the parameters is null.
Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, a set of named property or value pairs, and a set of named field or value pairs.
The constructor for the custom attribute.
The arguments to the constructor of the custom attribute.
Named properties of the custom attribute.
Values for the named properties of the custom attribute.
Named fields of the custom attribute.
Values for the named fields of the custom attribute.
The lengths of the and arrays are different.-or- The lengths of the and arrays are different.-or- is static or private.-or- The number of supplied arguments does not match the number of parameters of the constructor as required by the calling convention of the constructor.-or- The type of supplied argument does not match the type of the parameter declared in the constructor.-or- The types of the property values do not match the types of the named properties.-or- The types of the field values do not match the types of the corresponding field types.-or- A property has no setter.-or- The property or field does not belong to the same class or base class as the constructor. -or-A supplied argument, named property, or named field is a reference type other than or .
One of the parameters is null.
Generates Microsoft intermediate language (MSIL) instructions.
Begins a catch block.
The object that represents the exception.
The catch block is within a filtered exception.
is null, and the exception filter block has not returned a value that indicates that finally blocks should be run until this catch block is located.
The Microsoft intermediate language (MSIL) being generated is not currently in an exception block.
Begins an exception block for a filtered exception.
The Microsoft intermediate language (MSIL) being generated is not currently in an exception block. -or-This belongs to a .
Begins an exception block for a non-filtered exception.
The label for the end of the block. This will leave you in the correct place to execute finally blocks or to finish the try.
Begins an exception fault block in the Microsoft intermediate language (MSIL) stream.
The MSIL being generated is not currently in an exception block. -or-This belongs to a .
Begins a finally block in the Microsoft intermediate language (MSIL) instruction stream.
The MSIL being generated is not currently in an exception block.
Begins a lexical scope.
This belongs to a .
Declares a local variable of the specified type.
The declared local variable.
A object that represents the type of the local variable.
is null.
The containing type has been created by the method.
Declares a local variable of the specified type, optionally pinning the object referred to by the variable.
A object that represents the local variable.
A object that represents the type of the local variable.
true to pin the object in memory; otherwise, false.
is null.
The containing type has been created by the method.-or-The method body of the enclosing method has been created by the method.
The method with which this is associated is not represented by a .
Declares a new label.
Returns a new label that can be used as a token for branching.
Puts the specified instruction onto the stream of instructions.
The Microsoft Intermediate Language (MSIL) instruction to be put onto the stream.
Puts the specified instruction and character argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream.
The character argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream. Defined in the OpCodes enumeration.
The numerical argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be emitted onto the stream.
The Int argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream.
The numerical argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream.
The numerical argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and metadata token for the specified constructor onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be emitted onto the stream.
A ConstructorInfo representing a constructor.
is null. This exception is new in the .NET Framework 4.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream and leaves space to include a label when fixes are done.
The MSIL instruction to be emitted onto the stream.
The label to which to branch from this location.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream and leaves space to include a label when fixes are done.
The MSIL instruction to be emitted onto the stream.
The array of label objects to which to branch from this location. All of the labels will be used.
is null. This exception is new in the .NET Framework 4.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the index of the given local variable.
The MSIL instruction to be emitted onto the stream.
A local variable.
The parent method of the parameter does not match the method associated with this .
is null.
is a single-byte instruction, and represents a local variable with an index greater than Byte.MaxValue.
Puts the specified instruction and a signature token onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be emitted onto the stream.
A helper for constructing a signature token.
is null.
Puts the specified instruction and metadata token for the specified field onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be emitted onto the stream.
A FieldInfo representing a field.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given method.
The MSIL instruction to be emitted onto the stream.
A MethodInfo representing a method.
is null.
is a generic method for which the property is false.
Puts the specified instruction and character argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream.
The character argument pushed onto the stream immediately after the instruction.
Puts the specified instruction and numerical argument onto the Microsoft intermediate language (MSIL) stream of instructions.
The MSIL instruction to be put onto the stream.
The Single argument pushed onto the stream immediately after the instruction.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given string.
The MSIL instruction to be emitted onto the stream.
The String to be emitted.
Puts the specified instruction onto the Microsoft intermediate language (MSIL) stream followed by the metadata token for the given type.
The MSIL instruction to be put onto the stream.
A Type.
is null.
Puts a call or callvirt instruction onto the Microsoft intermediate language (MSIL) stream to call a varargs method.
The MSIL instruction to be emitted onto the stream. Must be , , or .
The varargs method to be called.
The types of the optional arguments if the method is a varargs method; otherwise, null.
does not specify a method call.
is null.
The calling convention for the method is not varargs, but optional parameter types are supplied. This exception is thrown in the .NET Framework versions 1.0 and 1.1, In subsequent versions, no exception is thrown.
Puts a instruction onto the Microsoft intermediate language (MSIL) stream, specifying a managed calling convention for the indirect call.
The MSIL instruction to be emitted onto the stream. Must be .
The managed calling convention to be used.
The of the result.
The types of the required arguments to the instruction.
The types of the optional arguments for varargs calls.
is not null, but does not include the flag.
Emits the Microsoft intermediate language (MSIL) necessary to call with the given local variable.
The local variable whose value is to be written to the console.
The type of is or , which are not supported. -or-There is no overload of that accepts the type of .
is null.
Emits the Microsoft intermediate language (MSIL) necessary to call with the given field.
The field whose value is to be written to the console.
There is no overload of the method that accepts the type of the specified field.
is null.
The type of the field is or , which are not supported.
Emits the Microsoft intermediate language (MSIL) to call with a string.
The string to be printed.
Ends an exception block.
The end exception block occurs in an unexpected place in the code stream.
The Microsoft intermediate language (MSIL) being generated is not currently in an exception block.
Ends a lexical scope.
This belongs to a .
Gets the current offset, in bytes, in the Microsoft intermediate language (MSIL) stream that is being emitted by the .
The offset in the MSIL stream at which the next instruction will be emitted.
Marks the Microsoft intermediate language (MSIL) stream's current position with the given label.
The label for which to set an index.
represents an invalid index into the label array.-or- An index for has already been defined.
Emits an instruction to throw an exception.
The class of the type of exception to throw.
is not the class or a derived class of .-or- The type does not have a default constructor.
is null.
Specifies the namespace to be used in evaluating locals and watches for the current active lexical scope.
The namespace to be used in evaluating locals and watches for the current active lexical scope
Length of is zero.
is null.
This belongs to a .
Represents a label in the instruction stream. Label is used in conjunction with the class.
Checks if the given object is an instance of Label and is equal to this instance.
Returns true if is an instance of Label and is equal to this object; otherwise, false.
The object to compare with this Label instance.
Indicates whether the current instance is equal to the specified .
true if the value of is equal to the value of the current instance; otherwise, false.
The to compare to the current instance.
Generates a hash code for this instance.
Returns a hash code for this instance.
Indicates whether two structures are equal.
true if is equal to ; otherwise, false.
The to compare to .
The to compare to .
Indicates whether two structures are not equal.
true if is not equal to ; otherwise, false.
The to compare to .
The to compare to .
Represents a local variable within a method or constructor.
Gets a value indicating whether the object referred to by the local variable is pinned in memory.
true if the object referred to by the local variable is pinned in memory; otherwise, false.
Gets the zero-based index of the local variable within the method body.
An integer value that represents the order of declaration of the local variable within the method body.
Gets the type of the local variable.
The of the local variable.
Creates or associates parameter information.
Retrieves the attributes for this parameter.
Read-only. Retrieves the attributes for this parameter.
Retrieves whether this is an input parameter.
Read-only. Retrieves whether this is an input parameter.
Retrieves whether this parameter is optional.
Read-only. Specifies whether this parameter is optional.
Retrieves whether this parameter is an output parameter.
Read-only. Retrieves whether this parameter is an output parameter.
Retrieves the name of this parameter.
Read-only. Retrieves the name of this parameter.
Retrieves the signature position for this parameter.
Read-only. Retrieves the signature position for this parameter.
Sets the default value of the parameter.
The default value of this parameter.
The parameter is not one of the supported types.-or-The type of does not match the type of the parameter.-or-The parameter is of type or other reference type, is not null, and the value cannot be assigned to the reference type.
Set a custom attribute using a specified custom attribute blob.
The constructor for the custom attribute.
A byte blob representing the attributes.
or is null.
Set a custom attribute using a custom attribute builder.
An instance of a helper class to define the custom attribute.
is null.
Provides methods for building signatures.
Adds an argument to the signature.
The type of the argument.
The signature has already been finished.
is null.
Adds an argument of the specified type to the signature, specifying whether the argument is pinned.
The argument type.
true if the argument is pinned; otherwise, false.
is null.
Adds an argument to the signature, with the specified custom modifiers.
The argument type.
An array of types representing the required custom modifiers for the argument, such as or . If the argument has no required custom modifiers, specify null.
An array of types representing the optional custom modifiers for the argument, such as or . If the argument has no optional custom modifiers, specify null.
is null. -or-An element of or is null.
The signature has already been finished. -or-One of the specified custom modifiers is an array type.-or-One of the specified custom modifiers is an open generic type. That is, the property is true for the custom modifier.
Adds a set of arguments to the signature, with the specified custom modifiers.
The types of the arguments to be added.
An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument, such as or . If a particular argument has no required custom modifiers, specify null instead of an array of types. If none of the arguments have required custom modifiers, specify null instead of an array of arrays.
An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument, such as or . If a particular argument has no optional custom modifiers, specify null instead of an array of types. If none of the arguments have optional custom modifiers, specify null instead of an array of arrays.
An element of is null. -or-One of the specified custom modifiers is null. (However, null can be specified for the array of custom modifiers for any argument.)
The signature has already been finished. -or-One of the specified custom modifiers is an array type.-or-One of the specified custom modifiers is an open generic type. That is, the property is true for the custom modifier. -or-The size of or does not equal the size of .
Marks the end of a vararg fixed part. This is only used if the caller is creating a vararg signature call site.
Checks if this instance is equal to the given object.
true if the given object is a SignatureHelper and represents the same signature; otherwise, false.
The object with which this instance should be compared.
Returns a signature helper for a field.
The SignatureHelper object for a field.
The dynamic module that contains the field for which the SignatureHelper is requested.
Creates and returns a hash code for this instance.
Returns the hash code based on the name.
Returns a signature helper for a local variable.
A for a local variable.
Returns a signature helper for a local variable.
The SignatureHelper object for a local variable.
The dynamic module that contains the local variable for which the SignatureHelper is requested.
Returns a signature helper for a method given the method's calling convention and return type.
The SignatureHelper object for a method.
The calling convention of the method.
The return type of the method, or null for a void return type (Sub procedure in Visual Basic).
Returns a signature helper for a method given the method's module, calling convention, and return type.
The SignatureHelper object for a method.
The that contains the method for which the SignatureHelper is requested.
The calling convention of the method.
The return type of the method, or null for a void return type (Sub procedure in Visual Basic).
is null.
is not a .
Returns a signature helper for a method with a standard calling convention, given the method's module, return type, and argument types.
The SignatureHelper object for a method.
The that contains the method for which the SignatureHelper is requested.
The return type of the method, or null for a void return type (Sub procedure in Visual Basic).
The types of the arguments of the method, or null if the method has no arguments.
is null.-or-An element of is null.
is not a .
Returns a signature helper for a property, given the dynamic module that contains the property, the calling convention, the property type, the property arguments, and custom modifiers for the return type and arguments.
A object for a property.
The that contains the property for which the is requested.
The calling convention of the property accessors.
The property type.
An array of types representing the required custom modifiers for the return type, such as or . If the return type has no required custom modifiers, specify null.
An array of types representing the optional custom modifiers for the return type, such as or . If the return type has no optional custom modifiers, specify null.
The types of the property's arguments, or null if the property has no arguments.
An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument of the property. If a particular argument has no required custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have required custom modifiers, specify null instead of an array of arrays.
An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument of the property. If a particular argument has no optional custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have optional custom modifiers, specify null instead of an array of arrays.
is null.-or-An element of is null. -or-One of the specified custom modifiers is null. (However, null can be specified for the array of custom modifiers for any argument.)
The signature has already been finished. -or- is not a .-or-One of the specified custom modifiers is an array type.-or-One of the specified custom modifiers is an open generic type. That is, the property is true for the custom modifier.-or-The size of or does not equal the size of .
Returns a signature helper for a property, given the dynamic module that contains the property, the property type, and the property arguments.
A object for a property.
The that contains the property for which the is requested.
The property type.
The argument types, or null if the property has no arguments.
is null.-or-An element of is null.
is not a .
Returns a signature helper for a property, given the dynamic module that contains the property, the property type, the property arguments, and custom modifiers for the return type and arguments.
A object for a property.
The that contains the property for which the is requested.
The property type.
An array of types representing the required custom modifiers for the return type, such as or . If the return type has no required custom modifiers, specify null.
An array of types representing the optional custom modifiers for the return type, such as or . If the return type has no optional custom modifiers, specify null.
The types of the property's arguments, or null if the property has no arguments.
An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument of the property. If a particular argument has no required custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have required custom modifiers, specify null instead of an array of arrays.
An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument of the property. If a particular argument has no optional custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have optional custom modifiers, specify null instead of an array of arrays.
is null.-or-An element of is null. -or-One of the specified custom modifiers is null. (However, null can be specified for the array of custom modifiers for any argument.)
The signature has already been finished. -or- is not a .-or-One of the specified custom modifiers is an array type.-or-One of the specified custom modifiers is an open generic type. That is, the property is true for the custom modifier.-or-The size of or does not equal the size of .
Adds the end token to the signature and marks the signature as finished, so no further tokens can be added.
Returns a byte array made up of the full signature.
Returns a string representing the signature arguments.
Returns a string representing the arguments of this signature.