Rail.Exceptions

An NDoc Documented Class Library

Rail.Exceptions Namespace

Namespace hierarchy

Classes

Class | Description
ExceptionAttribute | The Custom attribute to use in the EH functionality
InternalErrorException |
Marker | The marking method to the begin and end of the EH clauses

Enumerations

Enumeration | Description
HandlerCode | The caracterizes the type of the handler and the handler code to Add


ExceptionAttribute Class

The Custom attribute to use in the EH functionality

For a list of all members of this type, see ExceptionAttribute Members.

System.Object
System.Attribute
Rail.Exceptions.ExceptionAttribute

public class ExceptionAttribute : Attribute

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Exceptions

Assembly: RAIL (in RAIL.dll)

See Also

ExceptionAttribute Members | Rail.Exceptions Namespace


ExceptionAttribute Members

ExceptionAttribute overview

Public Instance Constructors

ExceptionAttribute Constructor

Public Instance Properties

ExceptionType |
TypeId (inherited from Attribute) | When implemented in a derived class, gets a unique identifier for this Attribute.

Public Instance Methods

Equals (inherited from Attribute) |
GetHashCode (inherited from Attribute) | Returns the hash code for this instance.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefaultAttribute (inherited from Attribute) | When overridden in a derived class, returns an indication whether the value of this instance is the default value for the derived class.
Match (inherited from Attribute) | When overridden in a derived class, returns a value indicating whether this instance equals a specified object.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionAttribute Class | Rail.Exceptions Namespace


ExceptionAttribute Constructor

public ExceptionAttribute(
Type exceptionType
);

See Also

ExceptionAttribute Class | Rail.Exceptions Namespace


ExceptionAttribute Properties

The properties of the ExceptionAttribute class are listed below. For a complete list of ExceptionAttribute class members, see the ExceptionAttribute Members topic.

Public Instance Properties

ExceptionType |
TypeId (inherited from Attribute) | When implemented in a derived class, gets a unique identifier for this Attribute.

See Also

ExceptionAttribute Class | Rail.Exceptions Namespace


ExceptionAttribute.ExceptionType Property

public System.Type ExceptionType {get;}

See Also

ExceptionAttribute Class | Rail.Exceptions Namespace


HandlerCode Enumeration

The caracterizes the type of the handler and the handler code to Add

public enum HandlerCode

Members

Member Name | Description
CatchAndLog |

Requirements

Namespace: Rail.Exceptions

Assembly: RAIL (in RAIL.dll)

See Also

Rail.Exceptions Namespace


InternalErrorException Class

For a list of all members of this type, see InternalErrorException Members.

System.Object
System.Exception
System.ApplicationException
Rail.Exceptions.InternalErrorException

public class InternalErrorException : ApplicationException

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Exceptions

Assembly: RAIL (in RAIL.dll)

See Also

InternalErrorException Members | Rail.Exceptions Namespace


InternalErrorException Members

InternalErrorException overview

Public Instance Constructors

InternalErrorException Constructor

Public Instance Properties

HelpLink (inherited from Exception) | Gets or sets a link to the help file associated with this exception.
InnerException (inherited from Exception) | Gets the Exception instance that caused the current exception.
Message (inherited from Exception) | Gets a message that describes the current exception.
Source (inherited from Exception) | Gets or sets the name of the application or the object that causes the error.
StackTrace (inherited from Exception) | Gets a string representation of the frames on the call stack at the time the current exception was thrown.
TargetSite (inherited from Exception) | Gets the method that throws the current exception.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetBaseException (inherited from Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData (inherited from Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Exception) | Creates and returns a string representation of the current exception.

Protected Instance Properties

HResult (inherited from Exception) Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

InternalErrorException Class | Rail.Exceptions Namespace


InternalErrorException Constructor

public InternalErrorException(
string error
);

Parameters

error

See Also

InternalErrorException Class | Rail.Exceptions Namespace


Marker Class

The marking method to the begin and end of the EH clauses

For a list of all members of this type, see Marker Members.

System.Object
Rail.Exceptions.Marker

public class Marker

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Exceptions

Assembly: RAIL (in RAIL.dll)

See Also

Marker Members | Rail.Exceptions Namespace


Marker Members

Marker overview

Public Static Methods

End
Start

Public Instance Constructors

Marker Constructor Initializes a new instance of the Marker class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Marker Class | Rail.Exceptions Namespace


Marker Constructor

Initializes a new instance of the Marker class.

public Marker();

See Also

Marker Class | Rail.Exceptions Namespace


Marker Methods

The methods of the Marker class are listed below. For a complete list of Marker class members, see the Marker Members topic.

Public Static Methods

End
Start

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Marker Class | Rail.Exceptions Namespace


Marker.End Method

public static void End();

See Also

Marker Class | Rail.Exceptions Namespace


Marker.Start Method

public static void Start();

See Also

Marker Class | Rail.Exceptions Namespace


Rail.MSIL

An NDoc Documented Class Library

Rail.MSIL Namespace

Namespace hierarchy

Classes

Class | Description
Code | Represents the IL instruction stream of a method
Code.InstructionEnumerator | A Enumerator class for instrucions
ExceptionBlock An exception block contains the following:
  • A protected scope, defined by a start and end instruction (inclusive).
  • Several handlers, whose type can be:
  • Catch - Activated based on the type of the exception. Each exception block can have any number of handlers, starting on 0.
  • Finally - Executed always at the end of the exception block. Maximum one handler per block.
  • Filtered - Activated based on user defined code
  • Fault - Activated whenever an exception is raised.

In the current version, only catch and finally handlers are supported.
ExceptionHandler | Represents an exception handler.
ExceptionTable | Contains all structured exception blocks associated with a method
ILArgument | An instruction operating on a parameter
ILBranch | Represents branch instructions.
ILFactory
ILField | An instruction taking a field as an argument
ILLocalVariable | An instruction taking an index to a local variable
ILMethod | An instruction taking an method as an argument
ILNone | Represents instructions that take no operands.
ILOperandI2 | An instruction taking an Int16 as operand.
ILOperandI4 | An instruction taking an Int32 as operand.
ILOperandI8 | An instruction taking an Int64 as operand
ILOperandR4 | An instruction taking Single (R4) as operand
ILOperandR8 | An instruction taking Double (R8) as operand
ILSig | An instruction taking a signature as argument. Not supported by this version.
ILString | An instruction taking a String as an argument
ILSwitch | Represents a switch instruction
ILToken | An instruction taking a metadata token as argument
ILType | An instruction taking a type as an argument
ILVirtualException | A "virtual" instruction that is inserted by MSIL.Code.Write to represent a BeginExceptionBlock, BeginCatchBlock, BeginFinallyBlock, BeginFaultBlock, BeginFilterBlock, EndExceptionBlock (to hopefully simplify Instruction.Write)
Instruction | Represents an MSIL instruction, i.e., an opcode and its operand.
LocalVariable | Represents a local variable of a method
MetadataResolver | Utility class used to resolve the metadata tokens into user level objects like RType, RField and RMethod.
MethodBody | Represents a method body
OpCodesClassifier

Interfaces

Interface | Description
ITargeter | Represents an instruction that targets other instructions (branches and swithces)

Enumerations

Enumeration | Description
ExceptionHandlerType | The type of an exception handler
MetadataResolver.TypeDefOrRefTag | TypeDefOrRef Tag


Code Class

Represents the IL instruction stream of a method

For a list of all members of this type, see Code Members.

System.Object
Rail.MSIL.Code

public class Code : IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

Code Members | Rail.MSIL Namespace


Code Members

Code overview

Public Instance Properties

InstructionCount | Gets the number of instructions
Item | Gets or sets the instruction at the given position
MethodBody | Gets the method body corresponding to this iterator.

Public Instance Methods

Add | Overloaded. Adds many instructions at the end of the code.
Clear | Clears all instructions
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetEnumerator | Method to retunr the IEnumerator associated object
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Insert | Inserts an instruction before the one at the given position.
Remove | Removes the instruction at the given position.
Replace |
ToString (inherited from Object) | Returns a String that represents the current Object.
updateInstructionIndex | Marks each instruction with its sequence number. Starts on 0.

Protected Instance Fields

instructions | The IList of ILInstruction objects
mBody | The MethodBody owner of this Code object

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Code Class | Rail.MSIL Namespace


Code Fields

The fields of the Code class are listed below. For a complete list of Code class members, see the Code Members topic.

Protected Instance Fields

instructions | The IList of ILInstruction objects
mBody | The MethodBody owner of this Code object

See Also

Code Class | Rail.MSIL Namespace


Code.instructions Field

The IList of ILInstruction objects

protected readonly IList instructions;

See Also

Code Class | Rail.MSIL Namespace


Code.mBody Field

The MethodBody owner of this Code object

protected readonly MethodBody mBody;

See Also

Code Class | Rail.MSIL Namespace


Code Properties

The properties of the Code class are listed below. For a complete list of Code class members, see the Code Members topic.

Public Instance Properties

InstructionCount | Gets the number of instructions
Item | Gets or sets the instruction at the given position
MethodBody | Gets the method body corresponding to this iterator.

See Also

Code Class | Rail.MSIL Namespace


Code.InstructionCount Property

Gets the number of instructions

public int InstructionCount {get;}

See Also

Code Class | Rail.MSIL Namespace


Code.Item Property

Gets or sets the instruction at the given position

public Instruction this[
int pos
] {get; set;}

See Also

Code Class | Rail.MSIL Namespace


Code.MethodBody Property

Gets the method body corresponding to this iterator.

public MethodBody MethodBody {get;}

See Also

Code Class | Rail.MSIL Namespace


Code Methods

The methods of the Code class are listed below. For a complete list of Code class members, see the Code Members topic.

Public Instance Methods

Add | Overloaded. Adds many instructions at the end of the code.
Clear | Clears all instructions
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetEnumerator | Method to retunr the IEnumerator associated object
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Insert | Inserts an instruction before the one at the given position.
Remove | Removes the instruction at the given position.
Replace |
ToString (inherited from Object) | Returns a String that represents the current Object.
updateInstructionIndex | Marks each instruction with its sequence number. Starts on 0.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Code Class | Rail.MSIL Namespace


Add Method

An NDoc Documented Class Library

Code.Add Method

Adds an instruction at the end of the code.

Overload List

Adds an instruction at the end of the code.

public void Add(Instruction);

Adds many instructions at the end of the code.

public void Add(IEnumerable);

See Also

Code Class | Rail.MSIL Namespace


Code.Add Method (Instruction)

Adds an instruction at the end of the code.

public void Add(
Instruction inst
);

Parameters

inst
The new instruction to add

See Also

Code Class | Rail.MSIL Namespace | Code.Add Overload List


Code.Add Method (IEnumerable)

Adds many instructions at the end of the code.

public void Add(
IEnumerable instructionCollection
);

Parameters

instructionCollection

See Also

Code Class | Rail.MSIL Namespace | Code.Add Overload List


Code.Clear Method

Clears all instructions

public void Clear();

See Also

Code Class | Rail.MSIL Namespace


Code.GetEnumerator Method

Method to retunr the IEnumerator associated object

public IEnumerator GetEnumerator();

Return Value

The required IEnumerator object

Implements

IEnumerable.GetEnumerator

See Also

Code Class | Rail.MSIL Namespace


Code.Insert Method

Inserts an instruction before the one at the given position.

public void Insert(
int pos,
Instruction inst
);

Parameters

pos
The position where to insert the new instruction
inst
The new instruction to insert

See Also

Code Class | Rail.MSIL Namespace


Code.Remove Method

Removes the instruction at the given position.

public void Remove(
int pos
);

Parameters

pos
The position of the instruction to remove

Remarks

Be careful, this might destroy the integrity of the instruction stream.

See Also

Code Class | Rail.MSIL Namespace


Code.Replace Method

public void Replace(
Instruction originalInstruction,
ICollection newInstructions
);

Parameters

originalInstruction
newInstructions

See Also

Code Class | Rail.MSIL Namespace


Code.updateInstructionIndex Method

Marks each instruction with its sequence number. Starts on 0.

public void updateInstructionIndex();

See Also

Code Class | Rail.MSIL Namespace


Code.InstructionEnumerator Class

A Enumerator class for instrucions

For a list of all members of this type, see Code.InstructionEnumerator Members.

System.Object
Rail.MSIL.Code.InstructionEnumerator

public class Code.InstructionEnumerator : IEnumerator

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

Code.InstructionEnumerator Members | Rail.MSIL Namespace


Code.InstructionEnumerator Members

Code.InstructionEnumerator overview

Public Instance Constructors

Code.InstructionEnumerator Constructor The public constructor for InstructionEnumerator

Public Instance Properties

Current Method to access the current element in the enumeration

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
MoveNext | Method to avance to the next enumerated object
Reset | Method to reset the enumerator
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator Constructor

The public constructor for InstructionEnumerator

public Code.InstructionEnumerator(
IEnumerator arrayEnum
);

Parameters

arrayEnum
The IEnumerator original object

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator Properties

The properties of the Code.InstructionEnumerator class are listed below. For a complete list of Code.InstructionEnumerator class members, see the Code.InstructionEnumerator Members topic.

Public Instance Properties

Current Method to access the current element in the enumeration

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator.Current Property

Method to access the current element in the enumeration

public object Current {get;}

Implements

IEnumerator.Current

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator Methods

The methods of the Code.InstructionEnumerator class are listed below. For a complete list of Code.InstructionEnumerator class members, see the Code.InstructionEnumerator Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
MoveNext | Method to avance to the next enumerated object
Reset | Method to reset the enumerator
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator.MoveNext Method

Method to avance to the next enumerated object

public bool MoveNext();

Return Value

True if the avance was possible

Implements

IEnumerator.MoveNext

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


Code.InstructionEnumerator.Reset Method

Method to reset the enumerator

public void Reset();

Implements

IEnumerator.Reset

See Also

Code.InstructionEnumerator Class | Rail.MSIL Namespace


ExceptionBlock Class

An exception block contains the following:
  • A protected scope, defined by a start and end instruction (inclusive).
  • Several handlers, whose type can be:
  • Catch - Activated based on the type of the exception. Each exception block can have any number of handlers, starting on 0.
  • Finally - Executed always at the end of the exception block. Maximum one handler per block.
  • Filtered - Activated based on user defined code
  • Fault - Activated whenever an exception is raised.

In the current version, only catch and finally handlers are supported.

For a list of all members of this type, see ExceptionBlock Members.

System.Object
Rail.MSIL.ExceptionBlock

public class ExceptionBlock : IComparable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ExceptionBlock Members | Rail.MSIL Namespace


ExceptionBlock Members

ExceptionBlock overview

Public Instance Constructors

ExceptionBlock Constructor Public constructor of the exception block

Public Instance Properties

EndOfProtectedScope | Gets or sets the last instruction of this protected block
FaultHandler | Gets or sets the fault handler. May be null.
FinallyHandler | Gets or sets the finally handler. May be null.
StartOfProtectedScope | Gets or sets the first instruction that is protected by this block

Public Instance Methods

AddCatchHandler | Method to add a catch handler to the block
CompareTo | Useful to compare exception blocks
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCatchHandler | Method to get the Catch Handler at a specif position
GetCatchHandlerCount | Get the number of CatchHandlers
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLastHandler |
GetType (inherited from Object) | Gets the Type of the current instance.
LastInstruction | Returns the index of the last instruction of this exception block. Necessary to know when to call ILGenerator.EndExceptionBlock(). Assumes that the instructions are correctly numbered.
RemoveCatchHandler | Method to remove a Catch Handler at a specific position
SetCatchHandler | Method to set an ExceptionHandler at a specific position in the catch handlers list
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock Constructor

Public constructor of the exception block

public ExceptionBlock(
Instruction start,
Instruction end
);

Parameters

start
The start instruction of the block
end
The last instruction of the block

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock Properties

The properties of the ExceptionBlock class are listed below. For a complete list of ExceptionBlock class members, see the ExceptionBlock Members topic.

Public Instance Properties

EndOfProtectedScope | Gets or sets the last instruction of this protected block
FaultHandler | Gets or sets the fault handler. May be null.
FinallyHandler | Gets or sets the finally handler. May be null.
StartOfProtectedScope | Gets or sets the first instruction that is protected by this block

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.EndOfProtectedScope Property

Gets or sets the last instruction of this protected block

public Instruction EndOfProtectedScope {get; set;}

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.FaultHandler Property

Gets or sets the fault handler. May be null.

public ExceptionHandler FaultHandler {get; set;}

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.FinallyHandler Property

Gets or sets the finally handler. May be null.

public ExceptionHandler FinallyHandler {get; set;}

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.StartOfProtectedScope Property

Gets or sets the first instruction that is protected by this block

public Instruction StartOfProtectedScope {get; set;}

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock Methods

The methods of the ExceptionBlock class are listed below. For a complete list of ExceptionBlock class members, see the ExceptionBlock Members topic.

Public Instance Methods

AddCatchHandler | Method to add a catch handler to the block
CompareTo | Useful to compare exception blocks
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCatchHandler | Method to get the Catch Handler at a specif position
GetCatchHandlerCount | Get the number of CatchHandlers
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLastHandler |
GetType (inherited from Object) | Gets the Type of the current instance.
LastInstruction | Returns the index of the last instruction of this exception block. Necessary to know when to call ILGenerator.EndExceptionBlock(). Assumes that the instructions are correctly numbered.
RemoveCatchHandler | Method to remove a Catch Handler at a specific position
SetCatchHandler | Method to set an ExceptionHandler at a specific position in the catch handlers list
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.AddCatchHandler Method

Method to add a catch handler to the block

public void AddCatchHandler(
ExceptionHandler handler
);

Parameters

handler
The ExceptionHandler to add

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.CompareTo Method

Useful to compare exception blocks

public int CompareTo(
object obj
);

Parameters

obj
The Exception block to compare with

Return Value

1 if this is greater that obj

Implements

IComparable.CompareTo

Remarks

An exception block is smaller than another if: 1. Its protected block starts before the protected block of the other. 2. If they start at the same instruction, them the one who finishes first is the bigger. Informally, this corresponds to sorting the blocks by the order that they must be opened and closed using Reflection emit. This assumes that the instructions are correctly numbered.

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.GetCatchHandler Method

Method to get the Catch Handler at a specif position

public ExceptionHandler GetCatchHandler(
int pos
);

Parameters

pos
The position of the handler

Return Value

The handler at position

pos

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.GetCatchHandlerCount Method

Get the number of CatchHandlers

public int GetCatchHandlerCount();

Return Value

Count of catch handlers

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.GetLastHandler Method

public ExceptionHandler GetLastHandler();

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.LastInstruction Method

Returns the index of the last instruction of this exception block. Necessary to know when to call ILGenerator.EndExceptionBlock(). Assumes that the instructions are correctly numbered.

public int LastInstruction();

Return Value

The index of the last instruction of the block

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.RemoveCatchHandler Method

Method to remove a Catch Handler at a specific position

public void RemoveCatchHandler(
int pos
);

Parameters

pos
The position of the handler to remove

Exceptions

Exception Type | Condition
ArgumentException | Illegal position

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionBlock.SetCatchHandler Method

Method to set an ExceptionHandler at a specific position in the catch handlers list

public void SetCatchHandler(
int pos,
ExceptionHandler handler
);

Parameters

pos
The position where to add the handler
handler
The handler to add

Exceptions

Exception Type | Condition
ArgumentException | Illegal position

See Also

ExceptionBlock Class | Rail.MSIL Namespace


ExceptionHandler Class

Represents an exception handler.

For a list of all members of this type, see ExceptionHandler Members.

System.Object
Rail.MSIL.ExceptionHandler

public class ExceptionHandler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ExceptionHandler Members | Rail.MSIL Namespace


ExceptionHandler Members

ExceptionHandler overview

Public Instance Constructors

ExceptionHandler Overloaded. Initializes a new instance of the ExceptionHandler class.

Public Instance Properties

EndInstruction | Gets or sets the last instruction of this handler. Cannot be null.
ExceptionType | Gets or sets the type of exception that fire this handler. May be null, if the handler type is not a catch.
HandlerType | Gets the type of this handler
StartInstruction | Gets or sets the first instruction of this handler. Cannot be null.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler Constructor

Creates an exception handler for

fault
and
finally
handlers.

Overload List

Creates an exception handler for

fault
and
finally
handlers.

public ExceptionHandler(ExceptionHandlerType,Instruction,Instruction);

Creates a new catch handler

public ExceptionHandler(Instruction,Instruction,RType);

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler Constructor (ExceptionHandlerType, Instruction, Instruction)

Creates an exception handler for

fault
and
finally
handlers.

public ExceptionHandler(
ExceptionHandlerType type,
Instruction start,
Instruction end
);

Parameters

type
The ExceptionHandlerType
start
The first instruction of this handler. May be initally null.
end
The last instruction of this handler. May be initially null.

See Also

ExceptionHandler Class | Rail.MSIL Namespace | ExceptionHandler Constructor Overload List


ExceptionHandler Constructor (Instruction, Instruction, RType)

Creates a new catch handler

public ExceptionHandler(
Instruction catchStart,
Instruction catchEnd,
RType exType
);

Parameters

catchStart
The star instruction of the handler
catchEnd
The last instruction of the handler
exType
The type od the exception

See Also

ExceptionHandler Class | Rail.MSIL Namespace | ExceptionHandler Constructor Overload List


ExceptionHandler Properties

The properties of the ExceptionHandler class are listed below. For a complete list of ExceptionHandler class members, see the ExceptionHandler Members topic.

Public Instance Properties

EndInstruction | Gets or sets the last instruction of this handler. Cannot be null.
ExceptionType | Gets or sets the type of exception that fire this handler. May be null, if the handler type is not a catch.
HandlerType | Gets the type of this handler
StartInstruction | Gets or sets the first instruction of this handler. Cannot be null.

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler.EndInstruction Property

Gets or sets the last instruction of this handler. Cannot be null.

public Instruction EndInstruction {get; set;}

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler.ExceptionType Property

Gets or sets the type of exception that fire this handler. May be null, if the handler type is not a catch.

public Rail.Reflect.RType ExceptionType {get; set;}

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler.HandlerType Property

Gets the type of this handler

public ExceptionHandlerType HandlerType {get;}

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandler.StartInstruction Property

Gets or sets the first instruction of this handler. Cannot be null.

public Instruction StartInstruction {get; set;}

See Also

ExceptionHandler Class | Rail.MSIL Namespace


ExceptionHandlerType Enumeration

The type of an exception handler

public enum ExceptionHandlerType

Members

Member Name | Description
Catch | An handler with a type check as filter
Filter | An handler with user defined code as filter. Not supported.
Finally | Executes always at the end of an exception block, with or without an exception.
Fault | Executes whenever an exception is thrown. A finally that only executes with exceptions.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

Rail.MSIL Namespace


ExceptionTable Class

Contains all structured exception blocks associated with a method

For a list of all members of this type, see ExceptionTable Members.

System.Object
Rail.MSIL.ExceptionTable

public class ExceptionTable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ExceptionTable Members | Rail.MSIL Namespace


ExceptionTable Members

ExceptionTable overview

Public Instance Properties

Item Gets or sets an exception block

Public Instance Methods

Add | Adds a new exception block
Count | Number of exception blocks
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Remove | Removes a structured exception block, deleting all the handlers and corresponding code.
Sort | Sorts the exception blocks.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable Properties

The properties of the ExceptionTable class are listed below. For a complete list of ExceptionTable class members, see the ExceptionTable Members topic.

Public Instance Properties

Item Gets or sets an exception block

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable.Item Property

Gets or sets an exception block

public ExceptionBlock this[
int pos
] {get; set;}

Exceptions

Exception Type | Condition
ArgumentException | If the given position is not valid.

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable Methods

The methods of the ExceptionTable class are listed below. For a complete list of ExceptionTable class members, see the ExceptionTable Members topic.

Public Instance Methods

Add | Adds a new exception block
Count | Number of exception blocks
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Remove | Removes a structured exception block, deleting all the handlers and corresponding code.
Sort | Sorts the exception blocks.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable.Add Method

Adds a new exception block

public void Add(
ExceptionBlock exBlock
);

Parameters

exBlock
The ExceptionBlock to add

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable.Count Method

Number of exception blocks

public int Count();

Return Value

The number of Exception blocks in the method

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable.Remove Method

Removes a structured exception block, deleting all the handlers and corresponding code.

public void Remove(
int pos
);

Parameters

pos
The index of the Exception block to remove

Exceptions

Exception Type | Condition
ArgumentException | If the given position is not valid.

See Also

ExceptionTable Class | Rail.MSIL Namespace


ExceptionTable.Sort Method

Sorts the exception blocks.

public void Sort();

See Also

ExceptionTable Class | Rail.MSIL Namespace


ILArgument Class

An instruction operating on a parameter

For a list of all members of this type, see ILArgument Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILArgument

public class ILArgument : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldarg, ldarg.s, ldarga ldarga.s, starg, starg.s,
            ldarg.0, ldarg.1, ldarg.2, ldarg.3

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILArgument Members | Rail.MSIL Namespace


ILArgument Members

ILArgument overview

Public Instance Constructors

ILArgument Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Parameter | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILArgument Class | Rail.MSIL Namespace


ILArgument Constructor

public ILArgument(
OpCode op,
RParameter param
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.ShortInlineR

See Also

ILArgument Class | Rail.MSIL Namespace


ILArgument Properties

The properties of the ILArgument class are listed below. For a complete list of ILArgument class members, see the ILArgument Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Parameter | Gets or sets the operand for this instruction

See Also

ILArgument Class | Rail.MSIL Namespace


ILArgument.Parameter Property

Gets or sets the operand for this instruction

public Rail.Reflect.RParameter Parameter {get; set;}

See Also

ILArgument Class | Rail.MSIL Namespace


ILBranch Class

Represents branch instructions.

For a list of all members of this type, see ILBranch Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILBranch

public class ILBranch : Instruction, ITargeter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

OpCode must be one of:

beq, beq.s, bge, bge.s, bge.un, bge.un.s, bgt, bgt.s, bgt.un,
            bgt.un.s, ble, ble.s, ble.un, ble.un.s, blt, blt.s, blt.un, blt.un.s,
            bne.un, bne.un.s, br, br.s, brfalse, brfalse.s, brtrue, brtrue.s,
            leave, leave.s

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILBranch Members | Rail.MSIL Namespace


ILBranch Members

ILBranch overview

Public Instance Constructors

ILBranch Constructor Creates a new branch instruction, with the given target instruction

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Target | The Instruction of branch destination

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
ContainsTarget | Verifies if the instruction has a matching target
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode | Resolves the length of the opcode.

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch Constructor

Creates a new branch instruction, with the given target instruction

public ILBranch(
OpCode op,
Instruction target
);

Parameters

op
The branch opcode.
target
The target instruction

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not one of
OperandType.InlineBrTarget
or
OperandType.ShortInlineBrTarget

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch Properties

The properties of the ILBranch class are listed below. For a complete list of ILBranch class members, see the ILBranch Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Target | The Instruction of branch destination

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch.Target Property

The Instruction of branch destination

public Instruction Target {get; set;}

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch Methods

The methods of the ILBranch class are listed below. For a complete list of ILBranch class members, see the ILBranch Members topic.

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
ContainsTarget | Verifies if the instruction has a matching target
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode | Resolves the length of the opcode.

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch.ContainsTarget Method

Verifies if the instruction has a matching target

public bool ContainsTarget(
Instruction ins
);

Parameters

ins
The instruction to verify

Return Value

True if the target matches ins

Implements

ITargeter.ContainsTarget

See Also

ILBranch Class | Rail.MSIL Namespace


ILBranch.ResolveOpcode Method

Resolves the length of the opcode.

protected override OpCode ResolveOpcode();

Return Value

A shorter form of the opcode if exitant and possible, otherwise inparam opcode.

Remarks

This method examines the relative length to the target instruction to determine if short form of the brNN code can be used instead.

See Also

ILBranch Class | Rail.MSIL Namespace


ILFactory Class

For a list of all members of this type, see ILFactory Members.

System.Object
Rail.MSIL.ILFactory

public sealed class ILFactory

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Guidelines: Instructions that have an .un (unsigned or unordered version) are represented only by one method, which takes a boolean parameter called signed. For instance:

public void Add_Ovf(bool signed);
The calli opcode/EmitCalli method is not supported. Use the underlying ILGenerator to emit it.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILFactory Members | Rail.MSIL Namespace


ILFactory Members

ILFactory overview

Public Static Methods

Add add - add numeric values
value1, value2 -> result
Add_Ovf add.ovf.<signed> - add integer values with overflow check
value1, value2 -> result
And and - bitwise AND
value1, value2 -> result
Arglist arglist - get argument list
… -> …
BeginExceptionBlock | Overloaded.
BeginFaultBlock
BeginFinallyBlock
Beq beq.<length> – branch on equal
value1, value2 -> …
Bge bge.<length> – branch on greater than or equal to bge.un.<length> – branch on greater/equal, unsigned or unordered
value1, value2 -> …
Bgt bgt.<length> – branch on greater than bgt.un.<length> – branch on greater than, unsigned or unordered
value1, value2 -> …
Ble ble._ – branch on less than or equal to ble.un._ – branch on less/equal, unsigned or unordered
value1, value2 -> …
Blt blt._ – branch on less than blt.un._ – branch on less than, unsigned or unordered
value1, value2 -> …
Bne_Un bne.un – branch on not equal or unordered
value1, value2 -> …
Box box – convert value type to object reference
valueType -> obj
Br Overloaded. br._ – unconditional branch
… -> …
Break break – breakpoint instruction
… -> …
BrS | Overloaded. Unconditional branch
Call call – call a method callvirt – call a method associated, at runtime, with an object
obj, arg1, arg2 … argn -> retVal (not always returned)
Castclass castclass – cast an object to a class
obj1 -> obj2
Ceq ceq - compare equal
value1, value2 -> result
Cgt cgt - compare greater than cgt.un - compare greater than, unsigned or unordered
value1, value2 -> result
Ckfinite ckfinite – check for a finite real number
value -> value
Clt clt - compare less than clt.un - compare less than, unsigned or unordered
value1, value2 -> result
Conv conv._to type - data conversion
value -> result
Conv_Ovf conv.ovf._to_type - data conversion with overflow detection conv.ovf._to_type.un – unsigned data conversion with overflow detection
value -> result
Cpblk cpblk - copy data from memory to memory
destaddr, srcaddr, size -> …
Cpobj cpobj - copy a value type
destValObj, srcValObj -> …
DefineInstruction | Define an instruction with the operanda as null
Div div - divide values div.un - divide integer values, unsigned
value1, value2 -> result
Dup dup – duplicate the top value of the stack
value -> value, value
EndExceptionBlock
Endfilter endfilter – end filter clause of SEH
value -> …
Endfinaly endfinally – end finally clause of an exception block
… -> …
Initblk initblk - initialize a block of memory to a value
addr, value, size -> …
Initobj initobj - initialize a value type
addrOfValObj -> …
Isinst isinst – test if an object is an instance of a class or interface
obj -> result
Jmp jmp – jump to method
… -> …
Ldarg ldarg.length - load argument onto the stack
… -> value
Ldarga ldarga.length - load an argument address
… -> address of argument number argNum
Ldc Overloaded. ldc.i4.x - load numeric constant
… -> num
Ldelem ldelem._type – load an element of an array
array, index -> value
Ldelema ldelema – load address of an element of an array
array, index -> address
Ldfld ldfld – load field of an object
obj -> value
Ldflda ldflda – load field address
obj -> address
Ldftn ldftn - load method pointer
… -> ftn
Ldind ldind._type_ - load value indirect onto the stack
addr -> value
Ldlen ldlen – load the length of an array
array -> length
Ldloc ldloc - load local variable onto the stack
… -> value
Ldloca ldloca._ - load local variable address
… -> address
Ldnull ldnull – load a null pointer
… -> null value
Ldobj ldobj - copy value type to the stack
addrOfValObj -> valObj
Ldsfld ldsfld – load static field of a class
… -> value
Ldsflda ldsflda – load static field address
… -> address
Ldstr ldstr – load a literal string
… -> string
Ldtoken Overloaded. ldtoken - load the runtime representation of a metadata token
… -> RuntimeHandle
Ldvirtftn ldvirtftn - load a virtual method pointer
object -> ftn
Leave leave._ – exit a protected region of code
… -> …
Localloc localloc – allocate space in the local dynamic memory pool
size -> address
Mkrefany mkrefany – push a typed reference on the stack
ptr -> typedRef
Mul mul - multiply values
value1, value2 -> result
Mul_Ovf mul.ovf - Multiply signed integer values. Signed result must fit in same size mul.ovf.un - Multiply unsigned integer values. Unsigned result must fit in same size ///
value1, value2 -> result
Neg neg - negate
value -> result
Newarr newarr – create a zero-based, one-dimensional array
numElems -> array
Newobj newobj – create a new object
arg1, … argN -> obj
Nop nop – no operation
… -> …
Not not - bitwise complement
value -> result
Or or - bitwise OR
value1, value2 -> result
Pop pop – remove the top element of the stack
value -> …
Refanytype refanytype – load the type out of a typed reference
TypedRef -> type
Refanyval refanyval – load the address out of a typed reference
TypedRef -> address
Rem rem - compute remainder rem.un - compute integer remainder, unsigned
value1, value2 -> result
Ret ret – return from method
retVal on callee evaluation stack (not always present)
           -> retVal on caller evaluation stack (not always present)
Rethrow rethrow – rethrow the current exception
… -> …
Shl shl - shift integer left
value, shiftAmount -> result
Shr shr - shift integer right shr.un - shift integer right, unsigned
value, shiftAmount -> result
Sizeof sizeof – load the size in bytes of a value type
… -> size (4 bytes, unsigned)
Starg starg._ - store a value in an argument slot
value -> …
Stelem stelem._type – store an element of an array
array, index, value -> …
Stfld stfld – store into a field of an object
obj, value -> …
Stind stind._type - store value indirect from stack
addr, value -> …
Stloc stloc - pop value from stack to local variable
value -> …
Stobj stobj - store a value type from the stack into memory
addr, valObj -> …
Stsfld stsfld – store a static field of a class
val -> …
Sub sub - subtract numeric values
value1, value2 -> result
Sub_Ovf sub.ovf - Subtract native int from a native int. Signed result must fit in same size sub.ovf.un - Subtract native unsigned int from a native unsigned int. Unsigned result must fit in same size
value, shiftAmount -> result
Switch switch – table switch on value
value -> …
Throw throw – throw an exception
obj -> …
Unbox unbox – Convert boxed value type to its raw form
obj -> valueTypePtr
Xor xor - bitwise XOR
value1, value2 -> result

Public Instance Constructors

ILFactory Constructor Initializes a new instance of the ILFactory class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory Constructor

Initializes a new instance of the ILFactory class.

public ILFactory();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory Methods

The methods of the ILFactory class are listed below. For a complete list of ILFactory class members, see the ILFactory Members topic.

Public Static Methods

Add add - add numeric values
value1, value2 -> result
Add_Ovf add.ovf.<signed> - add integer values with overflow check
value1, value2 -> result
And and - bitwise AND
value1, value2 -> result
Arglist arglist - get argument list
… -> …
BeginExceptionBlock | Overloaded.
BeginFaultBlock
BeginFinallyBlock
Beq beq.<length> – branch on equal
value1, value2 -> …
Bge bge.<length> – branch on greater than or equal to bge.un.<length> – branch on greater/equal, unsigned or unordered
value1, value2 -> …
Bgt bgt.<length> – branch on greater than bgt.un.<length> – branch on greater than, unsigned or unordered
value1, value2 -> …
Ble ble._ – branch on less than or equal to ble.un._ – branch on less/equal, unsigned or unordered
value1, value2 -> …
Blt blt._ – branch on less than blt.un._ – branch on less than, unsigned or unordered
value1, value2 -> …
Bne_Un bne.un – branch on not equal or unordered
value1, value2 -> …
Box box – convert value type to object reference
valueType -> obj
Br Overloaded. br._ – unconditional branch
… -> …
Break break – breakpoint instruction
… -> …
BrS | Overloaded. Unconditional branch
Call call – call a method callvirt – call a method associated, at runtime, with an object
obj, arg1, arg2 … argn -> retVal (not always returned)
Castclass castclass – cast an object to a class
obj1 -> obj2
Ceq ceq - compare equal
value1, value2 -> result
Cgt cgt - compare greater than cgt.un - compare greater than, unsigned or unordered
value1, value2 -> result
Ckfinite ckfinite – check for a finite real number
value -> value
Clt clt - compare less than clt.un - compare less than, unsigned or unordered
value1, value2 -> result
Conv conv._to type - data conversion
value -> result
Conv_Ovf conv.ovf._to_type - data conversion with overflow detection conv.ovf._to_type.un – unsigned data conversion with overflow detection
value -> result
Cpblk cpblk - copy data from memory to memory
destaddr, srcaddr, size -> …
Cpobj cpobj - copy a value type
destValObj, srcValObj -> …
DefineInstruction | Define an instruction with the operanda as null
Div div - divide values div.un - divide integer values, unsigned
value1, value2 -> result
Dup dup – duplicate the top value of the stack
value -> value, value
EndExceptionBlock
Endfilter endfilter – end filter clause of SEH
value -> …
Endfinaly endfinally – end finally clause of an exception block
… -> …
Initblk initblk - initialize a block of memory to a value
addr, value, size -> …
Initobj initobj - initialize a value type
addrOfValObj -> …
Isinst isinst – test if an object is an instance of a class or interface
obj -> result
Jmp jmp – jump to method
… -> …
Ldarg ldarg.length - load argument onto the stack
… -> value
Ldarga ldarga.length - load an argument address
… -> address of argument number argNum
Ldc Overloaded. ldc.i4.x - load numeric constant
… -> num
Ldelem ldelem._type – load an element of an array
array, index -> value
Ldelema ldelema – load address of an element of an array
array, index -> address
Ldfld ldfld – load field of an object
obj -> value
Ldflda ldflda – load field address
obj -> address
Ldftn ldftn - load method pointer
… -> ftn
Ldind ldind._type_ - load value indirect onto the stack
addr -> value
Ldlen ldlen – load the length of an array
array -> length
Ldloc ldloc - load local variable onto the stack
… -> value
Ldloca ldloca._ - load local variable address
… -> address
Ldnull ldnull – load a null pointer
… -> null value
Ldobj ldobj - copy value type to the stack
addrOfValObj -> valObj
Ldsfld ldsfld – load static field of a class
… -> value
Ldsflda ldsflda – load static field address
… -> address
Ldstr ldstr – load a literal string
… -> string
Ldtoken Overloaded. ldtoken - load the runtime representation of a metadata token
… -> RuntimeHandle
Ldvirtftn ldvirtftn - load a virtual method pointer
object -> ftn
Leave leave._ – exit a protected region of code
… -> …
Localloc localloc – allocate space in the local dynamic memory pool
size -> address
Mkrefany mkrefany – push a typed reference on the stack
ptr -> typedRef
Mul mul - multiply values
value1, value2 -> result
Mul_Ovf mul.ovf - Multiply signed integer values. Signed result must fit in same size mul.ovf.un - Multiply unsigned integer values. Unsigned result must fit in same size ///
value1, value2 -> result
Neg neg - negate
value -> result
Newarr newarr – create a zero-based, one-dimensional array
numElems -> array
Newobj newobj – create a new object
arg1, … argN -> obj
Nop nop – no operation
… -> …
Not not - bitwise complement
value -> result
Or or - bitwise OR
value1, value2 -> result
Pop pop – remove the top element of the stack
value -> …
Refanytype refanytype – load the type out of a typed reference
TypedRef -> type
Refanyval refanyval – load the address out of a typed reference
TypedRef -> address
Rem rem - compute remainder rem.un - compute integer remainder, unsigned
value1, value2 -> result
Ret ret – return from method
retVal on callee evaluation stack (not always present)
           -> retVal on caller evaluation stack (not always present)
Rethrow rethrow – rethrow the current exception
… -> …
Shl shl - shift integer left
value, shiftAmount -> result
Shr shr - shift integer right shr.un - shift integer right, unsigned
value, shiftAmount -> result
Sizeof sizeof – load the size in bytes of a value type
… -> size (4 bytes, unsigned)
Starg starg._ - store a value in an argument slot
value -> …
Stelem stelem._type – store an element of an array
array, index, value -> …
Stfld stfld – store into a field of an object
obj, value -> …
Stind stind._type - store value indirect from stack
addr, value -> …
Stloc stloc - pop value from stack to local variable
value -> …
Stobj stobj - store a value type from the stack into memory
addr, valObj -> …
Stsfld stsfld – store a static field of a class
val -> …
Sub sub - subtract numeric values
value1, value2 -> result
Sub_Ovf sub.ovf - Subtract native int from a native int. Signed result must fit in same size sub.ovf.un - Subtract native unsigned int from a native unsigned int. Unsigned result must fit in same size
value, shiftAmount -> result
Switch switch – table switch on value
value -> …
Throw throw – throw an exception
obj -> …
Unbox unbox – Convert boxed value type to its raw form
obj -> valueTypePtr
Xor xor - bitwise XOR
value1, value2 -> result

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Add Method

add - add numeric values

value1, value2 -> result

public static Instruction Add();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Add_Ovf Method

add.ovf.<signed> - add integer values with overflow check

value1, value2 -> result

public static Instruction Add_Ovf(
bool signed
);

Parameters

signed
Whether add.ovf or add.ovf.un should be used

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.And Method

and - bitwise AND

value1, value2 -> result

public static Instruction And();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Arglist Method

arglist - get argument list

… -> …

public static Instruction Arglist();

See Also

ILFactory Class | Rail.MSIL Namespace


BeginExceptionBlock Method

An NDoc Documented Class Library

ILFactory.BeginExceptionBlock Method

Overload List

public static Instruction BeginExceptionBlock(ExceptionBlock);

public static Instruction BeginExceptionBlock(ExceptionBlock,ExceptionHandler);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.BeginExceptionBlock Method (ExceptionBlock)

public static Instruction BeginExceptionBlock(
ExceptionBlock eb
);

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.BeginExceptionBlock Overload List


ILFactory.BeginExceptionBlock Method (ExceptionBlock, ExceptionHandler)

public static Instruction BeginExceptionBlock(
ExceptionBlock eb,
ExceptionHandler ch
);

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.BeginExceptionBlock Overload List


ILFactory.BeginFaultBlock Method

public static Instruction BeginFaultBlock(
ExceptionBlock eb
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.BeginFinallyBlock Method

public static Instruction BeginFinallyBlock(
ExceptionBlock eb
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Beq Method

beq.<length> – branch on equal

value1, value2 -> …

public static Instruction Beq(
Instruction target
);

Parameters

target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Bge Method

bge.<length> – branch on greater than or equal to bge.un.<length> – branch on greater/equal, unsigned or unordered

value1, value2 -> …

public static Instruction Bge(
bool signed,
Instruction target
);

Parameters

signed
Whether to use bge or bge.un
target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Bgt Method

bgt.<length> – branch on greater than bgt.un.<length> – branch on greater than, unsigned or unordered

value1, value2 -> …

public static Instruction Bgt(
bool signed,
Instruction target
);

Parameters

signed
If the instruction is signed
target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ble Method

ble._ – branch on less than or equal to ble.un._ – branch on less/equal, unsigned or unordered

value1, value2 -> …

public static Instruction Ble(
bool signed,
Instruction target
);

Parameters

signed
If the instruction is signed
target
the target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Blt Method

blt._ – branch on less than blt.un._ – branch on less than, unsigned or unordered

value1, value2 -> …

public static Instruction Blt(
bool signed,
Instruction target
);

Parameters

signed
If the instruction is signed
target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Bne_Un Method

bne.un – branch on not equal or unordered

value1, value2 -> …

public static Instruction Bne_Un(
Instruction target
);

Parameters

target

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Box Method

box – convert value type to object reference

valueType -> obj

public static Instruction Box(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


Br Method

An NDoc Documented Class Library

ILFactory.Br Method

br._ – unconditional branch

… -> …

Overload List

br._ – unconditional branch

… -> …

public static Instruction Br(Instruction);

brfalse._ - branch on false, null, or zero brtrue._ - branch on non-false or non-null

value -> …

public static Instruction Br(bool,Instruction);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Br Method (Instruction)

br._ – unconditional branch

… -> …

public static Instruction Br(
Instruction target
);

Parameters

target

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Br Overload List


ILFactory.Br Method (Boolean, Instruction)

brfalse._ - branch on false, null, or zero brtrue._ - branch on non-false or non-null

value -> …

public static Instruction Br(
bool condition,
Instruction target
);

Parameters

condition
True for
brtrue
, false for
brfalse
target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Br Overload List


ILFactory.Break Method

break – breakpoint instruction

… -> …

public static Instruction Break(
Instruction target
);

Parameters

target

See Also

ILFactory Class | Rail.MSIL Namespace


BrS Method

An NDoc Documented Class Library

ILFactory.BrS Method

Unconditional branch

Overload List

Unconditional branch

public static Instruction BrS(Instruction);

brfalse.S_ - branch on false, null, or zero brtrue.S_ - branch on non-false or non-null

value -> …

public static Instruction BrS(bool,Instruction);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.BrS Method (Instruction)

Unconditional branch

public static Instruction BrS(
Instruction target
);

Parameters

target

Return Value

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.BrS Overload List


ILFactory.BrS Method (Boolean, Instruction)

brfalse.S_ - branch on false, null, or zero brtrue.S_ - branch on non-false or non-null

value -> …

public static Instruction BrS(
bool condition,
Instruction target
);

Parameters

condition
True for
brtrue
, false for
brfalse
target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.BrS Overload List


ILFactory.Call Method

call – call a method callvirt – call a method associated, at runtime, with an object

obj, arg1, arg2 … argn -> retVal (not always returned)

public static Instruction Call(
bool callVirtual,
RMethodBase method
);

Parameters

callVirtual
Whether to call the method virtually or statically.
method
The method to be called. May be a ConstructorInfo or a MethodInfo.

Remarks

The obj argument is only necessary if calling an instance or virtual method.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Castclass Method

castclass – cast an object to a class

obj1 -> obj2

public static Instruction Castclass(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ceq Method

ceq - compare equal

value1, value2 -> result

public static Instruction Ceq();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Cgt Method

cgt - compare greater than cgt.un - compare greater than, unsigned or unordered

value1, value2 -> result

public static Instruction Cgt(
bool signed
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ckfinite Method

ckfinite – check for a finite real number

value -> value
public static Instruction Ckfinite();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Clt Method

clt - compare less than clt.un - compare less than, unsigned or unordered

value1, value2 -> result

public static Instruction Clt(
bool signed
);

Parameters

signed
Whether to use clt or clt.un

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Conv Method

conv._to type - data conversion

value -> result

public static Instruction Conv(
Type type
);

Parameters

type
The type for the conversion

Remarks

The given type may be one of the primitive types and IntPtr or UIntPtr. To emit the

conv.r.un
instruction use the internal
ILGenerator

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Conv_Ovf Method

conv.ovf._to_type - data conversion with overflow detection conv.ovf._to_type.un – unsigned data conversion with overflow detection

value -> result

public static Instruction Conv_Ovf(
bool signed,
Type type
);

Parameters

signed
Whether to use
conv_ovf
or conv.ovf._type.un
type

Remarks

The given type may be one of the primitive types including IntPtr and UIntPtr, but excluding floating point values.

ILGenerator

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Cpblk Method

cpblk - copy data from memory to memory

destaddr, srcaddr, size -> …

public static Instruction Cpblk();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Cpobj Method

cpobj - copy a value type

destValObj, srcValObj -> …

public static Instruction Cpobj(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.DefineInstruction Method

Define an instruction with the operanda as null

public static Instruction DefineInstruction(
OpCode ops
);

Parameters

ops
The opcode for the instructions

Return Value

The instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Div Method

div - divide values div.un - divide integer values, unsigned

value1, value2 -> result

public static Instruction Div(
bool signed
);

Parameters

signed
Whether to emit div or div.un

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Dup Method

dup – duplicate the top value of the stack

value -> value, value

public static Instruction Dup();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.EndExceptionBlock Method

public static Instruction EndExceptionBlock(
ExceptionBlock eb
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Endfilter Method

endfilter – end filter clause of SEH

value -> …

public static Instruction Endfilter();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Endfinaly Method

endfinally – end finally clause of an exception block

… -> …

public static Instruction Endfinaly();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Initblk Method

initblk - initialize a block of memory to a value

addr, value, size -> …

public static Instruction Initblk();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Initobj Method

initobj - initialize a value type

addrOfValObj -> …

public static Instruction Initobj(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Isinst Method

isinst – test if an object is an instance of a class or interface

obj -> result

public static Instruction Isinst(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Jmp Method

jmp – jump to method

… -> …

public static Instruction Jmp(
RMethodBase method
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldarg Method

ldarg.length - load argument onto the stack

… -> value

public static Instruction Ldarg(
RParameter parameter
);

Parameters

parameter
The parameter to be loaded.

Remarks

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldarga Method

ldarga.length - load an argument address

… -> address of argument number argNum

public static Instruction Ldarga(
RParameter parameter
);

Parameters

parameter

See Also

ILFactory Class | Rail.MSIL Namespace


Ldc Method

An NDoc Documented Class Library

ILFactory.Ldc Method

ldc.r8 - load numeric constant

… -> num

Overload List

ldc.r8 - load numeric constant

… -> num

public static Instruction Ldc(double);

ldc.i4.x - load numeric constant

… -> num

public static Instruction Ldc(int);

ldc.i8 - load numeric constant

… -> num

public static Instruction Ldc(long);

ldc.r4 - load numeric constant

… -> num

public static Instruction Ldc(float);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldc Method (Double)

ldc.r8 - load numeric constant

… -> num

public static Instruction Ldc(
double fConstant
);

Parameters

fConstant

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldc Overload List


ILFactory.Ldc Method (Int32)

ldc.i4.x - load numeric constant

… -> num

public static Instruction Ldc(
int iConst
);

Parameters

iConst

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldc Overload List


ILFactory.Ldc Method (Int64)

ldc.i8 - load numeric constant

… -> num

public static Instruction Ldc(
long lConstant
);

Parameters

lConstant

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldc Overload List


ILFactory.Ldc Method (Single)

ldc.r4 - load numeric constant

… -> num

public static Instruction Ldc(
float fConstant
);

Parameters

fConstant

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldc Overload List


ILFactory.Ldelem Method

ldelem._type – load an element of an array

array, index -> value

public static Instruction Ldelem(
Type t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldelema Method

ldelema – load address of an element of an array

array, index -> address

public static Instruction Ldelema(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldfld Method

ldfld – load field of an object

obj -> value

public static Instruction Ldfld(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldflda Method

ldflda – load field address

obj -> address

public static Instruction Ldflda(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldftn Method

ldftn - load method pointer

… -> ftn

public static Instruction Ldftn(
RMethodBase mi
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldind Method

ldind._type_ - load value indirect onto the stack

addr -> value

public static Instruction Ldind(
Type t
);

Parameters

t

Remarks

If

t
is not one of the CLR primitive types then it must be System.Object. In this case, a
ldind.ref
opcode is pushed onto the stack. Otherwise, an exception is raised.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldlen Method

ldlen – load the length of an array

array -> length

public static Instruction Ldlen();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldloc Method

ldloc - load local variable onto the stack

… -> value

public static Instruction Ldloc(
LocalVariable local
);

Parameters

local

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldloca Method

ldloca._ - load local variable address

… -> address

public static Instruction Ldloca(
LocalVariable local
);

Parameters

local

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldnull Method

ldnull – load a null pointer

… -> null value

public static Instruction Ldnull();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldobj Method

ldobj - copy value type to the stack

addrOfValObj -> valObj

public static Instruction Ldobj(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldsfld Method

ldsfld – load static field of a class

… -> value

public static Instruction Ldsfld(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldsflda Method

ldsflda – load static field address

… -> address

public static Instruction Ldsflda(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldstr Method

ldstr – load a literal string

… -> string

public static Instruction Ldstr(
string str
);

Parameters

str

See Also

ILFactory Class | Rail.MSIL Namespace


Ldtoken Method

An NDoc Documented Class Library

ILFactory.Ldtoken Method

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

Overload List

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(RField);

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(RMethod);

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(RType);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ldtoken Method (RField)

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldtoken Overload List


ILFactory.Ldtoken Method (RMethod)

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(
RMethod mi
);

Parameters

mi

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldtoken Overload List


ILFactory.Ldtoken Method (RType)

ldtoken - load the runtime representation of a metadata token

… -> RuntimeHandle

public static Instruction Ldtoken(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace | ILFactory.Ldtoken Overload List


ILFactory.Ldvirtftn Method

ldvirtftn - load a virtual method pointer

object -> ftn

public static Instruction Ldvirtftn(
RMethodBase mi
);

Parameters

mi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Leave Method

leave._ – exit a protected region of code

… -> …

public static Instruction Leave(
Instruction target
);

Parameters

target
The target instruction

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Localloc Method

localloc – allocate space in the local dynamic memory pool

size -> address

public static Instruction Localloc();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Mkrefany Method

mkrefany – push a typed reference on the stack

ptr -> typedRef

public static Instruction Mkrefany(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Mul Method

mul - multiply values

value1, value2 -> result

public static Instruction Mul();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Mul_Ovf Method

mul.ovf - Multiply signed integer values. Signed result must fit in same size mul.ovf.un - Multiply unsigned integer values. Unsigned result must fit in same size ///

value1, value2 -> result

public static Instruction Mul_Ovf(
bool signed
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Neg Method

neg - negate

value -> result

public static Instruction Neg();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Newarr Method

newarr – create a zero-based, one-dimensional array

numElems -> array

public static Instruction Newarr(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Newobj Method

newobj – create a new object

arg1, … argN -> obj

public static Instruction Newobj(
RConstructor ct
);

Parameters

ct

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Nop Method

nop – no operation

… -> …

public static Instruction Nop();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Not Method

not - bitwise complement

value -> result

public static Instruction Not();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Or Method

or - bitwise OR

value1, value2 -> result

public static Instruction Or();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Pop Method

pop – remove the top element of the stack

value -> …

public static Instruction Pop();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Refanytype Method

refanytype – load the type out of a typed reference

TypedRef -> type

public static Instruction Refanytype();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Refanyval Method

refanyval – load the address out of a typed reference

TypedRef -> address

public static Instruction Refanyval(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Rem Method

rem - compute remainder rem.un - compute integer remainder, unsigned

value1, value2 -> result

public static Instruction Rem(
bool signed
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Ret Method

ret – return from method

retVal on callee evaluation stack (not always present)
           -> retVal on caller evaluation stack (not always present)

public static Instruction Ret();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Rethrow Method

rethrow – rethrow the current exception

… -> …

public static Instruction Rethrow();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Shl Method

shl - shift integer left

value, shiftAmount -> result

public static Instruction Shl();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Shr Method

shr - shift integer right shr.un - shift integer right, unsigned

value, shiftAmount -> result

public static Instruction Shr(
bool signed
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Sizeof Method

sizeof – load the size in bytes of a value type

… -> size (4 bytes, unsigned)

public static Instruction Sizeof(
RType t
);

Parameters

t
Must be a value type.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Starg Method

starg._ - store a value in an argument slot

value -> …

public static Instruction Starg(
RParameter arg
);

Parameters

arg

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stelem Method

stelem._type – store an element of an array

array, index, value -> …

public static Instruction Stelem(
Type t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stfld Method

stfld – store into a field of an object

obj, value -> …

public static Instruction Stfld(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stind Method

stind._type - store value indirect from stack

addr, value -> …

public static Instruction Stind(
Type t
);

Parameters

t

Remarks

If

t
is not one of the CLR primitive types then it must be System.Object. In this case, a
ldind.ref
opcode is pushed onto the stack. Otherwise, an exception is raised.

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stloc Method

stloc - pop value from stack to local variable

value -> …

public static Instruction Stloc(
LocalVariable local
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stobj Method

stobj - store a value type from the stack into memory

addr, valObj -> …

public static Instruction Stobj(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Stsfld Method

stsfld – store a static field of a class

val -> …

public static Instruction Stsfld(
RField fi
);

Parameters

fi

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Sub Method

sub - subtract numeric values

value1, value2 -> result

public static Instruction Sub();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Sub_Ovf Method

sub.ovf - Subtract native int from a native int. Signed result must fit in same size sub.ovf.un - Subtract native unsigned int from a native unsigned int. Unsigned result must fit in same size

value, shiftAmount -> result

public static Instruction Sub_Ovf(
bool signed
);

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Switch Method

switch – table switch on value

value -> …

public static Instruction Switch(
Instruction[] targets
);

Parameters

targets
The jump points for this switch

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Throw Method

throw – throw an exception

obj -> …

public static Instruction Throw();

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Unbox Method

unbox – Convert boxed value type to its raw form

obj -> valueTypePtr

public static Instruction Unbox(
RType t
);

Parameters

t

See Also

ILFactory Class | Rail.MSIL Namespace


ILFactory.Xor Method

xor - bitwise XOR

value1, value2 -> result

public static Instruction Xor();

See Also

ILFactory Class | Rail.MSIL Namespace


ILField Class

An instruction taking a field as an argument

For a list of all members of this type, see ILField Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILField

public class ILField : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldfld, ldflda, ldsfld, ldsflda, stfld, stsfld

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILField Members | Rail.MSIL Namespace


ILField Members

ILField overview

Public Instance Constructors

ILField Constructor

Public Instance Properties

Field | Gets or sets the operand for this instruction
Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILField Class | Rail.MSIL Namespace


ILField Constructor

public ILField(
OpCode op,
RField field
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineField

See Also

ILField Class | Rail.MSIL Namespace


ILField Properties

The properties of the ILField class are listed below. For a complete list of ILField class members, see the ILField Members topic.

Public Instance Properties

Field | Gets or sets the operand for this instruction
Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

See Also

ILField Class | Rail.MSIL Namespace


ILField.Field Property

Gets or sets the operand for this instruction

public Rail.Reflect.RField Field {get; set;}

See Also

ILField Class | Rail.MSIL Namespace


ILLocalVariable Class

An instruction taking an index to a local variable

For a list of all members of this type, see ILLocalVariable Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILLocalVariable

public class ILLocalVariable : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldloc, ldloc.s, ldloca  ldloca.s, stloc, stloc.s, ldloc.0,
           ldloc.1, ldloc.2, ldloc.3, stloc.0, stloc.1, stloc.2, stloc.3

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILLocalVariable Members | Rail.MSIL Namespace


ILLocalVariable Members

ILLocalVariable overview

Public Instance Constructors

ILLocalVariable Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
Local | Gets or sets the operand for this instruction
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals | Overrides the Equals method
GetHashCode | Override of the GetHashCode method
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable Constructor

public ILLocalVariable(
OpCode op,
LocalVariable loc
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.ShortInlineR

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable Properties

The properties of the ILLocalVariable class are listed below. For a complete list of ILLocalVariable class members, see the ILLocalVariable Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
Local | Gets or sets the operand for this instruction
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable.Local Property

Gets or sets the operand for this instruction

public LocalVariable Local {get; set;}

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable Methods

The methods of the ILLocalVariable class are listed below. For a complete list of ILLocalVariable class members, see the ILLocalVariable Members topic.

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals | Overrides the Equals method
GetHashCode | Override of the GetHashCode method
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable.Equals Method

Overrides the Equals method

public override bool Equals(
object obj
);

Parameters

obj
The object to compare

Return Value

True if the objects are a match

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILLocalVariable.GetHashCode Method

Override of the GetHashCode method

public override int GetHashCode();

Return Value

The HashCode

See Also

ILLocalVariable Class | Rail.MSIL Namespace


ILMethod Class

An instruction taking an method as an argument

For a list of all members of this type, see ILMethod Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILMethod

public class ILMethod : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

call, callvirt, jmp, ldftn, ldvirtftn, newobj

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILMethod Members | Rail.MSIL Namespace


ILMethod Members

ILMethod overview

Public Instance Constructors

ILMethod Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
Method | Gets or sets the operand for this instruction
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILMethod Class | Rail.MSIL Namespace


ILMethod Constructor

public ILMethod(
OpCode op,
RMethodBase method
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineMethod

See Also

ILMethod Class | Rail.MSIL Namespace


ILMethod Properties

The properties of the ILMethod class are listed below. For a complete list of ILMethod class members, see the ILMethod Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
Method | Gets or sets the operand for this instruction
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

See Also

ILMethod Class | Rail.MSIL Namespace


ILMethod.Method Property

Gets or sets the operand for this instruction

public Rail.Reflect.RMethodBase Method {get; set;}

See Also

ILMethod Class | Rail.MSIL Namespace


ILNone Class

Represents instructions that take no operands.

For a list of all members of this type, see ILNone Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILNone

public class ILNone : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This class can only be used with one of the following OpCodes:

add, add.ovf, add.ovf.un, and, arglist, break, ceq, cgt, cgt.un, ckfinite,
clt, clt.un, conv.i, conv.i1, conv.i2, conv.i4, conv.i8, conv.ovf.i,
conv.ovf.i.un, conv.ovf.i1, conv.ovf.i1.un, conv.ovf.i2, conv.ovf.i2.un,
conv.ovf.i4,
conv.ovf.i4.un, conv.ovf.i8, conv.ovf.i8.un, conv.ovf.u, conv.ovf.u.un,
conv.ovf.u1, conv.ovf.u1.un, conv.ovf.u2, conv.ovf.u2.un, conv.ovf.u4,
conv.ovf.u4.un, conv.ovf.u8, conv.ovf.u8.un, conv.r.un, conv.r4,
conv.r8, conv.u, conv.u1, conv.u2, conv.u4, conv.u8, cpblk, div, div.un,
dup, endfault, endfilter, endfinally, initblk, ldc.i4.0, ldc.i4.1, ldc.i4.2, ldc.i4.3, ldc.i4.4,
ldc.i4.5, ldc.i4.6, ldc.i4.7, ldc.i4.8, ldc.i4.M1, ldelem.i, ldelem.i1,
ldelem.i2, ldelem.i4, ldelem.i8, ldelem.r4, ldelem.r8, ldelem.ref,
ldelem.u1, ldelem.u2, ldelem.u4, ldind.i, ldind.i1, ldind.i2, ldind.i4,
ldind.i8, ldind.r4, ldind.r8, ldind.ref, ldind.u1, ldind.u2, ldind.u4,
ldlen,  ldnull, localloc, mul, mul.ovf,  mul.ovf.un, neg, nop, not, or,
pop, refanytype, rem, rem.un, ret, rethrow, shl, shr, shr.un, stelem.i,
stelem.i1, stelem.i2, stelem.i4, stelem.i8,
stelem.r4, stelem.r8, stelem.ref, stind.i, stind.i1, stind.i2, stind.i4,
stind.i8, stind.r4, stind.r8, stind.ref, , sub, sub.ovf, sub.ovf.un, tail.,
throw, volatile., xor

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILNone Members | Rail.MSIL Namespace


ILNone Members

ILNone overview

Public Instance Constructors

ILNone Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILNone Class | Rail.MSIL Namespace


ILNone Constructor

public ILNone(
OpCode op
);

Parameters

op
The opcode for this instruction.

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineNone

See Also

ILNone Class | Rail.MSIL Namespace


ILOperandI2 Class

An instruction taking an Int16 as operand.

For a list of all members of this type, see ILOperandI2 Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILOperandI2

public class ILOperandI2 : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldc.i4.s, unaligned.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILOperandI2 Members | Rail.MSIL Namespace


ILOperandI2 Members

ILOperandI2 overview

Public Instance Constructors

ILOperandI2 Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand of this instruction.

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILOperandI2 Class | Rail.MSIL Namespace


ILOperandI2 Constructor

public ILOperandI2(
OpCode op,
short operand
);

Parameters

op
operand

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.ShortInlineI

See Also

ILOperandI2 Class | Rail.MSIL Namespace


ILOperandI2 Properties

The properties of the ILOperandI2 class are listed below. For a complete list of ILOperandI2 class members, see the ILOperandI2 Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand of this instruction.

See Also

ILOperandI2 Class | Rail.MSIL Namespace


ILOperandI2.Operand Property

Gets or sets the operand of this instruction.

public short Operand {get; set;}

See Also

ILOperandI2 Class | Rail.MSIL Namespace


ILOperandI4 Class

An instruction taking an Int32 as operand.

For a list of all members of this type, see ILOperandI4 Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILOperandI4

public class ILOperandI4 : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldc.i4

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILOperandI4 Members | Rail.MSIL Namespace


ILOperandI4 Members

ILOperandI4 overview

Public Instance Constructors

ILOperandI4 Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand of the instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILOperandI4 Class | Rail.MSIL Namespace


ILOperandI4 Constructor

public ILOperandI4(
OpCode op,
int operand
);

Parameters

op
operand

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineI

See Also

ILOperandI4 Class | Rail.MSIL Namespace


ILOperandI4 Properties

The properties of the ILOperandI4 class are listed below. For a complete list of ILOperandI4 class members, see the ILOperandI4 Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand of the instruction

See Also

ILOperandI4 Class | Rail.MSIL Namespace


ILOperandI4.Operand Property

Gets or sets the operand of the instruction

public int Operand {get; set;}

See Also

ILOperandI4 Class | Rail.MSIL Namespace


ILOperandI8 Class

An instruction taking an Int64 as operand

For a list of all members of this type, see ILOperandI8 Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILOperandI8

public class ILOperandI8 : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldc.i8

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILOperandI8 Members | Rail.MSIL Namespace


ILOperandI8 Members

ILOperandI8 overview

Public Instance Constructors

ILOperandI8 Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILOperandI8 Class | Rail.MSIL Namespace


ILOperandI8 Constructor

public ILOperandI8(
OpCode op,
long operand
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineI8

See Also

ILOperandI8 Class | Rail.MSIL Namespace


ILOperandI8 Properties

The properties of the ILOperandI8 class are listed below. For a complete list of ILOperandI8 class members, see the ILOperandI8 Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

See Also

ILOperandI8 Class | Rail.MSIL Namespace


ILOperandI8.Operand Property

Gets or sets the operand for this instruction

public long Operand {get; set;}

See Also

ILOperandI8 Class | Rail.MSIL Namespace


ILOperandR4 Class

An instruction taking Single (R4) as operand

For a list of all members of this type, see ILOperandR4 Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILOperandR4

public class ILOperandR4 : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldc.r4

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILOperandR4 Members | Rail.MSIL Namespace


ILOperandR4 Members

ILOperandR4 overview

Public Instance Constructors

ILOperandR4 Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILOperandR4 Class | Rail.MSIL Namespace


ILOperandR4 Constructor

public ILOperandR4(
OpCode op,
float operand
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.ShortInlineR

See Also

ILOperandR4 Class | Rail.MSIL Namespace


ILOperandR4 Properties

The properties of the ILOperandR4 class are listed below. For a complete list of ILOperandR4 class members, see the ILOperandR4 Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

See Also

ILOperandR4 Class | Rail.MSIL Namespace


ILOperandR4.Operand Property

Gets or sets the operand for this instruction

public float Operand {get; set;}

See Also

ILOperandR4 Class | Rail.MSIL Namespace


ILOperandR8 Class

An instruction taking Double (R8) as operand

For a list of all members of this type, see ILOperandR8 Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILOperandR8

public class ILOperandR8 : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldc.r8

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILOperandR8 Members | Rail.MSIL Namespace


ILOperandR8 Members

ILOperandR8 overview

Public Instance Constructors

ILOperandR8 Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILOperandR8 Class | Rail.MSIL Namespace


ILOperandR8 Constructor

public ILOperandR8(
OpCode op,
double operand
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.ShortInlineR

See Also

ILOperandR8 Class | Rail.MSIL Namespace


ILOperandR8 Properties

The properties of the ILOperandR8 class are listed below. For a complete list of ILOperandR8 class members, see the ILOperandR8 Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Operand | Gets or sets the operand for this instruction

See Also

ILOperandR8 Class | Rail.MSIL Namespace


ILOperandR8.Operand Property

Gets or sets the operand for this instruction

public double Operand {get; set;}

See Also

ILOperandR8 Class | Rail.MSIL Namespace


ILSig Class

An instruction taking a signature as argument. Not supported by this version.

For a list of all members of this type, see ILSig Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILSig

public class ILSig : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can only be

calli

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILSig Members | Rail.MSIL Namespace


ILSig Members

ILSig overview

Public Instance Constructors

ILSig Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILSig Class | Rail.MSIL Namespace


ILSig Constructor

public ILSig(
OpCode op,
string str
);

Exceptions

Exception Type | Condition
NotSupportedException | Always!

See Also

ILSig Class | Rail.MSIL Namespace


ILString Class

An instruction taking a String as an argument

For a list of all members of this type, see ILString Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILString

public class ILString : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldstr

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILString Members | Rail.MSIL Namespace


ILString Members

ILString overview

Public Instance Constructors

ILString Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
String | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILString Class | Rail.MSIL Namespace


ILString Constructor

public ILString(
OpCode op,
string str
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineField

See Also

ILString Class | Rail.MSIL Namespace


ILString Properties

The properties of the ILString class are listed below. For a complete list of ILString class members, see the ILString Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
String | Gets or sets the operand for this instruction

See Also

ILString Class | Rail.MSIL Namespace


ILString.String Property

Gets or sets the operand for this instruction

public string String {get; set;}

See Also

ILString Class | Rail.MSIL Namespace


ILSwitch Class

Represents a switch instruction

For a list of all members of this type, see ILSwitch Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILSwitch

public class ILSwitch : Instruction, ITargeter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can only be the opcode

switch

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILSwitch Members | Rail.MSIL Namespace


ILSwitch Members

ILSwitch overview

Public Instance Constructors

ILSwitch Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Targets | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
ContainsTarget | Verify if the instruction is one of the targets
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILSwitch Class | Rail.MSIL Namespace


ILSwitch Constructor

public ILSwitch(
OpCode op,
Instruction[] targets
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineSwitch

See Also

ILSwitch Class | Rail.MSIL Namespace


ILSwitch Properties

The properties of the ILSwitch class are listed below. For a complete list of ILSwitch class members, see the ILSwitch Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Targets | Gets or sets the operand for this instruction

See Also

ILSwitch Class | Rail.MSIL Namespace


ILSwitch.Targets Property

Gets or sets the operand for this instruction

public Instruction[] Targets {get; set;}

See Also

ILSwitch Class | Rail.MSIL Namespace


ILSwitch Methods

The methods of the ILSwitch class are listed below. For a complete list of ILSwitch class members, see the ILSwitch Members topic.

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
ContainsTarget | Verify if the instruction is one of the targets
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILSwitch Class | Rail.MSIL Namespace


ILSwitch.ContainsTarget Method

Verify if the instruction is one of the targets

public bool ContainsTarget(
Instruction ins
);

Parameters

ins
The instruction to check

Return Value

True if the instruction is one of the targets

Implements

ITargeter.ContainsTarget

See Also

ILSwitch Class | Rail.MSIL Namespace


ILToken Class

An instruction taking a metadata token as argument

For a list of all members of this type, see ILToken Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILToken

public class ILToken : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

ldtoken

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILToken Members | Rail.MSIL Namespace


ILToken Members

ILToken overview

Public Instance Constructors

ILToken Constructor Creates a ILToken instruction

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Token | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILToken Class | Rail.MSIL Namespace


ILToken Constructor

Creates a ILToken instruction

public ILToken(
OpCode op,
RMember token
);

Parameters

op
The OpCode of the instruction
token
The MethodBase operand for the instruction

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineTok

See Also

ILToken Class | Rail.MSIL Namespace


ILToken Properties

The properties of the ILToken class are listed below. For a complete list of ILToken class members, see the ILToken Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Token | Gets or sets the operand for this instruction

See Also

ILToken Class | Rail.MSIL Namespace


ILToken.Token Property

Gets or sets the operand for this instruction

public Rail.Reflect.RMember Token {get; set;}

See Also

ILToken Class | Rail.MSIL Namespace


ILType Class

An instruction taking a type as an argument

For a list of all members of this type, see ILType Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILType

public class ILType : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Can be one of the following opcodes:

box, castclass, cpobj, initobj, isinst, ldelema, ldobj, mkrefany,
            newarr, refanyval, sizeof, stobj, unbox

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILType Members | Rail.MSIL Namespace


ILType Members

ILType overview

Public Instance Constructors

ILType Constructor

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Type | Gets or sets the operand for this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString (inherited from Instruction) | Returns a string representation of this instruction.

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILType Class | Rail.MSIL Namespace


ILType Constructor

public ILType(
OpCode op,
RType typed
);

Exceptions

Exception Type Condition
ArgumentException If the opcode's operand type is not
OperandType.InlineField

See Also

ILType Class | Rail.MSIL Namespace


ILType Properties

The properties of the ILType class are listed below. For a complete list of ILType class members, see the ILType Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction
Type | Gets or sets the operand for this instruction

See Also

ILType Class | Rail.MSIL Namespace


ILType.Type Property

Gets or sets the operand for this instruction

public Rail.Reflect.RType Type {get; set;}

See Also

ILType Class | Rail.MSIL Namespace


ILVirtualException Class

A "virtual" instruction that is inserted by MSIL.Code.Write to represent a BeginExceptionBlock, BeginCatchBlock, BeginFinallyBlock, BeginFaultBlock, BeginFilterBlock, EndExceptionBlock (to hopefully simplify Instruction.Write)

For a list of all members of this type, see ILVirtualException Members.

System.Object
Rail.MSIL.Instruction
Rail.MSIL.ILVirtualException

public class ILVirtualException : Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ILVirtualException Members | Rail.MSIL Namespace


ILVirtualException Members

ILVirtualException overview

Public Instance Constructors

ILVirtualException Overloaded. Initializes a new instance of the ILVirtualException class.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
LastInstructionIndex |
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString |
WillEmitLeave |

Protected Instance Fields

op (inherited from Instruction) | The OpCode associated with the instruction
targeters (inherited from Instruction) | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException Constructor

Create a BeginExceptionBlock (if true), or EndExceptionBlock (if false)

Overload List

Create a Fault, Filter or Finally block

public ILVirtualException(ExceptionBlock,ExceptionHandlerType);

Create a CatchBlock

public ILVirtualException(ExceptionBlock,ExceptionHandlerType,RType);

Create a BeginExceptionBlock (if true), or EndExceptionBlock (if false)

public ILVirtualException(ExceptionBlock,bool);

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException Constructor (ExceptionBlock, Boolean)

Create a BeginExceptionBlock (if true), or EndExceptionBlock (if false)

public ILVirtualException(
ExceptionBlock eb,
bool beginBlock
);

Parameters

eb
beginBlock

See Also

ILVirtualException Class | Rail.MSIL Namespace | ILVirtualException Constructor Overload List


ILVirtualException Constructor (ExceptionBlock, ExceptionHandlerType)

Create a Fault, Filter or Finally block

public ILVirtualException(
ExceptionBlock eb,
ExceptionHandlerType handlerType
);

Parameters

eb
handlerType

See Also

ILVirtualException Class | Rail.MSIL Namespace | ILVirtualException Constructor Overload List


ILVirtualException Constructor (ExceptionBlock, ExceptionHandlerType, RType)

Create a CatchBlock

public ILVirtualException(
ExceptionBlock eb,
ExceptionHandlerType handlerType,
RType exceptionType
);

Parameters

eb
handlerType
exceptionType

See Also

ILVirtualException Class | Rail.MSIL Namespace | ILVirtualException Constructor Overload List


ILVirtualException Properties

The properties of the ILVirtualException class are listed below. For a complete list of ILVirtualException class members, see the ILVirtualException Members topic.

Public Instance Properties

Index (inherited from Instruction) | Gets the index of this instruction relative to the beginning of the method
LastInstructionIndex |
OpCode (inherited from Instruction) | Gets or sets the opcode of this instruction

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException.LastInstructionIndex Property

public int LastInstructionIndex {get;}

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException Methods

The methods of the ILVirtualException class are listed below. For a complete list of ILVirtualException class members, see the ILVirtualException Members topic.

Public Instance Methods

AddTargeter (inherited from Instruction) | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters (inherited from Instruction) | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf (inherited from Instruction) | Checks if this instruction is a target of another.
ToString |
WillEmitLeave |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode (inherited from Instruction) | Resolves the opcode for a better replacement.

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException.ToString Method

public override string ToString();

See Also

ILVirtualException Class | Rail.MSIL Namespace


ILVirtualException.WillEmitLeave Method

public bool WillEmitLeave();

See Also

ILVirtualException Class | Rail.MSIL Namespace


Instruction Class

Represents an MSIL instruction, i.e., an opcode and its operand.

For a list of all members of this type, see Instruction Members.

System.Object
Rail.MSIL.Instruction
Derived types

public abstract class Instruction

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

Instruction Members | Rail.MSIL Namespace


Instruction Members

Instruction overview

Public Static Methods

TransferExceptions | Change start and finish pointers from within the ExceptionBlock to point at replace instead of orig. Also see TransferTargeters
TransferTargeters | Look at all the Instructions that target orig, and change them to point to replace. (Supports retargeting ILBranches and ILSwitches). Also see TransferExceptions

Public Instance Properties

Index | Gets the index of this instruction relative to the beginning of the method
OpCode | Gets or sets the opcode of this instruction

Public Instance Methods

AddTargeter | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf | Checks if this instruction is a target of another.
ToString | Returns a string representation of this instruction.

Protected Instance Constructors

Instruction Constructor

Protected Instance Fields

op | The OpCode associated with the instruction
targeters | The instructions that target this one.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode | Resolves the opcode for a better replacement.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction Constructor

protected Instruction(
OpCode op
);

Parameters

op

See Also

Instruction Class | Rail.MSIL Namespace


Instruction Fields

The fields of the Instruction class are listed below. For a complete list of Instruction class members, see the Instruction Members topic.

Protected Instance Fields

op | The OpCode associated with the instruction
targeters | The instructions that target this one.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.op Field

The OpCode associated with the instruction

protected readonly OpCode op;

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.targeters Field

The instructions that target this one.

protected IList targeters;

Remarks

Most instructions will not be targeted by others. Therefore, in order to save space, this arraylist is only initialized when a target is added.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction Properties

The properties of the Instruction class are listed below. For a complete list of Instruction class members, see the Instruction Members topic.

Public Instance Properties

Index | Gets the index of this instruction relative to the beginning of the method
OpCode | Gets or sets the opcode of this instruction

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.Index Property

Gets the index of this instruction relative to the beginning of the method

public int Index {get;}

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.OpCode Property

Gets or sets the opcode of this instruction

public System.Reflection.Emit.OpCode OpCode {get;}

See Also

Instruction Class | Rail.MSIL Namespace


Instruction Methods

The methods of the Instruction class are listed below. For a complete list of Instruction class members, see the Instruction Members topic.

Public Static Methods

TransferExceptions | Change start and finish pointers from within the ExceptionBlock to point at replace instead of orig. Also see TransferTargeters
TransferTargeters | Look at all the Instructions that target orig, and change them to point to replace. (Supports retargeting ILBranches and ILSwitches). Also see TransferExceptions

Public Instance Methods

AddTargeter | Adds a new targeter to this instruction.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetTargeters | Returns the list of instructions that target this instruction.
GetType (inherited from Object) | Gets the Type of the current instance.
IsTargetOf | Checks if this instruction is a target of another.
ToString | Returns a string representation of this instruction.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
ResolveOpcode | Resolves the opcode for a better replacement.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.AddTargeter Method

Adds a new targeter to this instruction.

public void AddTargeter(
ITargeter ins
);

Parameters

ins

Remarks

If the given instruction is already a targeter of this one, this method returns silently.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.GetTargeters Method

Returns the list of instructions that target this instruction.

public IEnumerator GetTargeters();

Return Value

Remarks

If this instruction has no targeters, null is returned. Otherwise, a enumerator of ITargeter instances is returned.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.IsTargetOf Method

Checks if this instruction is a target of another.

public bool IsTargetOf(
ITargeter ins
);

Parameters

ins

Return Value

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.ResolveOpcode Method

Resolves the opcode for a better replacement.

protected virtual OpCode ResolveOpcode();

Return Value

If shorter, faster or other form of the current opcode exist and it is possible to replace such under circumstances it is returned, otherwise the current opcode is returned.

Remarks

This implementation just returns the current opcode. It is up to subtypes to override this method.

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.ToString Method

Returns a string representation of this instruction.

public override string ToString();

Return Value

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.TransferExceptions Method

Change start and finish pointers from within the ExceptionBlock to point at replace instead of orig. Also see TransferTargeters

public static void TransferExceptions(
ExceptionTable et,
Instruction orig,
Instruction replace
);

Parameters

et
The ExceptionTable to traverse
orig
The original instruction
replace
The new instruction that will replace orig

See Also

Instruction Class | Rail.MSIL Namespace


Instruction.TransferTargeters Method

Look at all the Instructions that target orig, and change them to point to replace. (Supports retargeting ILBranches and ILSwitches). Also see TransferExceptions

public static void TransferTargeters(
Instruction orig,
Instruction replace
);

Parameters

orig
The original instruction
replace
The new instruction that will replace orig

See Also

Instruction Class | Rail.MSIL Namespace


ITargeter Interface

Represents an instruction that targets other instructions (branches and swithces)

For a list of all members of this type, see ITargeter Members.

public interface ITargeter

Types that implement ITargeter

Type | Description
ILBranch | Represents branch instructions.
ILSwitch | Represents a switch instruction

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

ITargeter Members | Rail.MSIL Namespace


ITargeter Members

ITargeter overview

Public Instance Methods

ContainsTarget If the given instruction is a target of this instruction.

See Also

ITargeter Interface | Rail.MSIL Namespace


ITargeter Methods

The methods of the ITargeter interface are listed below. For a complete list of ITargeter interface members, see the ITargeter Members topic.

Public Instance Methods

ContainsTarget If the given instruction is a target of this instruction.

See Also

ITargeter Interface | Rail.MSIL Namespace


ITargeter.ContainsTarget Method

If the given instruction is a target of this instruction.

bool ContainsTarget(
Instruction ins
);

Parameters

ins

Return Value

See Also

ITargeter Interface | Rail.MSIL Namespace


LocalVariable Class

Represents a local variable of a method

For a list of all members of this type, see LocalVariable Members.

System.Object
Rail.MSIL.LocalVariable

public class LocalVariable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

LocalVariable Members | Rail.MSIL Namespace


LocalVariable Members

LocalVariable overview

Public Instance Properties

Method | Gets the method to which this local variable belongs to.
Type | Gets or sets the type of this local variable. Changing the type without fixing the instruction stream will most likely corrupt it.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

LocalVariable Class | Rail.MSIL Namespace


LocalVariable Properties

The properties of the LocalVariable class are listed below. For a complete list of LocalVariable class members, see the LocalVariable Members topic.

Public Instance Properties

Method | Gets the method to which this local variable belongs to.
Type | Gets or sets the type of this local variable. Changing the type without fixing the instruction stream will most likely corrupt it.

See Also

LocalVariable Class | Rail.MSIL Namespace


LocalVariable.Method Property

Gets the method to which this local variable belongs to.

public MethodBody Method {get;}

See Also

LocalVariable Class | Rail.MSIL Namespace


LocalVariable.Type Property

Gets or sets the type of this local variable. Changing the type without fixing the instruction stream will most likely corrupt it.

public Rail.Reflect.RType Type {get; set;}

See Also

LocalVariable Class | Rail.MSIL Namespace


MetadataResolver Class

Utility class used to resolve the metadata tokens into user level objects like RType, RField and RMethod.

For a list of all members of this type, see MetadataResolver Members.

System.Object
Rail.MSIL.MetadataResolver

public sealed class MetadataResolver

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

MetadataResolver Members | Rail.MSIL Namespace


MetadataResolver Members

MetadataResolver overview

Public Static Methods

GetBlobSizeToRead |
SetBlobReadPosition |
USStream | read the string from the userstrings stream

Public Instance Constructors

MetadataResolver Constructor Each instance will have a predefined context, which consists of the low level object
Assmbl
used to obtain physical data and a high level object
RAssembly
used to obtain the high level representations.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ResolveField | Converts a field token into a RField
ResolveMethod | Overloaded. Converts a method token into a RMethod
ResolveSig | Resolves a InlineSig token.
ResolveString | Resolves a string token.
ResolveToken Resolves a metadada token like the one that follows a
ldtoken
instruction. The return value may be a RType, a RField or a RMethod.
ResolveType | Converts a type token into a RType.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver Constructor

Each instance will have a predefined context, which consists of the low level object

Assmbl
used to obtain physical data and a high level object
RAssembly
used to obtain the high level representations.

public MetadataResolver(
Image assmLoader,
RAssemblyDef assmRail
);

Parameters

assmLoader
The object with the metadata information of the assembly.
assmRail
The final representation of the assembly being loaded.

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver Methods

The methods of the MetadataResolver class are listed below. For a complete list of MetadataResolver class members, see the MetadataResolver Members topic.

Public Static Methods

GetBlobSizeToRead |
SetBlobReadPosition |
USStream | read the string from the userstrings stream

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ResolveField | Converts a field token into a RField
ResolveMethod | Overloaded. Converts a method token into a RMethod
ResolveSig | Resolves a InlineSig token.
ResolveString | Resolves a string token.
ResolveToken Resolves a metadada token like the one that follows a
ldtoken
instruction. The return value may be a RType, a RField or a RMethod.
ResolveType | Converts a type token into a RType.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.GetBlobSizeToRead Method

public static int GetBlobSizeToRead(
byte[] blobStream,
out int finalPosition,
int startPosition
);

Parameters

blobStream
finalPosition
startPosition

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.ResolveField Method

Converts a field token into a RField

public RField ResolveField(
int fieldToken
);

Parameters

fieldToken

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


ResolveMethod Method

An NDoc Documented Class Library

MetadataResolver.ResolveMethod Method

Converts a method token into a RMethod

Overload List

Converts a method token into a RMethod

public RMethodBase ResolveMethod(TokenType,int);

Converts a method token into a RMethod

public RMethodBase ResolveMethod(int);

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.ResolveMethod Method (TokenType, Int32)

Converts a method token into a RMethod

public RMethodBase ResolveMethod(
TokenType tType,
int RID
);

Parameters

tType
The token type
RID
the index

Return Value

The RMethodBase corresponding

See Also

MetadataResolver Class | Rail.MSIL Namespace | MetadataResolver.ResolveMethod Overload List


MetadataResolver.ResolveMethod Method (Int32)

Converts a method token into a RMethod

public RMethodBase ResolveMethod(
int methodToken
);

Parameters

methodToken
The token of the method

Return Value

The RMethodBase corresponding

See Also

MetadataResolver Class | Rail.MSIL Namespace | MetadataResolver.ResolveMethod Overload List


MetadataResolver.ResolveSig Method

Resolves a InlineSig token.

public string ResolveSig(
int token
);

Parameters

token
The metadata token

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.ResolveString Method

Resolves a string token.

public string ResolveString(
int stringToken
);

Parameters

stringToken
32-bit metadata string token.

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.ResolveToken Method

Resolves a metadada token like the one that follows a

ldtoken
instruction. The return value may be a RType, a RField or a RMethod.

public RMember ResolveToken(
int token
);

Parameters

token
The metadata token

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.ResolveType Method

Converts a type token into a RType.

public RType ResolveType(
int typeToken
);

Parameters

typeToken

Return Value

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.SetBlobReadPosition Method

public static void SetBlobReadPosition(
byte[] blobStream,
out int finalPosition,
int startPosition
);

Parameters

blobStream
finalPosition
startPosition

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.USStream Method

read the string from the userstrings stream

public static string USStream(
byte[] stream,
int index
);

See Also

MetadataResolver Class | Rail.MSIL Namespace


MetadataResolver.TypeDefOrRefTag Enumeration

TypeDefOrRef Tag

public enum MetadataResolver.TypeDefOrRefTag

Members

Member Name | Description
TypeDef |
TypeRef |
TypeSpec |

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

Rail.MSIL Namespace


MethodBody Class

Represents a method body

For a list of all members of this type, see MethodBody Members.

System.Object
Rail.MSIL.MethodBody

public class MethodBody

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

MethodBody Members | Rail.MSIL Namespace


MethodBody Members

MethodBody overview

Public Instance Constructors

MethodBody Constructor Public contructor for creating a new and empty MethodBody object

Public Instance Properties

Code | Gets or sets the Code object of the MethodBody
ExceptionTable | Returns the table with the exceptions defined in these method
LocalVarsCount | Returns the number of local variables
MaxStack | Gets or sets the maximum size of the stack for this method.
RMethod | Gets the method corresponding to this method body.

Public Instance Methods

DefineLocalVariable | Useful to create a new LocalVariable
Equals | Override of the Equals Method
GetCode | Creates an iterator for traversing the method body.
GetHashCode | Override of the GetHashCode method
GetLocalVar | Returns local variable define on this method.
GetType (inherited from Object) | Gets the Type of the current instance.
RemoveLocalVariable | Removes a local variable.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateLocalsIndex | Useful for updating the LocalVariables index

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody Constructor

Public contructor for creating a new and empty MethodBody object

public MethodBody(
RMethodBase rMBase
);

Parameters

rMBase
The MethodBase that owns the MethodBody

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody Properties

The properties of the MethodBody class are listed below. For a complete list of MethodBody class members, see the MethodBody Members topic.

Public Instance Properties

Code | Gets or sets the Code object of the MethodBody
ExceptionTable | Returns the table with the exceptions defined in these method
LocalVarsCount | Returns the number of local variables
MaxStack | Gets or sets the maximum size of the stack for this method.
RMethod | Gets the method corresponding to this method body.

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.Code Property

Gets or sets the Code object of the MethodBody

public Code Code {get; set;}

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.ExceptionTable Property

Returns the table with the exceptions defined in these method

public ExceptionTable ExceptionTable {get; set;}

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.LocalVarsCount Property

Returns the number of local variables

public int LocalVarsCount {get;}

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.MaxStack Property

Gets or sets the maximum size of the stack for this method.

public int MaxStack {get; set;}

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.RMethod Property

Gets the method corresponding to this method body.

public Rail.Reflect.RMethodBase RMethod {get; set;}

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody Methods

The methods of the MethodBody class are listed below. For a complete list of MethodBody class members, see the MethodBody Members topic.

Public Instance Methods

DefineLocalVariable | Useful to create a new LocalVariable
Equals | Override of the Equals Method
GetCode | Creates an iterator for traversing the method body.
GetHashCode | Override of the GetHashCode method
GetLocalVar | Returns local variable define on this method.
GetType (inherited from Object) | Gets the Type of the current instance.
RemoveLocalVariable | Removes a local variable.
ToString (inherited from Object) | Returns a String that represents the current Object.
UpdateLocalsIndex | Useful for updating the LocalVariables index

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.DefineLocalVariable Method

Useful to create a new LocalVariable

public LocalVariable DefineLocalVariable(
RType type
);

Parameters

type
The RType of the LocalVariable to create

Return Value

The newly created LocalVariable

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.Equals Method

Override of the Equals Method

public override bool Equals(
object obj
);

Parameters

obj
The object to compare with

Return Value

True if the objects are a match

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.GetCode Method

Creates an iterator for traversing the method body.

public Code GetCode();

Return Value

A

Code
instance.

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.GetHashCode Method

Override of the GetHashCode method

public override int GetHashCode();

Return Value

The HashCode

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.GetLocalVar Method

Returns local variable define on this method.

public LocalVariable GetLocalVar(
int index
);

Parameters

index
The position where the LocalVariable appears

Return Value

The request LocalVariable

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.RemoveLocalVariable Method

Removes a local variable.

public void RemoveLocalVariable(
int index
);

Parameters

index
The index of the LocalVariable to remove

Remarks

All indexes higher than the one that is removed will shift one position down.

See Also

MethodBody Class | Rail.MSIL Namespace


MethodBody.UpdateLocalsIndex Method

Useful for updating the LocalVariables index

public void UpdateLocalsIndex();

See Also

MethodBody Class | Rail.MSIL Namespace


OpCodesClassifier Class

For a list of all members of this type, see OpCodesClassifier Members.

System.Object
Rail.MSIL.OpCodesClassifier

public sealed class OpCodesClassifier

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The opcodes that have their operands encoded on its name don't take any argument and therefore are classified as OperandType.InlineNone. This is the case of ldarg_0, ldarg_1, ldloc_0 and so on. But for the purposes of the rail API, these instructions should be associated with an object of type

RParameter
or
LocalVariable
, which provide more information than simply the index of the variable. So, these opcodes should always be associated with an argument. This means that they should not be used with the
ILNone
class, which does not allow for any argument. This also means that for the purposes of the Rail API, these Opcodes should be classified as taking an argument instead of the classification made by the .Net Framework. This class provides a suitable classification of opcodes for the Rail API.

Requirements

Namespace: Rail.MSIL

Assembly: RAIL (in RAIL.dll)

See Also

OpCodesClassifier Members | Rail.MSIL Namespace


OpCodesClassifier Members

OpCodesClassifier overview

Public Static Fields

ARGS | The array of OpCodes that work with arguments
ARGS_SET | The Set for the ARGS array
BRANCH | Array of OpCodes of braches
BRANCH_SET | The Set for the BRANCH array
LOCALS | Array of OpCodes that work with LocalVariable
LOCALS_SET | The Set for the array of LOCALS
NO_ARGS | Array of OpCodes with no arguments
NO_ARGS_SET | The HashedSet for the NO_ARGS array

Public Static Methods

IsArgs | To verify if the opcode is in ARGS array
IsBranch | To verify if the opcode is in BRANCH array
IsLocalVariable | To verify if the opcode is in LOCALS array
IsNoArg | To verify if the opcode is in NO_ARGS array

Public Instance Constructors

OpCodesClassifier Constructor Initializes a new instance of the OpCodesClassifier class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier Constructor

Initializes a new instance of the OpCodesClassifier class.

public OpCodesClassifier();

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier Fields

The fields of the OpCodesClassifier class are listed below. For a complete list of OpCodesClassifier class members, see the OpCodesClassifier Members topic.

Public Static Fields

ARGS | The array of OpCodes that work with arguments
ARGS_SET | The Set for the ARGS array
BRANCH | Array of OpCodes of braches
BRANCH_SET | The Set for the BRANCH array
LOCALS | Array of OpCodes that work with LocalVariable
LOCALS_SET | The Set for the array of LOCALS
NO_ARGS | Array of OpCodes with no arguments
NO_ARGS_SET | The HashedSet for the NO_ARGS array

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.ARGS Field

The array of OpCodes that work with arguments

public static readonly OpCode[] ARGS;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.ARGS_SET Field

The Set for the ARGS array

public static readonly Set ARGS_SET;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.BRANCH Field

Array of OpCodes of braches

public static readonly OpCode[] BRANCH;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.BRANCH_SET Field

The Set for the BRANCH array

public static readonly Set BRANCH_SET;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.LOCALS Field

Array of OpCodes that work with LocalVariable

public static readonly OpCode[] LOCALS;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.LOCALS_SET Field

The Set for the array of LOCALS

public static readonly Set LOCALS_SET;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.NO_ARGS Field

Array of OpCodes with no arguments

public static readonly OpCode[] NO_ARGS;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.NO_ARGS_SET Field

The HashedSet for the NO_ARGS array

public static readonly HashedSet NO_ARGS_SET;

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier Methods

The methods of the OpCodesClassifier class are listed below. For a complete list of OpCodesClassifier class members, see the OpCodesClassifier Members topic.

Public Static Methods

IsArgs | To verify if the opcode is in ARGS array
IsBranch | To verify if the opcode is in BRANCH array
IsLocalVariable | To verify if the opcode is in LOCALS array
IsNoArg | To verify if the opcode is in NO_ARGS array

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.IsArgs Method

To verify if the opcode is in ARGS array

public static bool IsArgs(
OpCode op
);

Parameters

op
The OpCode to check

Return Value

True if the OpCode is in ARGS array

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.IsBranch Method

To verify if the opcode is in BRANCH array

public static bool IsBranch(
OpCode op
);

Parameters

op
The OpCode to check

Return Value

True if the OpCode is in BRANCH array

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.IsLocalVariable Method

To verify if the opcode is in LOCALS array

public static bool IsLocalVariable(
OpCode op
);

Parameters

op
The OpCode to check

Return Value

True if the OpCode is in LOCALS array

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


OpCodesClassifier.IsNoArg Method

To verify if the opcode is in NO_ARGS array

public static bool IsNoArg(
OpCode op
);

Parameters

op
The OpCode to check

Return Value

True if the OpCode is in NO_ARGS array

See Also

OpCodesClassifier Class | Rail.MSIL Namespace


Rail.Reflect

An NDoc Documented Class Library

Rail.Reflect Namespace

Namespace hierarchy

Classes

Class | Description
ARRAY |
ARRAY.ArrayShape |
AssemblyReadException | Summary description for AssemblyReadException.
CLASS |
CustomAttributeOwner |
CustomMod | The Custom Mod in signature, RetType and Param
FieldSig | FieldSig
FNPTR |
LocalVarSig | Local variables signatures
LocalVarSig.LocalSigType |
MarshalSpec | The type for the marshaling signature
MetadataSignatures |
MethodDefSig | Type to hold a MethodDefSig
MethodRefSig | MethodRefSig
OpCodesList | This class is used to map opcodes into OpCode objects.
Param | The Param item for the list of Params in the signature
PropertySig | PropertySig
PTR |
RAssembly |
RAssemblyDef | Represents an assembly that is being manipulated.
RAssemblyName |
RAssemblyNameDef |
RAssemblyNameRef |
RAssemblyRef | µ Represents a reference to an external assembly.
RConstructor |
RConstructorDef |
RConstructorRef |
RCustomAttrib | Represents a custom attribute.
RetType | The RetType of a Signature
REvent | When an event is created, three methods are generated: - add_EventName - remove_EventName - OnEventName An event has the following classes associated with it: /Args derived from System.EventArgs /Handler derived from System.Delegate (or MulticastDelegate)
REventDef |
REventRef |
RField | TODO: A nice way to initialize the field and change its value. Possible kind of values: - not initialized - null - constant - expression - method call (probably only static methods) - new object/array
RFieldDef |
RFieldRef |
RMember |
RMethod | The RAIL representation of a method
RMethodBase | Contains functionality that is common to methods and constructors
RMethodDef |
RMethodRef | Represenets a method reference in the assembly
RModule |
RModuleDef | - A module is always associated with an assembly. - It's not permitted to change the assembly associated with a module. - Support constructors to create a new module based on a old one
RModuleRef |
RParameter |
RPInvokeInfo |
RProperty |
RPropertyDef | Done
RPropertyRef | Done
RResource | Summary description for Resource.
RReturnType | Done
RType |
RTypeDef |
RTypeRef |
RVersion |
SigType |
SZARRAY |
TypeSpecSig |
ValueType |

Interfaces

Interface | Description
ICustomAttributeOwner | Represents an element that can have custom attributes.
ICustomAttributeOwnerDef | To be implemented by the Ref classes.

Enumerations

Enumeration | Description
MetadataSignatures.SigTypeEnum | The enum that holds the value for diferent signature types


ARRAY Class

For a list of all members of this type, see ARRAY Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.ARRAY

public class ARRAY : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

ARRAY Members | Rail.Reflect Namespace


ARRAY Members

ARRAY overview

Public Instance Constructors

ARRAY Constructor

Public Instance Fields

arrayShape
ElementType (inherited from SigType)
Type

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ARRAY Class | Rail.Reflect Namespace


ARRAY Constructor

public ARRAY(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

ARRAY Class | Rail.Reflect Namespace


ARRAY Fields

The fields of the ARRAY class are listed below. For a complete list of ARRAY class members, see the ARRAY Members topic.

Public Instance Fields

arrayShape
ElementType (inherited from SigType)
Type

See Also

ARRAY Class | Rail.Reflect Namespace


ARRAY.ArrayShape Class

For a list of all members of this type, see ARRAY.ArrayShape Members.

System.Object
Rail.Reflect.ARRAY.ArrayShape

public class ARRAY.ArrayShape

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

ARRAY.ArrayShape Members | Rail.Reflect Namespace


ARRAY.Type Field

public SigType Type;

See Also

ARRAY Class | Rail.Reflect Namespace


ARRAY.ArrayShape Members

ARRAY.ArrayShape overview

Public Instance Constructors

ARRAY.ArrayShape Overloaded. Initializes a new instance of the ARRAY.ArrayShape class.

Public Instance Fields

LoBounds
NumLoBounds
NumSizes
Rank
Sizes

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape Constructor

Overload List

public ARRAY.ArrayShape();

public ARRAY.ArrayShape(byte[],out int,int);

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape Constructor (Byte[], Int32, Int32)

public ARRAY.ArrayShape(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace | ARRAY.ArrayShape Constructor Overload List


ARRAY.ArrayShape Constructor ()

public ARRAY.ArrayShape();

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace | ARRAY.ArrayShape Constructor Overload List


ARRAY.ArrayShape Fields

The fields of the ARRAY.ArrayShape class are listed below. For a complete list of ARRAY.ArrayShape class members, see the ARRAY.ArrayShape Members topic.

Public Instance Fields

LoBounds
NumLoBounds
NumSizes
Rank
Sizes

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape.LoBounds Field

public int[] LoBounds;

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape.NumLoBounds Field

public int NumLoBounds;

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape.NumSizes Field

public int NumSizes;

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape.Rank Field

public int Rank;

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


ARRAY.ArrayShape.Sizes Field

public int[] Sizes;

See Also

ARRAY.ArrayShape Class | Rail.Reflect Namespace


AssemblyReadException Class

Summary description for AssemblyReadException.

For a list of all members of this type, see AssemblyReadException Members.

System.Object
System.Exception
Rail.Reflect.AssemblyReadException

public class AssemblyReadException : Exception

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

AssemblyReadException Members | Rail.Reflect Namespace


AssemblyReadException Members

AssemblyReadException overview

Public Instance Constructors

AssemblyReadException Overloaded. Initializes a new instance of the AssemblyReadException class.

Public Instance Properties

HelpLink (inherited from Exception) | Gets or sets a link to the help file associated with this exception.
InnerException (inherited from Exception) | Gets the Exception instance that caused the current exception.
Message (inherited from Exception) | Gets a message that describes the current exception.
Source (inherited from Exception) | Gets or sets the name of the application or the object that causes the error.
StackTrace (inherited from Exception) | Gets a string representation of the frames on the call stack at the time the current exception was thrown.
TargetSite (inherited from Exception) | Gets the method that throws the current exception.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetBaseException (inherited from Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData (inherited from Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Exception) | Creates and returns a string representation of the current exception.

Protected Instance Properties

HResult (inherited from Exception) Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AssemblyReadException Class | Rail.Reflect Namespace


AssemblyReadException Constructor

Overload List

public AssemblyReadException();

public AssemblyReadException(string);

See Also

AssemblyReadException Class | Rail.Reflect Namespace


AssemblyReadException Constructor ()

public AssemblyReadException();

See Also

AssemblyReadException Class | Rail.Reflect Namespace | AssemblyReadException Constructor Overload List


AssemblyReadException Constructor (String)

public AssemblyReadException(
string message
);

Parameters

message

See Also

AssemblyReadException Class | Rail.Reflect Namespace | AssemblyReadException Constructor Overload List


CLASS Class

For a list of all members of this type, see CLASS Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.CLASS

public class CLASS : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

CLASS Members | Rail.Reflect Namespace


CLASS Members

CLASS overview

Public Instance Constructors

CLASS Constructor

Public Instance Fields

ElementType (inherited from SigType)
Index
TypeTable

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

CLASS Class | Rail.Reflect Namespace


CLASS Constructor

public CLASS(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

CLASS Class | Rail.Reflect Namespace


CLASS Fields

The fields of the CLASS class are listed below. For a complete list of CLASS class members, see the CLASS Members topic.

Public Instance Fields

ElementType (inherited from SigType)
Index
TypeTable

See Also

CLASS Class | Rail.Reflect Namespace


CLASS.Index Field

public int Index;

See Also

CLASS Class | Rail.Reflect Namespace


CLASS.TypeTable Field

public TokenType TypeTable;

See Also

CLASS Class | Rail.Reflect Namespace


CustomAttributeOwner Class

For a list of all members of this type, see CustomAttributeOwner Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RAssembly
Rail.Reflect.RMember
Rail.Reflect.RModule
Rail.Reflect.RParameter
Rail.Reflect.RReturnType

public abstract class CustomAttributeOwner : ICustomAttributeOwner

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

CustomAttributeOwner Members | Rail.Reflect Namespace


CustomAttributeOwner Members

CustomAttributeOwner overview

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

CustomAttributeOwner Constructor Initializes a new instance of the CustomAttributeOwner class.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute
CustomAttributeCount

Protected Internal Instance Methods

InternalAddCustomAttributtes | Adds a custom attribute to this element
InternalRemoveCustomAttribute | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute |

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner Constructor

Initializes a new instance of the CustomAttributeOwner class.

protected CustomAttributeOwner();

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner Properties

The properties of the CustomAttributeOwner class are listed below. For a complete list of CustomAttributeOwner class members, see the CustomAttributeOwner Members topic.

Protected Internal Instance Properties

CurrentCustomAttribute
CustomAttributeCount

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.CurrentCustomAttribute Property

protected internal RCustomAttrib CurrentCustomAttribute {get;}

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.CustomAttributeCount Property

protected internal int CustomAttributeCount {get;}

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner Methods

The methods of the CustomAttributeOwner class are listed below. For a complete list of CustomAttributeOwner class members, see the CustomAttributeOwner Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes | Adds a custom attribute to this element
InternalRemoveCustomAttribute | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute |

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


GetCustomAttributes Method

An NDoc Documented Class Library

CustomAttributeOwner.GetCustomAttributes Method

Overload List

public virtual RCustomAttrib[] GetCustomAttributes(RType,bool);

public virtual RCustomAttrib[] GetCustomAttributes(bool);

public virtual RCustomAttrib[] GetCustomAttributes(string,bool);

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.GetCustomAttributes Method (RType, Boolean)

public virtual RCustomAttrib[] GetCustomAttributes(
RType attributeType,
bool inherit
);

Parameters

attributeType
inherit

Return Value

Implements

ICustomAttributeOwner.GetCustomAttributes

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace | CustomAttributeOwner.GetCustomAttributes Overload List


CustomAttributeOwner.GetCustomAttributes Method (Boolean)

public virtual RCustomAttrib[] GetCustomAttributes(
bool inherit
);

Parameters

inherit

Return Value

Implements

ICustomAttributeOwner.GetCustomAttributes

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace | CustomAttributeOwner.GetCustomAttributes Overload List


CustomAttributeOwner.GetCustomAttributes Method (String, Boolean)

public virtual RCustomAttrib[] GetCustomAttributes(
string attributeType,
bool inherit
);

Parameters

attributeType
inherit

Return Value

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace | CustomAttributeOwner.GetCustomAttributes Overload List


CustomAttributeOwner.InternalAddCustomAttributtes Method

Adds a custom attribute to this element

protected internal void InternalAddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute
The attribute to be added.

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.InternalRemoveCustomAttribute Method

Removes the given custom attribute instance from this member.

protected internal void InternalRemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute
The instance of the custom attribute to be removed.

Remarks

If the given attribute is not found, this method returns silently.

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.IsDefined Method

public virtual bool IsDefined(
RType attributeType,
bool inherit
);

Parameters

attributeType
inherit

Return Value

Implements

ICustomAttributeOwner.IsDefined

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomAttributeOwner.MoveToNextCustomAttribute Method

protected internal bool MoveToNextCustomAttribute();

Return Value

See Also

CustomAttributeOwner Class | Rail.Reflect Namespace


CustomMod Class

The Custom Mod in signature, RetType and Param

For a list of all members of this type, see CustomMod Members.

System.Object
Rail.Reflect.CustomMod

public class CustomMod

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

CustomMod Members | Rail.Reflect Namespace


CustomMod Members

CustomMod overview

Public Instance Constructors

CustomMod Constructor

Public Instance Fields

CMOD_OPT
CMOD_REQD
TypeDefOrRefIndex
TypeTable

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod Constructor

public CustomMod(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod Fields

The fields of the CustomMod class are listed below. For a complete list of CustomMod class members, see the CustomMod Members topic.

Public Instance Fields

CMOD_OPT
CMOD_REQD
TypeDefOrRefIndex
TypeTable

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod.CMOD_OPT Field

public bool CMOD_OPT;

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod.CMOD_REQD Field

public bool CMOD_REQD;

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod.TypeDefOrRefIndex Field

public int TypeDefOrRefIndex;

See Also

CustomMod Class | Rail.Reflect Namespace


CustomMod.TypeTable Field

public TokenType TypeTable;

See Also

CustomMod Class | Rail.Reflect Namespace


FieldSig Class

FieldSig

For a list of all members of this type, see FieldSig Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.FieldSig

public class FieldSig : MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

FieldSig Members | Rail.Reflect Namespace


FieldSig Members

FieldSig overview

Public Instance Constructors

FieldSig Constructor Constructor

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
CustomMods |
Field |
Type |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FieldSig Class | Rail.Reflect Namespace


FieldSig Constructor

Constructor

public FieldSig(
byte[] stream,
int index
);

Parameters

stream
index
Index into the Blob stream

See Also

FieldSig Class | Rail.Reflect Namespace


FieldSig Fields

The fields of the FieldSig class are listed below. For a complete list of FieldSig class members, see the FieldSig Members topic.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
CustomMods |
Field |
Type |

See Also

FieldSig Class | Rail.Reflect Namespace


FieldSig.CustomMods Field

public CustomMod[] CustomMods;

See Also

FieldSig Class | Rail.Reflect Namespace


FieldSig.Field Field

public bool Field;

See Also

FieldSig Class | Rail.Reflect Namespace


FieldSig.Type Field

public SigType Type;

See Also

FieldSig Class | Rail.Reflect Namespace


FNPTR Class

For a list of all members of this type, see FNPTR Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.FNPTR

public class FNPTR : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

FNPTR Members | Rail.Reflect Namespace


FNPTR Members

FNPTR overview

Public Instance Constructors

FNPTR Constructor

Public Instance Fields

ElementType (inherited from SigType)
methodDefSig
methodRefSig

Public Instance Properties

IsMethodDef
IsMethodRef

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR Constructor

public FNPTR(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR Fields

The fields of the FNPTR class are listed below. For a complete list of FNPTR class members, see the FNPTR Members topic.

Public Instance Fields

ElementType (inherited from SigType)
methodDefSig
methodRefSig

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR.methodDefSig Field

public MethodDefSig methodDefSig;

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR.methodRefSig Field

public MethodRefSig methodRefSig;

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR Properties

The properties of the FNPTR class are listed below. For a complete list of FNPTR class members, see the FNPTR Members topic.

Public Instance Properties

IsMethodDef
IsMethodRef

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR.IsMethodDef Property

public bool IsMethodDef {get;}

See Also

FNPTR Class | Rail.Reflect Namespace


FNPTR.IsMethodRef Property

public bool IsMethodRef {get;}

See Also

FNPTR Class | Rail.Reflect Namespace


ICustomAttributeOwner Interface

Represents an element that can have custom attributes.

For a list of all members of this type, see ICustomAttributeOwner Members.

Rail.Reflect.ICustomAttributeOwner
Rail.Reflect.ICustomAttributeOwnerDef

public interface ICustomAttributeOwner

Types that implement ICustomAttributeOwner

Type | Description
CustomAttributeOwner |
RAssembly |
RAssemblyDef | Represents an assembly that is being manipulated.
RAssemblyRef | µ Represents a reference to an external assembly.
RConstructor |
RConstructorDef |
RConstructorRef |
REvent | When an event is created, three methods are generated: - add_EventName - remove_EventName - OnEventName An event has the following classes associated with it: /Args derived from System.EventArgs /Handler derived from System.Delegate (or MulticastDelegate)
REventDef |
REventRef |
RField | TODO: A nice way to initialize the field and change its value. Possible kind of values: - not initialized - null - constant - expression - method call (probably only static methods) - new object/array
RFieldDef |
RFieldRef |
RMember |
RMethod | The RAIL representation of a method
RMethodBase | Contains functionality that is common to methods and constructors
RMethodDef |
RMethodRef | Represenets a method reference in the assembly
RModule |
RModuleDef | - A module is always associated with an assembly. - It's not permitted to change the assembly associated with a module. - Support constructors to create a new module based on a old one
RModuleRef |
RParameter |
RProperty |
RPropertyDef | Done
RPropertyRef | Done
RReturnType | Done
RType |
RTypeDef |
RTypeRef |

Remarks

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

ICustomAttributeOwner Members | Rail.Reflect Namespace


ICustomAttributeOwner Members

ICustomAttributeOwner overview

Public Instance Methods

GetCustomAttributes | Overloaded. Gets an array with all custom attributes of attributeType defined on this member.
IsDefined | Indicates whether one or more instance of attribute type is defined on this member.

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace


ICustomAttributeOwner Methods

The methods of the ICustomAttributeOwner interface are listed below. For a complete list of ICustomAttributeOwner interface members, see the ICustomAttributeOwner Members topic.

Public Instance Methods

GetCustomAttributes | Overloaded. Gets an array with all custom attributes of attributeType defined on this member.
IsDefined | Indicates whether one or more instance of attribute type is defined on this member.

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace


GetCustomAttributes Method

An NDoc Documented Class Library

ICustomAttributeOwner.GetCustomAttributes Method

Gets an array with all custom attributes of attributeType defined on this member.

Overload List

Gets an array with all custom attributes of attributeType defined on this member.

RCustomAttrib[] GetCustomAttributes(RType,bool);

Gets an array with all custom attributes of defined on this member.

RCustomAttrib[] GetCustomAttributes(bool);

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace


ICustomAttributeOwner.GetCustomAttributes Method (RType, Boolean)

Gets an array with all custom attributes of attributeType defined on this member.

RCustomAttrib[] GetCustomAttributes(
RType attributeType,
bool inherit
);

Parameters

attributeType
The type of the custom attribute
inherit
Whether the hierarchy chain should be searched for the custom attribute

Return Value

An array with all the custom attributes defined on this member.

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace | ICustomAttributeOwner.GetCustomAttributes Overload List


ICustomAttributeOwner.GetCustomAttributes Method (Boolean)

Gets an array with all custom attributes of defined on this member.

RCustomAttrib[] GetCustomAttributes(
bool inherit
);

Parameters

inherit
Whether the hierarchy chain should be searched for custom attributes

Return Value

An array with all the custom attributes defined on this member.

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace | ICustomAttributeOwner.GetCustomAttributes Overload List


ICustomAttributeOwner.IsDefined Method

Indicates whether one or more instance of attribute type is defined on this member.

bool IsDefined(
RType attributeType,
bool inherit
);

Parameters

attributeType
The type of the custom attribute
inherit
Whether the attribute should be searched in the hierarchy chain

Return Value

True if the attribute is defined on this member.

See Also

ICustomAttributeOwner Interface | Rail.Reflect Namespace


ICustomAttributeOwnerDef Interface

To be implemented by the Ref classes.

For a list of all members of this type, see ICustomAttributeOwnerDef Members.

public interface ICustomAttributeOwnerDef : ICustomAttributeOwner

Types that implement ICustomAttributeOwnerDef

Type | Description
RAssemblyDef | Represents an assembly that is being manipulated.
RConstructorDef |
REventDef |
RFieldDef |
RMethodDef |
RModuleDef | - A module is always associated with an assembly. - It's not permitted to change the assembly associated with a module. - Support constructors to create a new module based on a old one
RParameter |
RPropertyDef | Done
RTypeDef |

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

ICustomAttributeOwnerDef Members | Rail.Reflect Namespace


ICustomAttributeOwnerDef Members

ICustomAttributeOwnerDef overview

Public Instance Methods

AddCustomAttributtes | Adds a custom attribute to this element
RemoveCustomAttribute | Removes the given custom attribute instance from this member.

See Also

ICustomAttributeOwnerDef Interface | Rail.Reflect Namespace


ICustomAttributeOwnerDef Methods

The methods of the ICustomAttributeOwnerDef interface are listed below. For a complete list of ICustomAttributeOwnerDef interface members, see the ICustomAttributeOwnerDef Members topic.

Public Instance Methods

AddCustomAttributtes | Adds a custom attribute to this element
RemoveCustomAttribute | Removes the given custom attribute instance from this member.

See Also

ICustomAttributeOwnerDef Interface | Rail.Reflect Namespace


ICustomAttributeOwnerDef.AddCustomAttributtes Method

Adds a custom attribute to this element

void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute
The attribute to be added.

See Also

ICustomAttributeOwnerDef Interface | Rail.Reflect Namespace


ICustomAttributeOwnerDef.RemoveCustomAttribute Method

Removes the given custom attribute instance from this member.

void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute
The instance of the custom attribute to be removed.

Remarks

If the given attribute is not found, this method returns silently.

See Also

ICustomAttributeOwnerDef Interface | Rail.Reflect Namespace


LocalVarSig Class

Local variables signatures

For a list of all members of this type, see LocalVarSig Members.

System.Object
Rail.Reflect.LocalVarSig

public class LocalVarSig

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

LocalVarSig Members | Rail.Reflect Namespace


LocalVarSig Members

LocalVarSig overview

Public Instance Constructors

LocalVarSig Constructor

Public Instance Fields

Count | Number of local variables in the signature
IsLocalSig | Check if the initial value of the signature is 0x7
types | array of types in the signature

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig Constructor

public LocalVarSig(
byte[] stream,
int blobIndex
);

Parameters

stream
blobIndex

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig Fields

The fields of the LocalVarSig class are listed below. For a complete list of LocalVarSig class members, see the LocalVarSig Members topic.

Public Instance Fields

Count | Number of local variables in the signature
IsLocalSig | Check if the initial value of the signature is 0x7
types | array of types in the signature

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig.Count Field

Number of local variables in the signature

public int Count;

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig.IsLocalSig Field

Check if the initial value of the signature is 0x7

public bool IsLocalSig;

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig.types Field

array of types in the signature

public LocalSigType[] types;

See Also

LocalVarSig Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType Class

For a list of all members of this type, see LocalVarSig.LocalSigType Members.

System.Object
Rail.Reflect.LocalVarSig.LocalSigType

public class LocalVarSig.LocalSigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

LocalVarSig.LocalSigType Members | Rail.Reflect Namespace


LocalVarSig.LocalSigType Members

LocalVarSig.LocalSigType overview

Public Instance Constructors

LocalVarSig.LocalSigType Constructor

Public Instance Fields

ByRef |
Constraint | The only value currently used is ELEMENT_TYPE_PINNED
type |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType Constructor

public LocalVarSig.LocalSigType(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType Fields

The fields of the LocalVarSig.LocalSigType class are listed below. For a complete list of LocalVarSig.LocalSigType class members, see the LocalVarSig.LocalSigType Members topic.

Public Instance Fields

ByRef |
Constraint | The only value currently used is ELEMENT_TYPE_PINNED
type |

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType.ByRef Field

public bool ByRef;

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType.Constraint Field

The only value currently used is ELEMENT_TYPE_PINNED

public bool Constraint;

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


LocalVarSig.LocalSigType.type Field

public SigType type;

See Also

LocalVarSig.LocalSigType Class | Rail.Reflect Namespace


MarshalSpec Class

The type for the marshaling signature

For a list of all members of this type, see MarshalSpec Members.

System.Object
Rail.Reflect.MarshalSpec

public class MarshalSpec

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

MarshalSpec Members | Rail.Reflect Namespace


MarshalSpec Members

MarshalSpec overview

Public Instance Constructors

MarshalSpec Constructor Create a new MarshalSpec

Public Instance Fields

ArrayElementType
ElemMult
NumElem
ParamNum

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetNativeType | Get the NativeType
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec Constructor

Create a new MarshalSpec

public MarshalSpec(
byte[] stream,
int pos
);

Parameters

stream
The byte stream to read from
pos

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec Fields

The fields of the MarshalSpec class are listed below. For a complete list of MarshalSpec class members, see the MarshalSpec Members topic.

Public Instance Fields

ArrayElementType
ElemMult
NumElem
ParamNum

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec.ArrayElementType Field

public UnmanagedType ArrayElementType;

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec.ElemMult Field

public int ElemMult;

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec.NumElem Field

public int NumElem;

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec.ParamNum Field

public int ParamNum;

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec Methods

The methods of the MarshalSpec class are listed below. For a complete list of MarshalSpec class members, see the MarshalSpec Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetNativeType | Get the NativeType
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MarshalSpec Class | Rail.Reflect Namespace


MarshalSpec.GetNativeType Method

Get the NativeType

public UnmanagedType GetNativeType();

Return Value

The NativeType of the element

See Also

MarshalSpec Class | Rail.Reflect Namespace


MetadataSignatures Class

For a list of all members of this type, see MetadataSignatures Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.FieldSig
Rail.Reflect.MethodDefSig
Rail.Reflect.MethodRefSig
Rail.Reflect.PropertySig
Rail.Reflect.TypeSpecSig

public class MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

MetadataSignatures Members | Rail.Reflect Namespace


MetadataSignatures Members

MetadataSignatures overview

Public Static Methods

GetSigType |
ReadCompressedInt | Read and decompress the int value at Cursor position and increments the Cursor position by the number of bytes read

Public Instance Constructors

MetadataSignatures Constructor Initializes a new instance of the MetadataSignatures class.

Public Instance Fields

CallingConvention Signature CallingConvention

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures Constructor

Initializes a new instance of the MetadataSignatures class.

public MetadataSignatures();

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures Fields

The fields of the MetadataSignatures class are listed below. For a complete list of MetadataSignatures class members, see the MetadataSignatures Members topic.

Public Instance Fields

CallingConvention Signature CallingConvention

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures.CallingConvention Field

Signature CallingConvention

public int CallingConvention;

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures Methods

The methods of the MetadataSignatures class are listed below. For a complete list of MetadataSignatures class members, see the MetadataSignatures Members topic.

Public Static Methods

GetSigType |
ReadCompressedInt | Read and decompress the int value at Cursor position and increments the Cursor position by the number of bytes read

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures.GetSigType Method

public static SigType GetSigType(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

Return Value

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures.ReadCompressedInt Method

Read and decompress the int value at Cursor position and increments the Cursor position by the number of bytes read

public static int ReadCompressedInt(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
The stream of bytes
pos
The position int the stream where to read from
posValue

Return Value

The decompressed int

See Also

MetadataSignatures Class | Rail.Reflect Namespace


MetadataSignatures.SigTypeEnum Enumeration

The enum that holds the value for diferent signature types

public enum MetadataSignatures.SigTypeEnum

Members

Member Name | Description
MethodDefSig |
MethodRefSig |
StandaloneSig |
TypeSpecSig |

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

Rail.Reflect Namespace


MethodDefSig Class

Type to hold a MethodDefSig

For a list of all members of this type, see MethodDefSig Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.MethodDefSig

public class MethodDefSig : MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

MethodDefSig Members | Rail.Reflect Namespace


MethodDefSig Members

MethodDefSig overview

Public Instance Constructors

MethodDefSig Overloaded. Initializes a new instance of the MethodDefSig class.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Default |
ExplicitThis |
HasThis |
ParamCount |
Params |
retType |
Vararg |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig Constructor

Overload List

public MethodDefSig(byte[],int);

public MethodDefSig(byte[],out int,int);

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig Constructor (Byte[], Int32, Int32)

public MethodDefSig(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

MethodDefSig Class | Rail.Reflect Namespace | MethodDefSig Constructor Overload List


MethodDefSig Constructor (Byte[], Int32)

public MethodDefSig(
byte[] stream,
int pos
);

Parameters

stream
pos

See Also

MethodDefSig Class | Rail.Reflect Namespace | MethodDefSig Constructor Overload List


MethodDefSig Fields

The fields of the MethodDefSig class are listed below. For a complete list of MethodDefSig class members, see the MethodDefSig Members topic.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Default |
ExplicitThis |
HasThis |
ParamCount |
Params |
retType |
Vararg |

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.Default Field

public bool Default;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.ExplicitThis Field

public bool ExplicitThis;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.HasThis Field

public bool HasThis;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.ParamCount Field

public int ParamCount;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.Params Field

public Param[] Params;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.retType Field

public RetType retType;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodDefSig.Vararg Field

public bool Vararg;

See Also

MethodDefSig Class | Rail.Reflect Namespace


MethodRefSig Class

MethodRefSig

For a list of all members of this type, see MethodRefSig Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.MethodRefSig

public class MethodRefSig : MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

MethodRefSig Members | Rail.Reflect Namespace


MethodRefSig Members

MethodRefSig overview

Public Instance Constructors

MethodRefSig Overloaded. Initializes a new instance of the MethodRefSig class.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Default |
ExplicitThis |
HasThis |
ParamCount |
Params |
ParamsAfterSentinel |
retType |
Sentinel |
Vararg |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig Constructor

Constructor

Overload List

Constructor

public MethodRefSig(byte[],int);

Constructor

public MethodRefSig(byte[],out int,int);

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig Constructor (Byte[], Int32, Int32)

Constructor

public MethodRefSig(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
The blob byte stream
pos
posValue

See Also

MethodRefSig Class | Rail.Reflect Namespace | MethodRefSig Constructor Overload List


MethodRefSig Constructor (Byte[], Int32)

Constructor

public MethodRefSig(
byte[] stream,
int pos
);

Parameters

stream
The blob byte stream
pos
Index into the Blob stream

See Also

MethodRefSig Class | Rail.Reflect Namespace | MethodRefSig Constructor Overload List


MethodRefSig Fields

The fields of the MethodRefSig class are listed below. For a complete list of MethodRefSig class members, see the MethodRefSig Members topic.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Default |
ExplicitThis |
HasThis |
ParamCount |
Params |
ParamsAfterSentinel |
retType |
Sentinel |
Vararg |

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.Default Field

public bool Default;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.ExplicitThis Field

public bool ExplicitThis;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.HasThis Field

public bool HasThis;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.ParamCount Field

public int ParamCount;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.Params Field

public Param[] Params;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.ParamsAfterSentinel Field

public Param[] ParamsAfterSentinel;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.retType Field

public RetType retType;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.Sentinel Field

public bool Sentinel;

See Also

MethodRefSig Class | Rail.Reflect Namespace


MethodRefSig.Vararg Field

public bool Vararg;

See Also

MethodRefSig Class | Rail.Reflect Namespace


OpCodesList Class

This class is used to map opcodes into OpCode objects.

For a list of all members of this type, see OpCodesList Members.

System.Object
Rail.Reflect.OpCodesList

public class OpCodesList

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

OpCodesList Members | Rail.Reflect Namespace


OpCodesList Members

OpCodesList overview

Public Static Fields

OneByteCode
TwoByteCode

Public Instance Constructors

OpCodesList Constructor Initializes a new instance of the OpCodesList class.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

OpCodesList Class | Rail.Reflect Namespace


OpCodesList Constructor

Initializes a new instance of the OpCodesList class.

public OpCodesList();

See Also

OpCodesList Class | Rail.Reflect Namespace


OpCodesList Fields

The fields of the OpCodesList class are listed below. For a complete list of OpCodesList class members, see the OpCodesList Members topic.

Public Static Fields

OneByteCode
TwoByteCode

See Also

OpCodesList Class | Rail.Reflect Namespace


OpCodesList.OneByteCode Field

public static OpCode[] OneByteCode;

See Also

OpCodesList Class | Rail.Reflect Namespace


OpCodesList.TwoByteCode Field

public static OpCode[] TwoByteCode;

See Also

OpCodesList Class | Rail.Reflect Namespace


Param Class

The Param item for the list of Params in the signature

For a list of all members of this type, see Param Members.

System.Object
Rail.Reflect.Param

public class Param

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

Param Members | Rail.Reflect Namespace


Param Members

Param overview

Public Instance Constructors

Param Constructor Read the Param of the signature

Public Instance Fields

ByRef
CustomMods
Sentinel
Type
TypeByRef

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Param Class | Rail.Reflect Namespace


Param Constructor

Read the Param of the signature

public Param(
byte[] stream,
out int pos,
int posValue,
bool LookForSentinel
);

Parameters

stream
pos
posValue
LookForSentinel
True if it has the sentinel byte ON

See Also

Param Class | Rail.Reflect Namespace


Param Fields

The fields of the Param class are listed below. For a complete list of Param class members, see the Param Members topic.

Public Instance Fields

ByRef
CustomMods
Sentinel
Type
TypeByRef

See Also

Param Class | Rail.Reflect Namespace


Param.ByRef Field

public bool ByRef;

See Also

Param Class | Rail.Reflect Namespace


Param.CustomMods Field

public CustomMod[] CustomMods;

See Also

Param Class | Rail.Reflect Namespace


Param.Sentinel Field

public bool Sentinel;

See Also

Param Class | Rail.Reflect Namespace


Param.Type Field

public SigType Type;

See Also

Param Class | Rail.Reflect Namespace


Param.TypeByRef Field

public bool TypeByRef;

See Also

Param Class | Rail.Reflect Namespace


PropertySig Class

PropertySig

For a list of all members of this type, see PropertySig Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.PropertySig

public class PropertySig : MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

PropertySig Members | Rail.Reflect Namespace


PropertySig Members

PropertySig overview

Public Instance Constructors

PropertySig Constructor Cobstructor

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
ParamCount |
Params |
Property |
Type |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig Constructor

Cobstructor

public PropertySig(
byte[] stream,
int pos
);

Parameters

stream
The blob heap byte sttream
pos
Index into the blob heap

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig Fields

The fields of the PropertySig class are listed below. For a complete list of PropertySig class members, see the PropertySig Members topic.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
ParamCount |
Params |
Property |
Type |

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig.ParamCount Field

public int ParamCount;

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig.Params Field

public Param[] Params;

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig.Property Field

public bool Property;

See Also

PropertySig Class | Rail.Reflect Namespace


PropertySig.Type Field

public SigType Type;

See Also

PropertySig Class | Rail.Reflect Namespace


PTR Class

For a list of all members of this type, see PTR Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.PTR

public class PTR : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

PTR Members | Rail.Reflect Namespace


PTR Members

PTR overview

Public Instance Constructors

PTR Constructor

Public Instance Fields

ElementType (inherited from SigType) |
ptrType | TODO: CustomMod* not suported

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

PTR Class | Rail.Reflect Namespace


PTR Constructor

public PTR(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

PTR Class | Rail.Reflect Namespace


PTR Fields

The fields of the PTR class are listed below. For a complete list of PTR class members, see the PTR Members topic.

Public Instance Fields

ElementType (inherited from SigType) |
ptrType | TODO: CustomMod* not suported

See Also

PTR Class | Rail.Reflect Namespace


PTR.ptrType Field

TODO: CustomMod* not suported

public SigType ptrType;

See Also

PTR Class | Rail.Reflect Namespace


RAssembly Class

For a list of all members of this type, see RAssembly Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RAssembly
Rail.Reflect.RAssemblyDef
Rail.Reflect.RAssemblyRef

public abstract class RAssembly : CustomAttributeOwner

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssembly Members | Rail.Reflect Namespace


RAssembly Members

RAssembly overview

Public Instance Properties

EntryPoint | Gets the entry point of this assembly
FileName | Accesses the filename of the assembly.
Name | Accesses the name of the assembly.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetModule |
GetModules |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RAssembly Constructor Initializes a new instance of the RAssembly class.

Protected Instance Fields

entryPoint
fileName
name
rModuleDef
rModuleRefs

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly Constructor

Initializes a new instance of the RAssembly class.

protected RAssembly();

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly Fields

The fields of the RAssembly class are listed below. For a complete list of RAssembly class members, see the RAssembly Members topic.

Protected Instance Fields

entryPoint
fileName
name
rModuleDef
rModuleRefs

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.EntryPoint Property

Gets the entry point of this assembly

public virtual RMethod EntryPoint {get; set;}

Remarks

Calling the setter will result in an

NotSupportedException

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.FileName Property

Accesses the filename of the assembly.

public virtual string FileName {get; set;}

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.Name Property

Accesses the name of the assembly.

public virtual RAssemblyName Name {get; set;}

Remarks

An assembly has always a name defined, so this property is never null. Also, it's not possible to copy the returned object into another assembly.

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.rModuleDef Field

protected RModuleDef rModuleDef;

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.rModuleRefs Field

protected Hashtable rModuleRefs;

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly Properties

The properties of the RAssembly class are listed below. For a complete list of RAssembly class members, see the RAssembly Members topic.

Public Instance Properties

EntryPoint | Gets the entry point of this assembly
FileName | Accesses the filename of the assembly.
Name | Accesses the name of the assembly.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly Methods

The methods of the RAssembly class are listed below. For a complete list of RAssembly class members, see the RAssembly Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetModule |
GetModules |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.GetModule Method

public virtual RModule GetModule(
string name
);

Parameters

name

Return Value

See Also

RAssembly Class | Rail.Reflect Namespace


RAssembly.GetModules Method

public virtual RModule[] GetModules();

Return Value

See Also

RAssembly Class | Rail.Reflect Namespace


RAssemblyDef Class

Represents an assembly that is being manipulated.

For a list of all members of this type, see RAssemblyDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RAssembly
Rail.Reflect.RAssemblyDef

public sealed class RAssemblyDef : RAssembly, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssemblyDef Members | Rail.Reflect Namespace


RAssemblyDef Members

RAssemblyDef overview

Public Static Methods

LoadAssembly Loads an existing assembly from disk.

Public Instance Constructors

RAssemblyDef Constructor Create a new RAssemblyDef

Public Instance Properties

EntryPoint (inherited from RAssembly) | Gets the entry point of this assembly
FileName (inherited from RAssembly) | Accesses the filename of the assembly.
Name (inherited from RAssembly) | Accesses the name of the assembly.
RModuleDef |

Public Instance Methods

Accept | Visits the assembly.
AddCustomAttributtes |
AddReferencedAssembly | Overloaded. Adds a new referenced assembly.
AddTypeRef | Creates a new typeref in this assembly.
CopyModuleRef | Creates a new module ref, by copying the contents of another module. The new module is forever associated with this assembly. TODO: Think about all the details
DefineModuleDef | Creates a RModuleDef.
DefineModuleRef | Creates a new empty module ref.
DefineTypeRef | Adds a new RTypeRef object to the RAssemblyDef
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetModule (inherited from RAssembly) |
GetModules (inherited from RAssembly) |
GetReferencedAssemblies | Obtains a list of all the assemblies referenced by this assembly.
GetReferencedAssembly | Overloaded.
GetResources | Get the resource list
GetRTypeRef | Overloaded.
GetType | Overloaded.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes |
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveModuleRef | Removes a RModuleRef object from the Assembly
RemoveReferencedAssembly | Removes one assembly reference. If the assembly that is being unreferenced is still being used, an exception is thrown.
RemoveTypeRef | Removes a type from this module.
ReturnAssembly | Return dynamic assembly
RunAndSaveAssembly |
RunAssembly | Defines this assembly in the CLR and prepares it to be executed.
SaveAssembly | Saves this dynamic assembly to disk.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef Constructor

Create a new RAssemblyDef

public RAssemblyDef(
RAssemblyNameDef name
);

Parameters

name

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef Properties

The properties of the RAssemblyDef class are listed below. For a complete list of RAssemblyDef class members, see the RAssemblyDef Members topic.

Public Instance Properties

EntryPoint (inherited from RAssembly) | Gets the entry point of this assembly
FileName (inherited from RAssembly) | Accesses the filename of the assembly.
Name (inherited from RAssembly) | Accesses the name of the assembly.
RModuleDef |

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RModuleDef Property

public RModuleDef RModuleDef {get; set;}

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef Methods

The methods of the RAssemblyDef class are listed below. For a complete list of RAssemblyDef class members, see the RAssemblyDef Members topic.

Public Static Methods

LoadAssembly Loads an existing assembly from disk.

Public Instance Methods

Accept | Visits the assembly.
AddCustomAttributtes |
AddReferencedAssembly | Overloaded. Adds a new referenced assembly.
AddTypeRef | Creates a new typeref in this assembly.
CopyModuleRef | Creates a new module ref, by copying the contents of another module. The new module is forever associated with this assembly. TODO: Think about all the details
DefineModuleDef | Creates a RModuleDef.
DefineModuleRef | Creates a new empty module ref.
DefineTypeRef | Adds a new RTypeRef object to the RAssemblyDef
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetModule (inherited from RAssembly) |
GetModules (inherited from RAssembly) |
GetReferencedAssemblies | Obtains a list of all the assemblies referenced by this assembly.
GetReferencedAssembly | Overloaded.
GetResources | Get the resource list
GetRTypeRef | Overloaded.
GetType | Overloaded.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes |
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveModuleRef | Removes a RModuleRef object from the Assembly
RemoveReferencedAssembly | Removes one assembly reference. If the assembly that is being unreferenced is still being used, an exception is thrown.
RemoveTypeRef | Removes a type from this module.
ReturnAssembly | Return dynamic assembly
RunAndSaveAssembly |
RunAssembly | Defines this assembly in the CLR and prepares it to be executed.
SaveAssembly | Saves this dynamic assembly to disk.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.Accept Method

Visits the assembly.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

Visits the assembly itself and the modules. The order by which these elements are visited, depends on what is set in the Visitor.

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RAssemblyDef Class | Rail.Reflect Namespace


AddReferencedAssembly Method

An NDoc Documented Class Library

RAssemblyDef.AddReferencedAssembly Method

Adds a new referenced assembly.

Overload List

Adds a new referenced assembly.

public void AddReferencedAssembly(RAssemblyName);

public void AddReferencedAssembly(string);

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.AddReferencedAssembly Method (RAssemblyName)

Adds a new referenced assembly.

public void AddReferencedAssembly(
RAssemblyName assemblyName
);

Parameters

assemblyName
The name of the assembly to be referenced

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.AddReferencedAssembly Overload List


RAssemblyDef.AddReferencedAssembly Method (String)

public void AddReferencedAssembly(
string assemblyFullName
);

Parameters

assemblyFullName

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.AddReferencedAssembly Overload List


RAssemblyDef.AddTypeRef Method

Creates a new typeref in this assembly.

public RTypeRef AddTypeRef(
RTypeRef r
);

Parameters

r
The RTypeRef to add

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.CopyModuleRef Method

Creates a new module ref, by copying the contents of another module. The new module is forever associated with this assembly. TODO: Think about all the details

public RModuleRef CopyModuleRef(
RModuleRef original,
string newName
);

Parameters

original
The module ref to be used as source
newName
The name for the new module

Return Value

The added module

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.DefineModuleDef Method

Creates a RModuleDef.

public RModuleDef DefineModuleDef(
string name,
string filename
);

Parameters

name
Name of the new module
filename
Probably the same as name

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.DefineModuleRef Method

Creates a new empty module ref.

public RModuleRef DefineModuleRef(
string name,
string filename
);

Parameters

name
Name of the new module
filename
Probably the same as name

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.DefineTypeRef Method

Adds a new RTypeRef object to the RAssemblyDef

public RTypeRef DefineTypeRef(
Type t
);

Parameters

t
The Type object

Return Value

The added RTypeRef

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.GetReferencedAssemblies Method

Obtains a list of all the assemblies referenced by this assembly.

public RAssemblyName[] GetReferencedAssemblies();

Return Value

An array of the assemblies referenced. It never returns null, if no external assemblies are referenced, the array has 0 length.

See Also

RAssemblyDef Class | Rail.Reflect Namespace


GetReferencedAssembly Method

An NDoc Documented Class Library

RAssemblyDef.GetReferencedAssembly Method

Overload List

public RAssemblyRef GetReferencedAssembly(Assembly);

public RAssemblyRef GetReferencedAssembly(string);

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.GetReferencedAssembly Method (Assembly)

public RAssemblyRef GetReferencedAssembly(
Assembly assem
);

Parameters

assem

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.GetReferencedAssembly Overload List


RAssemblyDef.GetReferencedAssembly Method (String)

public RAssemblyRef GetReferencedAssembly(
string assem
);

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.GetReferencedAssembly Overload List


RAssemblyDef.GetResources Method

Get the resource list

public RResource[] GetResources();

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace


GetRTypeRef Method

An NDoc Documented Class Library

RAssemblyDef.GetRTypeRef Method

Overload List

public RTypeRef GetRTypeRef(string);

Get the RTypeRef from the Type object

public RTypeRef GetRTypeRef(Type);

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.GetRTypeRef Method (String)

public RTypeRef GetRTypeRef(
string type
);

Parameters

type

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.GetRTypeRef Overload List


RAssemblyDef.GetRTypeRef Method (Type)

Get the RTypeRef from the Type object

public RTypeRef GetRTypeRef(
Type type
);

Parameters

type
The Type to look for

Return Value

The associated RTypeRef

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.GetRTypeRef Overload List


GetType Method

An NDoc Documented Class Library

RAssemblyDef.GetType Method

Overload List

Inherited from Object.

public Type GetType();

public RTypeRef GetType(string);

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.GetType Method (String)

public RTypeRef GetType(
string name
);

Parameters

name

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace | RAssemblyDef.GetType Overload List


RAssemblyDef.GetTypes Method

public RTypeRef[] GetTypes();

Return Value

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.LoadAssembly Method

Loads an existing assembly from disk.

public static RAssemblyDef LoadAssembly(
string fileName
);

Parameters

fileName
The assembly to be loaded

Return Value

A new object representing the assembly

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RemoveModuleRef Method

Removes a RModuleRef object from the Assembly

public RModuleRef RemoveModuleRef(
string name
);

Parameters

name
The name of the module

Return Value

The removed module, null if the remove did not occurr

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RemoveReferencedAssembly Method

Removes one assembly reference. If the assembly that is being unreferenced is still being used, an exception is thrown.

public void RemoveReferencedAssembly(
RAssemblyName assemblyName
);

Parameters

assemblyName

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RemoveTypeRef Method

Removes a type from this module.

public void RemoveTypeRef(
string typeName
);

Parameters

typeName
The name of the type to be removed

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.ReturnAssembly Method

Return dynamic assembly

public AssemblyBuilder ReturnAssembly(
string assemblyFileName
);

Parameters

assemblyFileName
The file name of the assembly,

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RunAndSaveAssembly Method

public void RunAndSaveAssembly(
object[] arguments
);

Parameters

arguments

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.RunAssembly Method

Defines this assembly in the CLR and prepares it to be executed.

public void RunAssembly(
string[] arguments
);

Return Value

The newly generated assembly.

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyDef.SaveAssembly Method

Saves this dynamic assembly to disk.

public void SaveAssembly(
string assemblyFileName
);

Parameters

assemblyFileName
The file name of the assembly,

See Also

RAssemblyDef Class | Rail.Reflect Namespace


RAssemblyName Class

For a list of all members of this type, see RAssemblyName Members.

System.Object
Rail.Reflect.RAssemblyName
Rail.Reflect.RAssemblyNameDef
Rail.Reflect.RAssemblyNameRef

public abstract class RAssemblyName

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssemblyName Members | Rail.Reflect Namespace


RAssemblyName Members

RAssemblyName overview

Public Instance Properties

CultureInfo |
Flags | Gets the flags for this assembly.
FullName | Gets the full name of the assembly, also known as the display name.
Name |
PublicKeyToken |
Version |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RAssemblyName Constructor Initializes a new instance of the RAssemblyName class.

Protected Instance Fields

cultureInfo
flags
name
publicKeyToken
version

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName Constructor

Initializes a new instance of the RAssemblyName class.

protected RAssemblyName();

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName Fields

The fields of the RAssemblyName class are listed below. For a complete list of RAssemblyName class members, see the RAssemblyName Members topic.

Protected Instance Fields

cultureInfo
flags
name
publicKeyToken
version

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.CultureInfo Property

public virtual System.Globalization.CultureInfo CultureInfo {get; set;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.Flags Property

Gets the flags for this assembly.

public virtual System.Reflection.AssemblyNameFlags Flags {get; set;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.Name Property

public virtual string Name {get; set;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.PublicKeyToken Property

public virtual byte[] PublicKeyToken {get; set;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.Version Property

public virtual RVersion Version {get; set;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName Properties

The properties of the RAssemblyName class are listed below. For a complete list of RAssemblyName class members, see the RAssemblyName Members topic.

Public Instance Properties

CultureInfo |
Flags | Gets the flags for this assembly.
FullName | Gets the full name of the assembly, also known as the display name.
Name |
PublicKeyToken |
Version |

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyName.FullName Property

Gets the full name of the assembly, also known as the display name.

public virtual string FullName {get;}

See Also

RAssemblyName Class | Rail.Reflect Namespace


RAssemblyNameDef Class

For a list of all members of this type, see RAssemblyNameDef Members.

System.Object
Rail.Reflect.RAssemblyName
Rail.Reflect.RAssemblyNameDef

public sealed class RAssemblyNameDef : RAssemblyName

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssemblyNameDef Members | Rail.Reflect Namespace


RAssemblyNameDef Members

RAssemblyNameDef overview

Public Instance Constructors

RAssemblyNameDef Overloaded. Initializes a new instance of the RAssemblyNameDef class.

Public Instance Properties

CultureInfo |
Flags | Gets or sets the flags for this assembly.
FullName (inherited from RAssemblyName) | Gets the full name of the assembly, also known as the display name.
Name |
PublicKeyToken |
Version |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef Constructor

Create a new RAssemblyNameDef

Overload List

Create a new RAssemblyNameDef

public RAssemblyNameDef(string);

Create a new RAssemblyNameDef

public RAssemblyNameDef(string,CultureInfo,int,int,int,int,byte[]);

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef Constructor (String)

Create a new RAssemblyNameDef

public RAssemblyNameDef(
string name
);

Parameters

name

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace | RAssemblyNameDef Constructor Overload List


RAssemblyNameDef Constructor (String, CultureInfo, Int32, Int32, Int32, Int32, Byte[])

Create a new RAssemblyNameDef

public RAssemblyNameDef(
string name,
CultureInfo culture,
int major,
int minor,
int build,
int revision,
byte[] publicKey
);

Parameters

name
culture
major
minor
build
revision
publicKey

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace | RAssemblyNameDef Constructor Overload List


RAssemblyNameDef Properties

The properties of the RAssemblyNameDef class are listed below. For a complete list of RAssemblyNameDef class members, see the RAssemblyNameDef Members topic.

Public Instance Properties

CultureInfo |
Flags | Gets or sets the flags for this assembly.
FullName (inherited from RAssemblyName) | Gets the full name of the assembly, also known as the display name.
Name |
PublicKeyToken |
Version |

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef.CultureInfo Property

public override System.Globalization.CultureInfo CultureInfo {set;}

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef.Flags Property

Gets or sets the flags for this assembly.

public override System.Reflection.AssemblyNameFlags Flags {set;}

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef.Name Property

public override string Name {set;}

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef.PublicKeyToken Property

public override byte[] PublicKeyToken {set;}

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameDef.Version Property

public override RVersion Version {set;}

See Also

RAssemblyNameDef Class | Rail.Reflect Namespace


RAssemblyNameRef Class

For a list of all members of this type, see RAssemblyNameRef Members.

System.Object
Rail.Reflect.RAssemblyName
Rail.Reflect.RAssemblyNameRef

public sealed class RAssemblyNameRef : RAssemblyName

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssemblyNameRef Members | Rail.Reflect Namespace


RAssemblyNameRef Members

RAssemblyNameRef overview

Public Instance Constructors

RAssemblyNameRef Constructor Creates a new instance representing the
AssemblyName
object given.

Public Instance Properties

CultureInfo (inherited from RAssemblyName) |
Flags (inherited from RAssemblyName) | Gets the flags for this assembly.
FullName (inherited from RAssemblyName) | Gets the full name of the assembly, also known as the display name.
Name (inherited from RAssemblyName) |
PublicKeyToken (inherited from RAssemblyName) |
Version (inherited from RAssemblyName) |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

See Also

RAssemblyNameRef Class | Rail.Reflect Namespace


RAssemblyNameRef Constructor

Creates a new instance representing the

AssemblyName
object given.

public RAssemblyNameRef(
AssemblyName aName
);

Parameters

aName

See Also

RAssemblyNameRef Class | Rail.Reflect Namespace


RAssemblyRef Class

µ Represents a reference to an external assembly.

For a list of all members of this type, see RAssemblyRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RAssembly
Rail.Reflect.RAssemblyRef

public sealed class RAssemblyRef : RAssembly

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This type is read-only and serves only to support the buiding and manipulation of the assembly loaded in an RAssemblyDef. Some properties defined in the base class are supposed to be read-only here and read-write in

RAssemblyDef
. Unfortunately,
C#
does not allow a property to be defined as read-only in a base class and extended to read-write in a derived class. Therefore, all the properties that are read-write in the
RAssemblyDef
class are defined like that in
RAssembly
and in the
RAssemblyRef
the setter method throws a
NotSupportedException
.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RAssemblyRef Members | Rail.Reflect Namespace


RAssemblyRef Members

RAssemblyRef overview

Public Instance Constructors

RAssemblyRef Overloaded. Initializes a new instance of the RAssemblyRef class.

Public Instance Properties

EntryPoint (inherited from RAssembly) | Gets the entry point of this assembly
FileName (inherited from RAssembly) | Accesses the filename of the assembly.
Name (inherited from RAssembly) | Accesses the name of the assembly.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetModule (inherited from RAssembly) |
GetModules (inherited from RAssembly) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RAssemblyRef Class | Rail.Reflect Namespace


RAssemblyRef Constructor

Creates a reference to the given assembly.

Overload List

Creates a reference to the given assembly.

public RAssemblyRef(RAssemblyName);

Creates a reference to the given assembly.

public RAssemblyRef(Assembly);

public RAssemblyRef(string);

See Also

RAssemblyRef Class | Rail.Reflect Namespace


RAssemblyRef Constructor (Assembly)

Creates a reference to the given assembly.

public RAssemblyRef(
Assembly asm
);

Parameters

asm

See Also

RAssemblyRef Class | Rail.Reflect Namespace | RAssemblyRef Constructor Overload List


RAssemblyRef Constructor (RAssemblyName)

Creates a reference to the given assembly.

public RAssemblyRef(
RAssemblyName asmName
);

Parameters

asmName

See Also

RAssemblyRef Class | Rail.Reflect Namespace | RAssemblyRef Constructor Overload List


RAssemblyRef Constructor (String)

public RAssemblyRef(
string fullName
);

See Also

RAssemblyRef Class | Rail.Reflect Namespace | RAssemblyRef Constructor Overload List


RConstructor Class

For a list of all members of this type, see RConstructor Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RConstructor
Rail.Reflect.RConstructorDef
Rail.Reflect.RConstructorRef

public abstract class RConstructor : RMethodBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RConstructor Members | Rail.Reflect Namespace


RConstructor Members

RConstructor overview

Public Instance Properties

Attributes (inherited from RMethodBase) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions (inherited from RMethodBase) | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object

Public Instance Methods

Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RConstructor Constructor Initializes a new instance of the RConstructor class.

Protected Instance Fields

attributes (inherited from RMethodBase) |
bindingFlags (inherited from RMember) |
callingConventions (inherited from RMethodBase) |
declaringType (inherited from RMember) |
memberType (inherited from RMember) |
methodImplementationFlags (inherited from RMethodBase) |
name (inherited from RMember) |
overridedMethod (inherited from RMethodBase) | The override information object
parameters (inherited from RMethodBase) |
parametersCount (inherited from RMethodBase) |
pInvoke (inherited from RMethodBase) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RConstructor Class | Rail.Reflect Namespace


RConstructor Constructor

Initializes a new instance of the RConstructor class.

protected RConstructor();

See Also

RConstructor Class | Rail.Reflect Namespace


RConstructorDef Class

For a list of all members of this type, see RConstructorDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RConstructor
Rail.Reflect.RConstructorDef

public sealed class RConstructorDef : RConstructor, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RConstructorDef Members | Rail.Reflect Namespace


RConstructorDef Members

RConstructorDef overview

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodBody |
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object

Public Instance Methods

Accept | Visits this constructor.
AddCustomAttributtes |
AddOverride | Sets the method declaration
AddParameter | Adds the given parameter to the end of the list, returning its position.
DefineMethodBody |
Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
InsertParameter | The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveOverride | Remove the override info
RemoveParameter | The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?
SetParameter |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef Properties

The properties of the RConstructorDef class are listed below. For a complete list of RConstructorDef class members, see the RConstructorDef Members topic.

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodBody |
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.Attributes Property

public override System.Reflection.MethodAttributes Attributes {set;}

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.CallingConventions Property

Gets and sets the CallingConventions for the method

public override System.Reflection.CallingConventions CallingConventions {set;}

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.MethodBody Property

public Rail.MSIL.MethodBody MethodBody {get; set;}

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef Methods

The methods of the RConstructorDef class are listed below. For a complete list of RConstructorDef class members, see the RConstructorDef Members topic.

Public Instance Methods

Accept | Visits this constructor.
AddCustomAttributtes |
AddOverride | Sets the method declaration
AddParameter | Adds the given parameter to the end of the list, returning its position.
DefineMethodBody |
Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
InsertParameter | The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveOverride | Remove the override info
RemoveParameter | The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?
SetParameter |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.Accept Method

Visits this constructor.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

A constructor has no subelements

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.AddOverride Method

Sets the method declaration

public void AddOverride(
RMethodBase overrideM
);

Parameters

overrideM
The method to override

Return Value

The method to override

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.AddParameter Method

Adds the given parameter to the end of the list, returning its position.

public int AddParameter(
RParameter parameter
);

Parameters

parameter

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.DefineMethodBody Method

public MethodBody DefineMethodBody();

Return Value

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.InsertParameter Method

The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.

public void InsertParameter(
int position,
RParameter parameter
);

Parameters

position
parameter

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.RemoveOverride Method

Remove the override info

public void RemoveOverride(
RMethodBase overrideM
);

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.RemoveParameter Method

The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?

public RParameter RemoveParameter(
int index
);

Parameters

index

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorDef.SetParameter Method

public void SetParameter(
int position,
RParameter parameter
);

Parameters

position
parameter

See Also

RConstructorDef Class | Rail.Reflect Namespace


RConstructorRef Class

For a list of all members of this type, see RConstructorRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RConstructor
Rail.Reflect.RConstructorRef

public sealed class RConstructorRef : RConstructor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RConstructorRef Members | Rail.Reflect Namespace


RConstructorRef Members

RConstructorRef overview

Public Instance Constructors

RConstructorRef Overloaded. Initializes a new instance of the RConstructorRef class.

Public Instance Properties

Attributes (inherited from RMethodBase) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions (inherited from RMethodBase) | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object

Public Instance Methods

Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RConstructorRef Class | Rail.Reflect Namespace


RConstructorRef Constructor

Overload List

public RConstructorRef(ConstructorInfo,RAssemblyDef);

public RConstructorRef(string,RType,RType,RParameter[],RAssemblyDef);

See Also

RConstructorRef Class | Rail.Reflect Namespace


RConstructorRef Constructor (ConstructorInfo, RAssemblyDef)

public RConstructorRef(
ConstructorInfo ci,
RAssemblyDef rad
);

Parameters

ci
rad

See Also

RConstructorRef Class | Rail.Reflect Namespace | RConstructorRef Constructor Overload List


RConstructorRef Constructor (String, RType, RType, RParameter[], RAssemblyDef)

public RConstructorRef(
string name,
RType retType,
RType declaringType,
RParameter[] pi,
RAssemblyDef rad
);

Parameters

name
retType
declaringType
pi
rad

See Also

RConstructorRef Class | Rail.Reflect Namespace | RConstructorRef Constructor Overload List


RCustomAttrib Class

Represents a custom attribute.

For a list of all members of this type, see RCustomAttrib Members.

System.Object
Rail.Reflect.RCustomAttrib

public class RCustomAttrib

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Elements of a C# program that support custom attributes: assembly, module, type, field, method, method parameter, method return value, property, and event. The purpose of this class is to: - Create new CustomAttributes instances - Change existing instances (its fields, the arguments for the constructor, the arguments of the properties) Therefore, it must be possible to: - Obtain RCustomAttrib objects from existing types - Change its values.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RCustomAttrib Members | Rail.Reflect Namespace


RCustomAttrib Members

RCustomAttrib overview

Public Instance Constructors

RCustomAttrib Constructor

Public Instance Properties

AttributeConstructor | Gets or sets the constructor used to create the custom attribute.
AttributeData | Gets or sets the data used to create the custom attribute.
CustomAttributeType | Returns the type of the custom attribute represented by this object. This is obtained from the constructor and is changed only when the constructor is changed.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetAttributeConstructorArguments | Gets the constructor arguments. The constructor will be called with these arguments when the assembly containing this attribute is created.
GetFields | Get the fields array
GetFieldsValues | Get values for the fields
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetProperties | Get the properties array
GetPropertiesValues | Get values for the properties
GetType (inherited from Object) | Gets the Type of the current instance.
SetAttributeConstructorArguments | Sets the constructor arguments.
SetFieldsValues |
SetProperties | Overloaded. Set the Properties list
SetPropertiesValues |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

constructorArguments
customAttributeCtor
customAttributeData
customAttributeFields
customAttributeProp
fieldsValues
propertyValues

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib Constructor

public RCustomAttrib(
RConstructor customAttributeCtor,
byte[] customAttributeData,
RAssemblyDef rAssemblyDef
);

Parameters

customAttributeCtor
customAttributeData
rAssemblyDef

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib Fields

The fields of the RCustomAttrib class are listed below. For a complete list of RCustomAttrib class members, see the RCustomAttrib Members topic.

Protected Instance Fields

constructorArguments
customAttributeCtor
customAttributeData
customAttributeFields
customAttributeProp
fieldsValues
propertyValues

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.constructorArguments Field

protected object[] constructorArguments;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.customAttributeCtor Field

protected RConstructor customAttributeCtor;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.customAttributeData Field

protected byte[] customAttributeData;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.customAttributeFields Field

protected ArrayList customAttributeFields;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.customAttributeProp Field

protected ArrayList customAttributeProp;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.fieldsValues Field

protected ArrayList fieldsValues;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.propertyValues Field

protected ArrayList propertyValues;

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib Properties

The properties of the RCustomAttrib class are listed below. For a complete list of RCustomAttrib class members, see the RCustomAttrib Members topic.

Public Instance Properties

AttributeConstructor | Gets or sets the constructor used to create the custom attribute.
AttributeData | Gets or sets the data used to create the custom attribute.
CustomAttributeType | Returns the type of the custom attribute represented by this object. This is obtained from the constructor and is changed only when the constructor is changed.

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.AttributeConstructor Property

Gets or sets the constructor used to create the custom attribute.

public RConstructor AttributeConstructor {get; set;}

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.AttributeData Property

Gets or sets the data used to create the custom attribute.

public byte[] AttributeData {get; set;}

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.CustomAttributeType Property

Returns the type of the custom attribute represented by this object. This is obtained from the constructor and is changed only when the constructor is changed.

public RType CustomAttributeType {get;}

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib Methods

The methods of the RCustomAttrib class are listed below. For a complete list of RCustomAttrib class members, see the RCustomAttrib Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetAttributeConstructorArguments | Gets the constructor arguments. The constructor will be called with these arguments when the assembly containing this attribute is created.
GetFields | Get the fields array
GetFieldsValues | Get values for the fields
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetProperties | Get the properties array
GetPropertiesValues | Get values for the properties
GetType (inherited from Object) | Gets the Type of the current instance.
SetAttributeConstructorArguments | Sets the constructor arguments.
SetFieldsValues |
SetProperties | Overloaded. Set the Properties list
SetPropertiesValues |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.GetAttributeConstructorArguments Method

Gets the constructor arguments. The constructor will be called with these arguments when the assembly containing this attribute is created.

public object[] GetAttributeConstructorArguments();

Return Value

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.GetFields Method

Get the fields array

public RField[] GetFields();

Return Value

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.GetFieldsValues Method

Get values for the fields

public object[] GetFieldsValues();

Return Value

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.GetProperties Method

Get the properties array

public RProperty[] GetProperties();

Return Value

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.GetPropertiesValues Method

Get values for the properties

public object[] GetPropertiesValues();

Return Value

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.SetAttributeConstructorArguments Method

Sets the constructor arguments.

public void SetAttributeConstructorArguments(
object[] args
);

Parameters

args

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.SetFieldsValues Method

public void SetFieldsValues(
object[] values
);

See Also

RCustomAttrib Class | Rail.Reflect Namespace


SetProperties Method

An NDoc Documented Class Library

RCustomAttrib.SetProperties Method

Set the fields list

Overload List

Set the fields list

public void SetProperties(RField[]);

Set the Properties list

public void SetProperties(RProperty[]);

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RCustomAttrib.SetProperties Method (RField[])

Set the fields list

public void SetProperties(
RField[] fields
);

Parameters

fields

See Also

RCustomAttrib Class | Rail.Reflect Namespace | RCustomAttrib.SetProperties Overload List


RCustomAttrib.SetProperties Method (RProperty[])

Set the Properties list

public void SetProperties(
RProperty[] props
);

Parameters

props

See Also

RCustomAttrib Class | Rail.Reflect Namespace | RCustomAttrib.SetProperties Overload List


RCustomAttrib.SetPropertiesValues Method

public void SetPropertiesValues(
object[] values
);

See Also

RCustomAttrib Class | Rail.Reflect Namespace


RetType Class

The RetType of a Signature

For a list of all members of this type, see RetType Members.

System.Object
Rail.Reflect.RetType

public class RetType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RetType Members | Rail.Reflect Namespace


RetType Members

RetType overview

Public Instance Constructors

RetType Constructor Read the RetType of a Signature

Public Instance Fields

ByRef
CustomMods
Type
TypeByRef
VOID

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RetType Class | Rail.Reflect Namespace


RetType Constructor

Read the RetType of a Signature

public RetType(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

RetType Class | Rail.Reflect Namespace


RetType Fields

The fields of the RetType class are listed below. For a complete list of RetType class members, see the RetType Members topic.

Public Instance Fields

ByRef
CustomMods
Type
TypeByRef
VOID

See Also

RetType Class | Rail.Reflect Namespace


RetType.ByRef Field

public bool ByRef;

See Also

RetType Class | Rail.Reflect Namespace


RetType.CustomMods Field

public CustomMod[] CustomMods;

See Also

RetType Class | Rail.Reflect Namespace


RetType.Type Field

public SigType Type;

See Also

RetType Class | Rail.Reflect Namespace


RetType.TypeByRef Field

public bool TypeByRef;

See Also

RetType Class | Rail.Reflect Namespace


RetType.VOID Field

public bool VOID;

See Also

RetType Class | Rail.Reflect Namespace


REvent Class

When an event is created, three methods are generated: - add_EventName - remove_EventName - OnEventName An event has the following classes associated with it: /Args derived from System.EventArgs /Handler derived from System.Delegate (or MulticastDelegate)

For a list of all members of this type, see REvent Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.REvent
Rail.Reflect.REventDef
Rail.Reflect.REventRef

public abstract class REvent : RMember

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

REvent Members | Rail.Reflect Namespace


REvent Members

REvent overview

Public Instance Properties

AddOnMethod | Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.
Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
EventArgsType | The type of the event args of this event. This type always derives from System.EventArgs
EventHandlerType | The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).
EventType |
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
RaiseMethod | Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.
RemoveOnMethod | Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

REvent Constructor Initializes a new instance of the REvent class.

Protected Instance Fields

addOnMethod
attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
eventArgsType
eventHandlerType
eventType
memberType (inherited from RMember)
name (inherited from RMember)
raiseMethod
removeOnMethod

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

REvent Class | Rail.Reflect Namespace


REvent Constructor

Initializes a new instance of the REvent class.

protected REvent();

See Also

REvent Class | Rail.Reflect Namespace


REvent Fields

The fields of the REvent class are listed below. For a complete list of REvent class members, see the REvent Members topic.

Protected Instance Fields

addOnMethod
attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
eventArgsType
eventHandlerType
eventType
memberType (inherited from RMember)
name (inherited from RMember)
raiseMethod
removeOnMethod

See Also

REvent Class | Rail.Reflect Namespace


REvent.AddOnMethod Property

Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.

public virtual RMethod AddOnMethod {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.Attributes Property

public virtual System.Reflection.EventAttributes Attributes {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.EventArgsType Property

The type of the event args of this event. This type always derives from System.EventArgs

public virtual RType EventArgsType {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.EventHandlerType Property

The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).

public virtual RType EventHandlerType {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.EventType Property

public virtual RType EventType {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.RaiseMethod Property

Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.

public virtual RMethod RaiseMethod {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent.RemoveOnMethod Property

Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

public virtual RMethod RemoveOnMethod {get; set;}

See Also

REvent Class | Rail.Reflect Namespace


REvent Properties

The properties of the REvent class are listed below. For a complete list of REvent class members, see the REvent Members topic.

Public Instance Properties

AddOnMethod | Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.
Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
EventArgsType | The type of the event args of this event. This type always derives from System.EventArgs
EventHandlerType | The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).
EventType |
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
RaiseMethod | Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.
RemoveOnMethod | Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

REvent Class | Rail.Reflect Namespace


REventDef Class

For a list of all members of this type, see REventDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.REvent
Rail.Reflect.REventDef

public class REventDef : REvent, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

REventDef Members | Rail.Reflect Namespace


REventDef Members

REventDef overview

Public Instance Properties

AddOnMethod | Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.
Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
EventArgsType | The type of the event args of this event. This type always derives from System.EventArgs
EventHandlerType | The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).
EventType |
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name |
RaiseMethod | Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.
RemoveOnMethod | Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

Public Instance Methods

Accept | Visits this event.
AddCustomAttributtes |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

addOnMethod (inherited from REvent)
attributes (inherited from REvent)
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
eventArgsType (inherited from REvent)
eventHandlerType (inherited from REvent)
eventType (inherited from REvent)
memberType (inherited from RMember)
name (inherited from RMember)
raiseMethod (inherited from REvent)
removeOnMethod (inherited from REvent)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

REventDef Class | Rail.Reflect Namespace


REventDef Properties

The properties of the REventDef class are listed below. For a complete list of REventDef class members, see the REventDef Members topic.

Public Instance Properties

AddOnMethod | Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.
Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
EventArgsType | The type of the event args of this event. This type always derives from System.EventArgs
EventHandlerType | The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).
EventType |
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name |
RaiseMethod | Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.
RemoveOnMethod | Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.AddOnMethod Property

Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.

public override RMethod AddOnMethod {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.Attributes Property

public override System.Reflection.EventAttributes Attributes {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.EventArgsType Property

The type of the event args of this event. This type always derives from System.EventArgs

public override RType EventArgsType {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.EventHandlerType Property

The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).

public override RType EventHandlerType {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.EventType Property

public override RType EventType {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.Name Property

public override string Name {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.RaiseMethod Property

Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.

public override RMethod RaiseMethod {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.RemoveOnMethod Property

Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

public override RMethod RemoveOnMethod {set;}

See Also

REventDef Class | Rail.Reflect Namespace


REventDef Methods

The methods of the REventDef class are listed below. For a complete list of REventDef class members, see the REventDef Members topic.

Public Instance Methods

Accept | Visits this event.
AddCustomAttributtes |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.Accept Method

Visits this event.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

An event has no subelements

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

REventDef Class | Rail.Reflect Namespace


REventDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

REventDef Class | Rail.Reflect Namespace


REventRef Class

For a list of all members of this type, see REventRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.REvent
Rail.Reflect.REventRef

public class REventRef : REvent

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

REventRef Members | Rail.Reflect Namespace


REventRef Members

REventRef overview

Public Instance Properties

AddOnMethod (inherited from REvent) | Gets or sets the method used to subscribe to this event. The naming convention is add_/. If the name is changed, an exception will be raised when the assembly is generated.
Attributes (inherited from REvent) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
EventArgsType (inherited from REvent) | The type of the event args of this event. This type always derives from System.EventArgs
EventHandlerType (inherited from REvent) | The type of the event handler of this event. This type always derives from System.Delegate (and more commonly, from System.MulticastDelegate).
EventType (inherited from REvent) |
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
RaiseMethod (inherited from REvent) | Gets or sets the method used to raise this event. The naming convention is On/. If the name is changed, an exception will be raised when the assembly is generated.
RemoveOnMethod (inherited from REvent) | Gets or sets the method used to unsubscribe to this event. The naming convention is remove_/ and it must be instance and public. If the name is changed, an exception will be raised when the assembly is generated.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

addOnMethod (inherited from REvent)
attributes (inherited from REvent)
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
eventArgsType (inherited from REvent)
eventHandlerType (inherited from REvent)
eventType (inherited from REvent)
memberType (inherited from RMember)
name (inherited from RMember)
raiseMethod (inherited from REvent)
removeOnMethod (inherited from REvent)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

REventRef Class | Rail.Reflect Namespace


RField Class

TODO: A nice way to initialize the field and change its value. Possible kind of values: - not initialized - null - constant - expression - method call (probably only static methods) - new object/array

For a list of all members of this type, see RField Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RField
Rail.Reflect.RFieldDef
Rail.Reflect.RFieldRef

public abstract class RField : RMember

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RField Members | Rail.Reflect Namespace


RField Members

RField overview

Public Instance Properties

Attributes | Gets the attributes for this field
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
FieldType | Gets or sets the type of this field
HasMarshal | Verify if the field has marshal information
MarshalSpec | Get the field marshaling information
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
Value |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RField Constructor Initializes a new instance of the RField class.

Protected Instance Fields

attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
fieldType
fieldValue
marshalSpec
memberType (inherited from RMember)
name (inherited from RMember)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RField Class | Rail.Reflect Namespace


RField Constructor

Initializes a new instance of the RField class.

protected RField();

See Also

RField Class | Rail.Reflect Namespace


RField Fields

The fields of the RField class are listed below. For a complete list of RField class members, see the RField Members topic.

Protected Instance Fields

attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
fieldType
fieldValue
marshalSpec
memberType (inherited from RMember)
name (inherited from RMember)

See Also

RField Class | Rail.Reflect Namespace


RField.Attributes Property

Gets the attributes for this field

public virtual System.Reflection.FieldAttributes Attributes {get; set;}

See Also

RField Class | Rail.Reflect Namespace


RField.FieldType Property

Gets or sets the type of this field

public virtual RType FieldType {get; set;}

See Also

RField Class | Rail.Reflect Namespace


RField.fieldValue Field

protected object fieldValue;

See Also

RField Class | Rail.Reflect Namespace


RField.MarshalSpec Property

Get the field marshaling information

public virtual MarshalSpec MarshalSpec {get; set;}

See Also

RField Class | Rail.Reflect Namespace


RField Properties

The properties of the RField class are listed below. For a complete list of RField class members, see the RField Members topic.

Public Instance Properties

Attributes | Gets the attributes for this field
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
FieldType | Gets or sets the type of this field
HasMarshal | Verify if the field has marshal information
MarshalSpec | Get the field marshaling information
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
Value |

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RField Class | Rail.Reflect Namespace


RField.HasMarshal Property

Verify if the field has marshal information

public bool HasMarshal {get;}

See Also

RField Class | Rail.Reflect Namespace


RField.Value Property

public virtual object Value {get; set;}

See Also

RField Class | Rail.Reflect Namespace


RFieldDef Class

For a list of all members of this type, see RFieldDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RField
Rail.Reflect.RFieldDef

public sealed class RFieldDef : RField, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RFieldDef Members | Rail.Reflect Namespace


RFieldDef Members

RFieldDef overview

Public Instance Properties

Attributes | Gets or sets the attributes for this field
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
FieldType | Gets or sets the type of this field
HasMarshal (inherited from RField) | Verify if the field has marshal information
MarshalSpec | Get or set the field marshaling information
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name | Gets or sets the name of this member.
Offset |
Value |

Public Instance Methods

Accept | Visits this field.
AddCustomAttributtes |
DefineMarshalSpec | Define the MarshalSpec
DefineMarshalSpecAsArray |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveMarshal | Remove the marshal information
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef Properties

The properties of the RFieldDef class are listed below. For a complete list of RFieldDef class members, see the RFieldDef Members topic.

Public Instance Properties

Attributes | Gets or sets the attributes for this field
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
FieldType | Gets or sets the type of this field
HasMarshal (inherited from RField) | Verify if the field has marshal information
MarshalSpec | Get or set the field marshaling information
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name | Gets or sets the name of this member.
Offset |
Value |

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.Attributes Property

Gets or sets the attributes for this field

public override System.Reflection.FieldAttributes Attributes {set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.FieldType Property

Gets or sets the type of this field

public override RType FieldType {set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.MarshalSpec Property

Get or set the field marshaling information

public override MarshalSpec MarshalSpec {set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.Name Property

Gets or sets the name of this member.

public override string Name {set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.Offset Property

public int Offset {get; set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.Value Property

public override object Value {get; set;}

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef Methods

The methods of the RFieldDef class are listed below. For a complete list of RFieldDef class members, see the RFieldDef Members topic.

Public Instance Methods

Accept | Visits this field.
AddCustomAttributtes |
DefineMarshalSpec | Define the MarshalSpec
DefineMarshalSpecAsArray |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveMarshal | Remove the marshal information
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.Accept Method

Visits this field.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

A field has no subelements.

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.DefineMarshalSpec Method

Define the MarshalSpec

public MarshalSpec DefineMarshalSpec(
UnmanagedType typ
);

Parameters

typ

Return Value

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.DefineMarshalSpecAsArray Method

public MarshalSpec DefineMarshalSpecAsArray(
UnmanagedType arrayType,
int ParamNum,
int ElemMult,
int NumElem
);

Parameters

arrayType
ParamNum
ElemMult
NumElem

Return Value

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldDef.RemoveMarshal Method

Remove the marshal information

public void RemoveMarshal();

See Also

RFieldDef Class | Rail.Reflect Namespace


RFieldRef Class

For a list of all members of this type, see RFieldRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RField
Rail.Reflect.RFieldRef

public class RFieldRef : RField

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RFieldRef Members | Rail.Reflect Namespace


RFieldRef Members

RFieldRef overview

Public Instance Properties

Attributes (inherited from RField) | Gets the attributes for this field
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
FieldType (inherited from RField) | Gets or sets the type of this field
HasMarshal (inherited from RField) | Verify if the field has marshal information
MarshalSpec (inherited from RField) | Get the field marshaling information
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
Value (inherited from RField) |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

attributes (inherited from RField)
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
fieldType (inherited from RField)
fieldValue (inherited from RField)
marshalSpec (inherited from RField)
memberType (inherited from RMember)
name (inherited from RMember)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RFieldRef Class | Rail.Reflect Namespace


RFieldRef Methods

The methods of the RFieldRef class are listed below. For a complete list of RFieldRef class members, see the RFieldRef Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RFieldRef Class | Rail.Reflect Namespace


GetCustomAttributes Method

An NDoc Documented Class Library

RFieldRef.GetCustomAttributes Method

Overload List

public override RCustomAttrib[] GetCustomAttributes(RType,bool);

public override RCustomAttrib[] GetCustomAttributes(bool);

Inherited from CustomAttributeOwner.

public virtual RCustomAttrib[] GetCustomAttributes(string,bool);

See Also

RFieldRef Class | Rail.Reflect Namespace


RFieldRef.GetCustomAttributes Method (RType, Boolean)

public override RCustomAttrib[] GetCustomAttributes(
RType attributeType,
bool inherit
);

Parameters

attributeType
inherit

Return Value

Implements

ICustomAttributeOwner.GetCustomAttributes

See Also

RFieldRef Class | Rail.Reflect Namespace | RFieldRef.GetCustomAttributes Overload List


RFieldRef.GetCustomAttributes Method (Boolean)

public override RCustomAttrib[] GetCustomAttributes(
bool inherit
);

Parameters

inherit

Return Value

Implements

ICustomAttributeOwner.GetCustomAttributes

See Also

RFieldRef Class | Rail.Reflect Namespace | RFieldRef.GetCustomAttributes Overload List


RFieldRef.IsDefined Method

public override bool IsDefined(
RType attributeType,
bool inherit
);

Implements

ICustomAttributeOwner.IsDefined

See Also

RFieldRef Class | Rail.Reflect Namespace


RMember Class

For a list of all members of this type, see RMember Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.REvent
Rail.Reflect.RField
Rail.Reflect.RMethodBase
Rail.Reflect.RProperty
Rail.Reflect.RType

public abstract class RMember : CustomAttributeOwner

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RMember Members | Rail.Reflect Namespace


RMember Members

RMember overview

Public Instance Properties

BindingFlags | Gets the BindingFlags of the Member
DeclaringType | Gets or sets the class that declares this member.
MemberType | Gets the type of this member, such as field, method, and so on.
Name | Gets or sets the name of this member.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RMember Constructor Initializes a new instance of the RMember class.

Protected Instance Fields

bindingFlags
declaringType
memberType
name

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMember Class | Rail.Reflect Namespace


RMember Constructor

Initializes a new instance of the RMember class.

protected RMember();

See Also

RMember Class | Rail.Reflect Namespace


RMember Fields

The fields of the RMember class are listed below. For a complete list of RMember class members, see the RMember Members topic.

Protected Instance Fields

bindingFlags
declaringType
memberType
name

See Also

RMember Class | Rail.Reflect Namespace


RMember.BindingFlags Property

Gets the BindingFlags of the Member

public virtual System.Reflection.BindingFlags BindingFlags {get; set;}

See Also

RMember Class | Rail.Reflect Namespace


RMember.DeclaringType Property

Gets or sets the class that declares this member.

public virtual RType DeclaringType {get; set;}

See Also

RMember Class | Rail.Reflect Namespace


RMember.MemberType Property

Gets the type of this member, such as field, method, and so on.

public virtual System.Reflection.MemberTypes MemberType {get; set;}

See Also

RMember Class | Rail.Reflect Namespace


RMember.Name Property

Gets or sets the name of this member.

public virtual string Name {get; set;}

See Also

RMember Class | Rail.Reflect Namespace


RMember Properties

The properties of the RMember class are listed below. For a complete list of RMember class members, see the RMember Members topic.

Public Instance Properties

BindingFlags | Gets the BindingFlags of the Member
DeclaringType | Gets or sets the class that declares this member.
MemberType | Gets the type of this member, such as field, method, and so on.
Name | Gets or sets the name of this member.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RMember Class | Rail.Reflect Namespace


RMethod Class

The RAIL representation of a method

For a list of all members of this type, see RMethod Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RMethod
Rail.Reflect.RMethodDef
Rail.Reflect.RMethodRef

public abstract class RMethod : RMethodBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RMethod Members | Rail.Reflect Namespace


RMethod Members

RMethod overview

Public Instance Properties

Attributes (inherited from RMethodBase) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions (inherited from RMethodBase) | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object
ReturnType | Gets or Sets the return type of the method

Public Instance Methods

Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RMethod Constructor Initializes a new instance of the RMethod class.

Protected Instance Fields

attributes (inherited from RMethodBase) |
bindingFlags (inherited from RMember) |
callingConventions (inherited from RMethodBase) |
declaringType (inherited from RMember) |
memberType (inherited from RMember) |
methodImplementationFlags (inherited from RMethodBase) |
name (inherited from RMember) |
overridedMethod (inherited from RMethodBase) | The override information object
parameters (inherited from RMethodBase) |
parametersCount (inherited from RMethodBase) |
pInvoke (inherited from RMethodBase) |
returnType | The return type of the method

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethod Class | Rail.Reflect Namespace


RMethod Constructor

Initializes a new instance of the RMethod class.

protected RMethod();

See Also

RMethod Class | Rail.Reflect Namespace


RMethod Fields

The fields of the RMethod class are listed below. For a complete list of RMethod class members, see the RMethod Members topic.

Protected Instance Fields

attributes (inherited from RMethodBase) |
bindingFlags (inherited from RMember) |
callingConventions (inherited from RMethodBase) |
declaringType (inherited from RMember) |
memberType (inherited from RMember) |
methodImplementationFlags (inherited from RMethodBase) |
name (inherited from RMember) |
overridedMethod (inherited from RMethodBase) | The override information object
parameters (inherited from RMethodBase) |
parametersCount (inherited from RMethodBase) |
pInvoke (inherited from RMethodBase) |
returnType | The return type of the method

See Also

RMethod Class | Rail.Reflect Namespace


RMethod.ReturnType Property

Gets or Sets the return type of the method

public virtual RReturnType ReturnType {get; set;}

See Also

RMethod Class | Rail.Reflect Namespace


RMethod Properties

The properties of the RMethod class are listed below. For a complete list of RMethod class members, see the RMethod Members topic.

Public Instance Properties

Attributes (inherited from RMethodBase) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions (inherited from RMethodBase) | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object
ReturnType | Gets or Sets the return type of the method

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RMethod Class | Rail.Reflect Namespace


RMethodBase Class

Contains functionality that is common to methods and constructors

For a list of all members of this type, see RMethodBase Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RConstructor
Rail.Reflect.RMethod

public abstract class RMethodBase : RMember

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RMethodBase Members | Rail.Reflect Namespace


RMethodBase Members

RMethodBase overview

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody | Check it this is the implementation of a virtual method
IsPInvoke | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod | Get the declarion of the method or the oveerided method
ParametersCount | Gets the total number of parameters of this method.
PInvokeInfo | Get the RPInvokeInfo object

Public Instance Methods

Equals | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode | Override of GetHashCode Method
GetParameter | Gets a parameter
GetParameters |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RMethodBase Constructor Initializes a new instance of the RMethodBase class.

Protected Instance Fields

attributes |
bindingFlags (inherited from RMember) |
callingConventions |
declaringType (inherited from RMember) |
memberType (inherited from RMember) |
methodImplementationFlags |
name (inherited from RMember) |
overridedMethod | The override information object
parameters |
parametersCount |
pInvoke |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase Constructor

Initializes a new instance of the RMethodBase class.

protected RMethodBase();

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase Fields

The fields of the RMethodBase class are listed below. For a complete list of RMethodBase class members, see the RMethodBase Members topic.

Protected Instance Fields

attributes |
bindingFlags (inherited from RMember) |
callingConventions |
declaringType (inherited from RMember) |
memberType (inherited from RMember) |
methodImplementationFlags |
name (inherited from RMember) |
overridedMethod | The override information object
parameters |
parametersCount |
pInvoke |

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.Attributes Property

public virtual System.Reflection.MethodAttributes Attributes {get; set;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.CallingConventions Property

Gets and sets the CallingConventions for the method

public virtual System.Reflection.CallingConventions CallingConventions {get; set;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.MethodImplementationFlags Property

Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)

public virtual System.Reflection.MethodImplAttributes MethodImplementationFlags {get; set;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.OverridedMethod Property

Get the declarion of the method or the oveerided method

public virtual RMethodBase[] OverridedMethod {get;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.parameters Field

protected RParameter[] parameters;

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.ParametersCount Property

Gets the total number of parameters of this method.

public int ParametersCount {get;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.pInvoke Field

protected RPInvokeInfo pInvoke;

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase Properties

The properties of the RMethodBase class are listed below. For a complete list of RMethodBase class members, see the RMethodBase Members topic.

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody | Check it this is the implementation of a virtual method
IsPInvoke | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod | Get the declarion of the method or the oveerided method
ParametersCount | Gets the total number of parameters of this method.
PInvokeInfo | Get the RPInvokeInfo object

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.IsOverrideBody Property

Check it this is the implementation of a virtual method

public bool IsOverrideBody {get;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.IsPInvoke Property

Verify if the method is PInvoke

public bool IsPInvoke {get;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.PInvokeInfo Property

Get the RPInvokeInfo object

public virtual RPInvokeInfo PInvokeInfo {get; set;}

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase Methods

The methods of the RMethodBase class are listed below. For a complete list of RMethodBase class members, see the RMethodBase Members topic.

Public Instance Methods

Equals | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode | Override of GetHashCode Method
GetParameter | Gets a parameter
GetParameters |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.Equals Method

Override of the Equals method

public override bool Equals(
object obj
);

Parameters

obj
The object to compare

Return Value

True if the objects match

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.GetHashCode Method

Override of GetHashCode Method

public override int GetHashCode();

Return Value

The HashCode

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.GetParameter Method

Gets a parameter

public RParameter GetParameter(
int pos
);

Parameters

pos

Return Value

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodBase.GetParameters Method

public RParameter[] GetParameters();

Return Value

See Also

RMethodBase Class | Rail.Reflect Namespace


RMethodDef Class

For a list of all members of this type, see RMethodDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RMethod
Rail.Reflect.RMethodDef

public sealed class RMethodDef : RMethod, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RMethodDef Members | Rail.Reflect Namespace


RMethodDef Members

RMethodDef overview

Public Instance Constructors

RMethodDef Constructor

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodBody |
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo | Get or set the RPInvokeInfo object
ReturnType |

Public Instance Methods

Accept | Visits this method.
AddCustomAttributtes |
AddOverride | Sets the method declaration
AddParameter | Adds the given parameter to the end of the list, returning its position.
DefineMethodBody | Create the MethodBody object for this method
DefinePInvokeInfo | Create a new PInvokeObject for the methos
Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
InsertParameter | The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveOverride | Remove the override info
RemoveParameter | The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?
SetParameter |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef Constructor

public RMethodDef();

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef Properties

The properties of the RMethodDef class are listed below. For a complete list of RMethodDef class members, see the RMethodDef Members topic.

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodBody |
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo | Get or set the RPInvokeInfo object
ReturnType |

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.Attributes Property

public override System.Reflection.MethodAttributes Attributes {set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.CallingConventions Property

Gets and sets the CallingConventions for the method

public override System.Reflection.CallingConventions CallingConventions {set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.MethodBody Property

public Rail.MSIL.MethodBody MethodBody {get; set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.Name Property

Gets or sets the name of this member.

public override string Name {set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.PInvokeInfo Property

Get or set the RPInvokeInfo object

public override RPInvokeInfo PInvokeInfo {set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.ReturnType Property

public override RReturnType ReturnType {set;}

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef Methods

The methods of the RMethodDef class are listed below. For a complete list of RMethodDef class members, see the RMethodDef Members topic.

Public Instance Methods

Accept | Visits this method.
AddCustomAttributtes |
AddOverride | Sets the method declaration
AddParameter | Adds the given parameter to the end of the list, returning its position.
DefineMethodBody | Create the MethodBody object for this method
DefinePInvokeInfo | Create a new PInvokeObject for the methos
Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
InsertParameter | The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveOverride | Remove the override info
RemoveParameter | The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?
SetParameter |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.Accept Method

Visits this method.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

A method has no subelements

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.AddOverride Method

Sets the method declaration

public void AddOverride(
RMethodBase overrideM
);

Parameters

overrideM
The method to override

Return Value

The method to override

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.AddParameter Method

Adds the given parameter to the end of the list, returning its position.

public int AddParameter(
RParameter parameter
);

Parameters

parameter

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.DefineMethodBody Method

Create the MethodBody object for this method

public MethodBody DefineMethodBody();

Return Value

The MethodBody object created

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.DefinePInvokeInfo Method

Create a new PInvokeObject for the methos

public RPInvokeInfo DefinePInvokeInfo(
string dllName,
string entryName,
CallingConvention cc,
CharSet cs
);

Parameters

dllName
The name of the invoked dll
entryName
cc
cs

Return Value

The created object

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.InsertParameter Method

The parameters with indexes equal or greater than position are shifted one place up and the given parameter is inserted.

public void InsertParameter(
int position,
RParameter parameter
);

Parameters

position
parameter

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.RemoveOverride Method

Remove the override info

public void RemoveOverride(
RMethodBase overrideM
);

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.RemoveParameter Method

The parameter is removed and the indexes of the remaining parameters are adjusted. TODO: What if the parameter is refered in the code?

public RParameter RemoveParameter(
int index
);

Parameters

index

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodDef.SetParameter Method

public void SetParameter(
int position,
RParameter parameter
);

Parameters

position
parameter

See Also

RMethodDef Class | Rail.Reflect Namespace


RMethodRef Class

Represenets a method reference in the assembly

For a list of all members of this type, see RMethodRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RMethodBase
Rail.Reflect.RMethod
Rail.Reflect.RMethodRef

public sealed class RMethodRef : RMethod

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RMethodRef Members | Rail.Reflect Namespace


RMethodRef Members

RMethodRef overview

Public Instance Constructors

RMethodRef Overloaded. Initializes a new instance of the RMethodRef class.

Public Instance Properties

Attributes (inherited from RMethodBase) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CallingConventions (inherited from RMethodBase) | Gets and sets the CallingConventions for the method
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
IsOverrideBody (inherited from RMethodBase) | Check it this is the implementation of a virtual method
IsPInvoke (inherited from RMethodBase) | Verify if the method is PInvoke
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
MethodImplementationFlags (inherited from RMethodBase) | Gets the implementation attributes of this method. (Managed, IL, native, runtime, etc)
Name (inherited from RMember) | Gets or sets the name of this member.
OverridedMethod (inherited from RMethodBase) | Get the declarion of the method or the oveerided method
ParametersCount (inherited from RMethodBase) | Gets the total number of parameters of this method.
PInvokeInfo (inherited from RMethodBase) | Get the RPInvokeInfo object
ReturnType (inherited from RMethod) | Gets or Sets the return type of the method

Public Instance Methods

Equals (inherited from RMethodBase) | Override of the Equals method
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from RMethodBase) | Override of GetHashCode Method
GetParameter (inherited from RMethodBase) | Gets a parameter
GetParameters (inherited from RMethodBase) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RMethodRef Class | Rail.Reflect Namespace


RMethodRef Constructor

Create a new RMethodRef

Overload List

Create a new RMethodRef

public RMethodRef(MethodInfo,RAssemblyDef);

public RMethodRef(string,RType,RType,RParameter[],RAssemblyDef);

See Also

RMethodRef Class | Rail.Reflect Namespace


RMethodRef Constructor (MethodInfo, RAssemblyDef)

Create a new RMethodRef

public RMethodRef(
MethodInfo mi,
RAssemblyDef rad
);

Parameters

mi
The original MethodInfo object
rad
The RAssemblyDef object were to create the reference

See Also

RMethodRef Class | Rail.Reflect Namespace | RMethodRef Constructor Overload List


RMethodRef Constructor (String, RType, RType, RParameter[], RAssemblyDef)

public RMethodRef(
string name,
RType retType,
RType declaringType,
RParameter[] pi,
RAssemblyDef rad
);

Parameters

name
retType
declaringType
pi
rad

See Also

RMethodRef Class | Rail.Reflect Namespace | RMethodRef Constructor Overload List


RModule Class

For a list of all members of this type, see RModule Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RModule
Rail.Reflect.RModuleDef
Rail.Reflect.RModuleRef

public abstract class RModule : CustomAttributeOwner

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RModule Members | Rail.Reflect Namespace


RModule Members

RModule overview

Public Instance Properties

Assembly | Gets the parent assembly.
FileName | Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef
FullyQualifiedName | Gets the name of the module, including the pathname.
GlobalMethods |
Name | Gets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetGlobalMethod | Get a Global Method definition
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType Overloaded. Returns a specific type from this
Module
.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes Returns an array with all the types defined in this
Module
.
IsDefined (inherited from CustomAttributeOwner)
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RModule Constructor Initializes a new instance of the RModule class.

Protected Instance Fields

assembly |
fileName |
globalMethods | The table of the module global methods
name |
rTypes |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RModule Class | Rail.Reflect Namespace


RModule Constructor

Initializes a new instance of the RModule class.

protected RModule();

See Also

RModule Class | Rail.Reflect Namespace


RModule Fields

The fields of the RModule class are listed below. For a complete list of RModule class members, see the RModule Members topic.

Protected Instance Fields

assembly |
fileName |
globalMethods | The table of the module global methods
name |
rTypes |

See Also

RModule Class | Rail.Reflect Namespace


RModule.Assembly Property

Gets the parent assembly.

public virtual RAssembly Assembly {get;}

See Also

RModule Class | Rail.Reflect Namespace


RModule.FileName Property

Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef

public virtual string FileName {get; set;}

See Also

RModule Class | Rail.Reflect Namespace


RModule.GlobalMethods Property

public RMethodBase[] GlobalMethods {get;}

See Also

RModule Class | Rail.Reflect Namespace


RModule.Name Property

Gets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

public virtual string Name {get; set;}

See Also

RModule Class | Rail.Reflect Namespace


RModule.rTypes Field

protected ArrayList rTypes;

See Also

RModule Class | Rail.Reflect Namespace


RModule Properties

The properties of the RModule class are listed below. For a complete list of RModule class members, see the RModule Members topic.

Public Instance Properties

Assembly | Gets the parent assembly.
FileName | Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef
FullyQualifiedName | Gets the name of the module, including the pathname.
GlobalMethods |
Name | Gets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RModule Class | Rail.Reflect Namespace


RModule.FullyQualifiedName Property

Gets the name of the module, including the pathname.

public virtual string FullyQualifiedName {get;}

See Also

RModule Class | Rail.Reflect Namespace


RModule Methods

The methods of the RModule class are listed below. For a complete list of RModule class members, see the RModule Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetGlobalMethod | Get a Global Method definition
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType Overloaded. Returns a specific type from this
Module
.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes Returns an array with all the types defined in this
Module
.
IsDefined (inherited from CustomAttributeOwner)
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RModule Class | Rail.Reflect Namespace


RModule.GetGlobalMethod Method

Get a Global Method definition

public RMethodBase GetGlobalMethod(
string name,
string[] parameterTypesFullNames
);

Parameters

name
The name of the method
parameterTypesFullNames
the full names of the types of the parameters of the types correctly ordered

Return Value

The fetch global method

See Also

RModule Class | Rail.Reflect Namespace


GetType Method

An NDoc Documented Class Library

RModule.GetType Method

Returns a specific type from this

Module
.

Overload List

Inherited from Object.

public Type GetType();

Returns a specific type from this

Module
.

public virtual RType GetType(string);

See Also

RModule Class | Rail.Reflect Namespace


RModule.GetType Method (String)

Returns a specific type from this

Module
.

public virtual RType GetType(
string name
);

Parameters

name
The name of the type

Return Value

The requested type or null if it is not found

Remarks

This method can be used to retrieve array types based on primitive types that contained in this

Module
. The notation for specifying array types is the same as the one that can be used with the CLR methods
Type.GetType()
and
Assembly.GetType()
.

See Also

RModule Class | Rail.Reflect Namespace | RModule.GetType Overload List


RModule.GetTypes Method

Returns an array with all the types defined in this

Module
.

public virtual RType[] GetTypes();

Return Value

See Also

RModule Class | Rail.Reflect Namespace


RModuleDef Class

- A module is always associated with an assembly. - It's not permitted to change the assembly associated with a module. - Support constructors to create a new module based on a old one

For a list of all members of this type, see RModuleDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RModule
Rail.Reflect.RModuleDef

public sealed class RModuleDef : RModule, ICustomAttributeOwnerDef, IVisitable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RModuleDef Members | Rail.Reflect Namespace


RModuleDef Members

RModuleDef overview

Public Instance Properties

Assembly (inherited from RModule) | Gets the parent assembly.
FileName | Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef
FullyQualifiedName (inherited from RModule) | Gets the name of the module, including the pathname.
GlobalMethods (inherited from RModule) |
Name | Gets or sets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

Public Instance Methods

Accept | Visits this module.
AddCustomAttributtes
CopyType | Creates a new type in this assembly, using a given type as template. The new type is a copy of the given, except that it is part of this assembly object.
DefineGlobalMethod | Overloaded. Adds a Global Method to the module
DefineType | Creates a new type in this assembly.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetGlobalMethod (inherited from RModule) | Get a Global Method definition
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType Overloaded. Returns a specific type from this
Module
.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes Returns an array with all the types defined in this
Module
.
IsDefined (inherited from CustomAttributeOwner)
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveGlobalMethod | Overloaded. Remove a global methos definition from the module
RemoveType | Removes a type from this module.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef Properties

The properties of the RModuleDef class are listed below. For a complete list of RModuleDef class members, see the RModuleDef Members topic.

Public Instance Properties

Assembly (inherited from RModule) | Gets the parent assembly.
FileName | Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef
FullyQualifiedName (inherited from RModule) | Gets the name of the module, including the pathname.
GlobalMethods (inherited from RModule) |
Name | Gets or sets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.FileName Property

Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef

public override string FileName {set;}

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.Name Property

Gets or sets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

public override string Name {set;}

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef Methods

The methods of the RModuleDef class are listed below. For a complete list of RModuleDef class members, see the RModuleDef Members topic.

Public Instance Methods

Accept | Visits this module.
AddCustomAttributtes
CopyType | Creates a new type in this assembly, using a given type as template. The new type is a copy of the given, except that it is part of this assembly object.
DefineGlobalMethod | Overloaded. Adds a Global Method to the module
DefineType | Creates a new type in this assembly.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetGlobalMethod (inherited from RModule) | Get a Global Method definition
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType Overloaded. Returns a specific type from this
Module
.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes Returns an array with all the types defined in this
Module
.
IsDefined (inherited from CustomAttributeOwner)
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveGlobalMethod | Overloaded. Remove a global methos definition from the module
RemoveType | Removes a type from this module.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.Accept Method

Visits this module.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

Visits the module itself and the types contained in it. The order by which these elements are visited, depends on what is set in the Visitor.

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.CopyType Method

Creates a new type in this assembly, using a given type as template. The new type is a copy of the given, except that it is part of this assembly object.

public RTypeDef CopyType(
RType original,
string newName
);

Parameters

original
The type to be used as template.
newName
The name of the new type.

Return Value

See Also

RModuleDef Class | Rail.Reflect Namespace


DefineGlobalMethod Method

An NDoc Documented Class Library

RModuleDef.DefineGlobalMethod Method

Adds a Global Method to the module

Overload List

Adds a Global Method to the module

public RMethodBase DefineGlobalMethod(RMethodBase);

Define a new global method. To define a global constructor set the name .cctor and the returnType=NULL

public RMethodBase DefineGlobalMethod(string,RReturnType,RParameter[],MethodAttributes);

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.DefineGlobalMethod Method (RMethodBase)

Adds a Global Method to the module

public RMethodBase DefineGlobalMethod(
RMethodBase rMethod
);

Parameters

rMethod
The method to add

Return Value

The method added

See Also

RModuleDef Class | Rail.Reflect Namespace | RModuleDef.DefineGlobalMethod Overload List


RModuleDef.DefineGlobalMethod Method (String, RReturnType, RParameter[], MethodAttributes)

Define a new global method. To define a global constructor set the name .cctor and the returnType=NULL

public RMethodBase DefineGlobalMethod(
string name,
RReturnType returnType,
RParameter[] parameters,
MethodAttributes attributes
);

Parameters

name
The name of the method
returnType
The return type (NULL if is a constructor)
parameters
The array of RParameters
attributes
The method attributes

Return Value

The created global method

See Also

RModuleDef Class | Rail.Reflect Namespace | RModuleDef.DefineGlobalMethod Overload List


RModuleDef.DefineType Method

Creates a new type in this assembly.

public RTypeDef DefineType(
string name,
string nameSpace
);

Parameters

name
The name of the type. Must be unique inside the assembly that contains this module.
nameSpace

Return Value

See Also

RModuleDef Class | Rail.Reflect Namespace


GetType Method

An NDoc Documented Class Library

RModuleDef.GetType Method

Returns a specific type from this

Module
.

Overload List

Inherited from Object.

public Type GetType();

Returns a specific type from this

Module
.

public override RType GetType(string);

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.GetType Method (String)

Returns a specific type from this

Module
.

public override RType GetType(
string name
);

Parameters

name
The name of the type

Return Value

The requested type or null if it is not found

Remarks

This method can be used to retrieve array types based on primitive types that contained in this

Module
. The notation for specifying array types is the same as the one that can be used with the CLR methods
Type.GetType()
and
Assembly.GetType()
.

See Also

RModuleDef Class | Rail.Reflect Namespace | RModuleDef.GetType Overload List


RModuleDef.GetTypes Method

Returns an array with all the types defined in this

Module
.

public override RType[] GetTypes();

Return Value

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RModuleDef Class | Rail.Reflect Namespace


RemoveGlobalMethod Method

An NDoc Documented Class Library

RModuleDef.RemoveGlobalMethod Method

Remove a global method definiton from the module

Overload List

Remove a global method definiton from the module

public RMethodBase RemoveGlobalMethod(RMethodBase);

Remove a global methos definition from the module

public RMethodBase RemoveGlobalMethod(string,RParameter[]);

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleDef.RemoveGlobalMethod Method (RMethodBase)

Remove a global method definiton from the module

public RMethodBase RemoveGlobalMethod(
RMethodBase rm
);

Parameters

rm
The method to remove

Return Value

The removed method

See Also

RModuleDef Class | Rail.Reflect Namespace | RModuleDef.RemoveGlobalMethod Overload List


RModuleDef.RemoveGlobalMethod Method (String, RParameter[])

Remove a global methos definition from the module

public RMethodBase RemoveGlobalMethod(
string methodName,
RParameter[] methodParameters
);

Parameters

methodName
The name of the method
methodParameters
the parameters of the method

Return Value

See Also

RModuleDef Class | Rail.Reflect Namespace | RModuleDef.RemoveGlobalMethod Overload List


RModuleDef.RemoveType Method

Removes a type from this module.

public void RemoveType(
string typeName
);

Parameters

typeName
The name of the type to be removed

See Also

RModuleDef Class | Rail.Reflect Namespace


RModuleRef Class

For a list of all members of this type, see RModuleRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RModule
Rail.Reflect.RModuleRef

public sealed class RModuleRef : RModule

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RModuleRef Members | Rail.Reflect Namespace


RModuleRef Members

RModuleRef overview

Public Instance Properties

Assembly (inherited from RModule) | Gets the parent assembly.
FileName (inherited from RModule) | Gets or sets the filename of the module, if it is a RModuleDef, probably this will be the same file as the RAssemblyDef
FullyQualifiedName (inherited from RModule) | Gets the name of the module, including the pathname.
GlobalMethods (inherited from RModule) |
Name (inherited from RModule) | Gets the name of the module. This is also the filename where this module will be saved. If the assembly has only one module, this name must match the filename where the assembly is saved.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetGlobalMethod (inherited from RModule) | Get a Global Method definition
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from RModule) Overloaded. Returns a specific type from this
Module
.
GetType (inherited from Object) | Overloaded. Gets the Type of the current instance.
GetTypes (inherited from RModule) Returns an array with all the types defined in this
Module
.
IsDefined (inherited from CustomAttributeOwner)
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RModuleRef Class | Rail.Reflect Namespace


RParameter Class

For a list of all members of this type, see RParameter Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RParameter

public class RParameter : CustomAttributeOwner, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RParameter Members | Rail.Reflect Namespace


RParameter Members

RParameter overview

Public Instance Constructors

RParameter Overloaded. Initializes a new instance of the RParameter class.

Public Instance Properties

Attributes |
HasMarshal | Verify if the field has marshal information
MarshalSpec | Get the field marshaling information
Name |
ParameterType |
Sequence |

Public Instance Methods

AddCustomAttributtes |
DefineMarshalSpec | Define the MarshalSpec
DefineMarshalSpecAsArray |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveMarshal | Remove the marshal information
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RParameter Class | Rail.Reflect Namespace


RParameter Constructor

Creates a new RParamenter

Overload List

public RParameter(int,RType);

Creates a new RParamenter

public RParameter(int,int,string,RType);

public RParameter(ParameterInfo,RAssemblyDef);

public RParameter(ParameterInfo,RAssemblyDef,MethodAttributes);

See Also

RParameter Class | Rail.Reflect Namespace


RParameter Constructor (Int32, Int32, String, RType)

Creates a new RParamenter

public RParameter(
int sequence,
int attributes,
string name,
RType type
);

Parameters

sequence
The position
attributes
The ParamAttributes
name
The name of the Parameter
type
The Rtype of the parameter

See Also

RParameter Class | Rail.Reflect Namespace | RParameter Constructor Overload List


RParameter Constructor (Int32, RType)

public RParameter(
int sequence,
RType type
);

Parameters

sequence
type

See Also

RParameter Class | Rail.Reflect Namespace | RParameter Constructor Overload List


RParameter Constructor (ParameterInfo, RAssemblyDef, MethodAttributes)

public RParameter(
ParameterInfo param,
RAssemblyDef rad,
MethodAttributes me
);

Parameters

param
rad
me

See Also

RParameter Class | Rail.Reflect Namespace | RParameter Constructor Overload List


RParameter Constructor (ParameterInfo, RAssemblyDef)

public RParameter(
ParameterInfo param,
RAssemblyDef rad
);

Parameters

param
rad

See Also

RParameter Class | Rail.Reflect Namespace | RParameter Constructor Overload List


RParameter Properties

The properties of the RParameter class are listed below. For a complete list of RParameter class members, see the RParameter Members topic.

Public Instance Properties

Attributes |
HasMarshal | Verify if the field has marshal information
MarshalSpec | Get the field marshaling information
Name |
ParameterType |
Sequence |

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.Attributes Property

public System.Reflection.ParameterAttributes Attributes {get; set;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.HasMarshal Property

Verify if the field has marshal information

public bool HasMarshal {get;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.MarshalSpec Property

Get the field marshaling information

public MarshalSpec MarshalSpec {get; set;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.Name Property

public string Name {get; set;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.ParameterType Property

public RType ParameterType {get; set;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.Sequence Property

public int Sequence {get; set;}

See Also

RParameter Class | Rail.Reflect Namespace


RParameter Methods

The methods of the RParameter class are listed below. For a complete list of RParameter class members, see the RParameter Members topic.

Public Instance Methods

AddCustomAttributtes |
DefineMarshalSpec | Define the MarshalSpec
DefineMarshalSpecAsArray |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveMarshal | Remove the marshal information
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.DefineMarshalSpec Method

Define the MarshalSpec

public MarshalSpec DefineMarshalSpec(
UnmanagedType typ
);

Parameters

typ

Return Value

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.DefineMarshalSpecAsArray Method

public MarshalSpec DefineMarshalSpecAsArray(
UnmanagedType arrayType,
int ParamNum,
int ElemMult,
int NumElem
);

Parameters

arrayType
ParamNum
ElemMult
NumElem

Return Value

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RParameter Class | Rail.Reflect Namespace


RParameter.RemoveMarshal Method

Remove the marshal information

public void RemoveMarshal();

See Also

RParameter Class | Rail.Reflect Namespace


RPInvokeInfo Class

For a list of all members of this type, see RPInvokeInfo Members.

System.Object
Rail.Reflect.RPInvokeInfo

public class RPInvokeInfo

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RPInvokeInfo Members | Rail.Reflect Namespace


RPInvokeInfo Members

RPInvokeInfo overview

Public Instance Properties

DLLName
EntryName
NativeCallingConvention
NativeCharSet

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RPInvokeInfo Properties

The properties of the RPInvokeInfo class are listed below. For a complete list of RPInvokeInfo class members, see the RPInvokeInfo Members topic.

Public Instance Properties

DLLName
EntryName
NativeCallingConvention
NativeCharSet

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RPInvokeInfo.DLLName Property

public string DLLName {get; set;}

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RPInvokeInfo.EntryName Property

public string EntryName {get; set;}

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RPInvokeInfo.NativeCallingConvention Property

public System.Runtime.InteropServices.CallingConvention NativeCallingConvention {get; set;}

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RPInvokeInfo.NativeCharSet Property

public System.Runtime.InteropServices.CharSet NativeCharSet {get; set;}

See Also

RPInvokeInfo Class | Rail.Reflect Namespace


RProperty Class

For a list of all members of this type, see RProperty Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RProperty
Rail.Reflect.RPropertyDef
Rail.Reflect.RPropertyRef

public abstract class RProperty : RMember

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RProperty Members | Rail.Reflect Namespace


RProperty Members

RProperty overview

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CanRead |
CanWrite |
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
GetMethod | Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
PropertyType |
SetMethod | Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetIndexParameters | Only the default property or indexer (refered as Item) has more than one attribute.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RProperty Constructor Initializes a new instance of the RProperty class.

Protected Instance Fields

attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
getMethod
indexParameters
memberType (inherited from RMember)
name (inherited from RMember)
propertyType
setMethod

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RProperty Class | Rail.Reflect Namespace


RProperty Constructor

Initializes a new instance of the RProperty class.

protected RProperty();

See Also

RProperty Class | Rail.Reflect Namespace


RProperty Fields

The fields of the RProperty class are listed below. For a complete list of RProperty class members, see the RProperty Members topic.

Protected Instance Fields

attributes
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
getMethod
indexParameters
memberType (inherited from RMember)
name (inherited from RMember)
propertyType
setMethod

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.Attributes Property

public virtual System.Reflection.PropertyAttributes Attributes {get; set;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.GetMethod Property

Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

public virtual RMethod GetMethod {get; set;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.indexParameters Field

protected ArrayList indexParameters;

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.PropertyType Property

public virtual RType PropertyType {get; set;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.SetMethod Property

Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

public virtual RMethod SetMethod {get; set;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty Properties

The properties of the RProperty class are listed below. For a complete list of RProperty class members, see the RProperty Members topic.

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CanRead |
CanWrite |
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
GetMethod | Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
PropertyType |
SetMethod | Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.CanRead Property

public virtual bool CanRead {get;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.CanWrite Property

public virtual bool CanWrite {get;}

See Also

RProperty Class | Rail.Reflect Namespace


RProperty Methods

The methods of the RProperty class are listed below. For a complete list of RProperty class members, see the RProperty Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetIndexParameters | Only the default property or indexer (refered as Item) has more than one attribute.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RProperty Class | Rail.Reflect Namespace


RProperty.GetIndexParameters Method

Only the default property or indexer (refered as Item) has more than one attribute.

public virtual RParameter[] GetIndexParameters();

Return Value

See Also

RProperty Class | Rail.Reflect Namespace


RPropertyDef Class

Done

For a list of all members of this type, see RPropertyDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RProperty
Rail.Reflect.RPropertyDef

public class RPropertyDef : RProperty, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RPropertyDef Members | Rail.Reflect Namespace


RPropertyDef Members

RPropertyDef overview

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CanRead (inherited from RProperty) |
CanWrite (inherited from RProperty) |
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
GetMethod | Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name |
PropertyType |
SetMethod | Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

Public Instance Methods

Accept | Visits this property.
AddCustomAttributtes |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetIndexParameters (inherited from RProperty) | Only the default property or indexer (refered as Item) has more than one attribute.
GetType (inherited from Object) | Gets the Type of the current instance.
InsertIndexParameter |
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveIndexParameter |
SetIndexParameters | Overloaded.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

attributes (inherited from RProperty)
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
getMethod (inherited from RProperty)
indexParameters (inherited from RProperty)
memberType (inherited from RMember)
name (inherited from RMember)
propertyType (inherited from RProperty)
setMethod (inherited from RProperty)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef Properties

The properties of the RPropertyDef class are listed below. For a complete list of RPropertyDef class members, see the RPropertyDef Members topic.

Public Instance Properties

Attributes |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CanRead (inherited from RProperty) |
CanWrite (inherited from RProperty) |
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
GetMethod | Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name |
PropertyType |
SetMethod | Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.Attributes Property

public override System.Reflection.PropertyAttributes Attributes {set;}

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.GetMethod Property

Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

public override RMethod GetMethod {set;}

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.Name Property

public override string Name {set;}

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.PropertyType Property

public override RType PropertyType {set;}

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.SetMethod Property

Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

public override RMethod SetMethod {set;}

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef Methods

The methods of the RPropertyDef class are listed below. For a complete list of RPropertyDef class members, see the RPropertyDef Members topic.

Public Instance Methods

Accept | Visits this property.
AddCustomAttributtes |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetIndexParameters (inherited from RProperty) | Only the default property or indexer (refered as Item) has more than one attribute.
GetType (inherited from Object) | Gets the Type of the current instance.
InsertIndexParameter |
IsDefined (inherited from CustomAttributeOwner) |
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveIndexParameter |
SetIndexParameters | Overloaded.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.Accept Method

Visits this property.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

A property has no subelements

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.InsertIndexParameter Method

public void InsertIndexParameter(
RParameter parameter,
int index
);

Parameters

parameter
index

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.RemoveIndexParameter Method

public RParameter RemoveIndexParameter(
int index
);

Parameters

index

Return Value

See Also

RPropertyDef Class | Rail.Reflect Namespace


SetIndexParameters Method

An NDoc Documented Class Library

RPropertyDef.SetIndexParameters Method

Overload List

public void SetIndexParameters(RParameter[]);

public void SetIndexParameters(RType[]);

See Also

RPropertyDef Class | Rail.Reflect Namespace


RPropertyDef.SetIndexParameters Method (RParameter[])

public void SetIndexParameters(
RParameter[] parameter
);

Parameters

parameter

See Also

RPropertyDef Class | Rail.Reflect Namespace | RPropertyDef.SetIndexParameters Overload List


RPropertyDef.SetIndexParameters Method (RType[])

public void SetIndexParameters(
RType[] parameter
);

Parameters

parameter

See Also

RPropertyDef Class | Rail.Reflect Namespace | RPropertyDef.SetIndexParameters Overload List


RPropertyRef Class

Done

For a list of all members of this type, see RPropertyRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RProperty
Rail.Reflect.RPropertyRef

public class RPropertyRef : RProperty

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RPropertyRef Members | Rail.Reflect Namespace


RPropertyRef Members

RPropertyRef overview

Public Instance Properties

Attributes (inherited from RProperty) |
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
CanRead (inherited from RProperty) |
CanWrite (inherited from RProperty) |
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
GetMethod (inherited from RProperty) | Gets or sets the get accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Name (inherited from RMember) | Gets or sets the name of this member.
PropertyType (inherited from RProperty) |
SetMethod (inherited from RProperty) | Gets or sets the set accessor method. Returns a reference to the internal method object. Changes done on that reference will reflect in the internal method. If the method name is changed from the default set_/, an exception will be raised when the assembly is generated.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetIndexParameters (inherited from RProperty) | Only the default property or indexer (refered as Item) has more than one attribute.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

attributes (inherited from RProperty)
bindingFlags (inherited from RMember)
declaringType (inherited from RMember)
getMethod (inherited from RProperty)
indexParameters (inherited from RProperty)
memberType (inherited from RMember)
name (inherited from RMember)
propertyType (inherited from RProperty)
setMethod (inherited from RProperty)

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RPropertyRef Class | Rail.Reflect Namespace


RResource Class

Summary description for Resource.

For a list of all members of this type, see RResource Members.

System.Object
Rail.Reflect.RResource

public class RResource

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RResource Members | Rail.Reflect Namespace


RResource Members

RResource overview

Public Instance Constructors

RResource Constructor

Public Instance Properties

Attributes
Data
FileName
Name

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

RResource Class | Rail.Reflect Namespace


RResource Constructor

public RResource(
string name,
byte[] data,
ResourceAttributes attributes,
string fileName
);

Parameters

name
data
attributes
fileName

See Also

RResource Class | Rail.Reflect Namespace


RResource Properties

The properties of the RResource class are listed below. For a complete list of RResource class members, see the RResource Members topic.

Public Instance Properties

Attributes
Data
FileName
Name

See Also

RResource Class | Rail.Reflect Namespace


RResource.Attributes Property

public System.Reflection.ResourceAttributes Attributes {get; set;}

See Also

RResource Class | Rail.Reflect Namespace


RResource.Data Property

public byte[] Data {get; set;}

See Also

RResource Class | Rail.Reflect Namespace


RResource.FileName Property

public string FileName {get; set;}

See Also

RResource Class | Rail.Reflect Namespace


RResource.Name Property

public string Name {get; set;}

See Also

RResource Class | Rail.Reflect Namespace


RReturnType Class

Done

For a list of all members of this type, see RReturnType Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RReturnType

public class RReturnType : CustomAttributeOwner

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RReturnType Members | Rail.Reflect Namespace


RReturnType Members

RReturnType overview

Public Instance Constructors

RReturnType Overloaded. Initializes a new instance of the RReturnType class.

Public Instance Properties

ReturnType The return type.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Fields

returnType

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RReturnType Class | Rail.Reflect Namespace


RReturnType Constructor

Overload List

public RReturnType(RType);

public RReturnType(Type,RAssemblyDef);

See Also

RReturnType Class | Rail.Reflect Namespace


RReturnType Constructor (RType)

public RReturnType(
RType type
);

Parameters

type

See Also

RReturnType Class | Rail.Reflect Namespace | RReturnType Constructor Overload List


RReturnType Constructor (Type, RAssemblyDef)

public RReturnType(
Type type,
RAssemblyDef rad
);

Parameters

type
rad

See Also

RReturnType Class | Rail.Reflect Namespace | RReturnType Constructor Overload List


RReturnType Fields

The fields of the RReturnType class are listed below. For a complete list of RReturnType class members, see the RReturnType Members topic.

Protected Instance Fields

returnType

See Also

RReturnType Class | Rail.Reflect Namespace


RReturnType.ReturnType Property

The return type.

public virtual RType ReturnType {get; set;}

See Also

RReturnType Class | Rail.Reflect Namespace


RReturnType Properties

The properties of the RReturnType class are listed below. For a complete list of RReturnType class members, see the RReturnType Members topic.

Public Instance Properties

ReturnType The return type.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RReturnType Class | Rail.Reflect Namespace


RType Class

For a list of all members of this type, see RType Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RType
Rail.Reflect.RTypeDef
Rail.Reflect.RTypeRef

public abstract class RType : RMember

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RType Members | Rail.Reflect Namespace


RType Members

RType overview

Public Instance Properties

Assembly | Gets the assembly where this type is contained.
Attributes | Gets the attributes of this type
BaseType | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType | When overridden in a derived class, returns the RType of the object encompassed or referred to by the current array.
FieldsCount
FullName | Gets the full name of the type. The full name is composed of the namespace"."type name TODO: What to do if it is a nested type? - SOLVED
IsArray Whether this
RType
instance represents an array.
IsNested Whether this
RType
instance is a nested type.
IsPrimitive Whether this
RType
instance represents a primitive type.
IsValueType Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module | Gets the module where this type is contained.
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace | The namespace of the type, should be null if it is nested
PackingSize
RArrayShape | If this object represents an array this property gets or sets it's shape
TypeSize

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank | If this object represents an array, this method returns the number of dimensions.
GetConstructor | Overloaded.
GetConstructors | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent |
GetEvents |
GetField | Overloaded.
GetFields | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface | Searches for the interface with the given name.
GetInterfaces | Returns all interfaces implemented by this type.
GetMethod |
GetMethods | Overloaded.
GetProperties |
GetProperty |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Constructors

RType Constructor Initializes a new instance of the RType class.

Protected Instance Fields

arrayRank
arrayShape
assembly
attributes
baseType
bindingFlags (inherited from RMember)
constructors
declaringType (inherited from RMember)
elementType
events
fields
interfaces
memberType (inherited from RMember)
methods
module
name (inherited from RMember)
nameSpace
packingSize
properties
typeSize

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RType Class | Rail.Reflect Namespace


RType Constructor

Initializes a new instance of the RType class.

protected RType();

See Also

RType Class | Rail.Reflect Namespace


RType Fields

The fields of the RType class are listed below. For a complete list of RType class members, see the RType Members topic.

Protected Instance Fields

arrayRank
arrayShape
assembly
attributes
baseType
bindingFlags (inherited from RMember)
constructors
declaringType (inherited from RMember)
elementType
events
fields
interfaces
memberType (inherited from RMember)
methods
module
name (inherited from RMember)
nameSpace
packingSize
properties
typeSize

See Also

RType Class | Rail.Reflect Namespace


RType.arrayRank Field

protected int arrayRank;

See Also

RType Class | Rail.Reflect Namespace


RType.arrayShape Field

protected ArrayShape arrayShape;

See Also

RType Class | Rail.Reflect Namespace


RType.Assembly Property

Gets the assembly where this type is contained.

public virtual RAssembly Assembly {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.Attributes Property

Gets the attributes of this type

public virtual System.Reflection.TypeAttributes Attributes {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.BaseType Property

Gets or sets the base class of this type.

public virtual RType BaseType {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.constructors Field

protected ArrayList constructors;

See Also

RType Class | Rail.Reflect Namespace


RType.ElementType Property

When overridden in a derived class, returns the RType of the object encompassed or referred to by the current array.

public virtual RType ElementType {get; set;}

Exceptions

Exception Type | Condition
NotSupportedException | This type is not an array.

See Also

RType Class | Rail.Reflect Namespace


RType.events Field

protected ArrayList events;

See Also

RType Class | Rail.Reflect Namespace


RType.fields Field

protected ArrayList fields;

See Also

RType Class | Rail.Reflect Namespace


RType.interfaces Field

protected ArrayList interfaces;

See Also

RType Class | Rail.Reflect Namespace


RType.methods Field

protected ArrayList methods;

See Also

RType Class | Rail.Reflect Namespace


RType.Module Property

Gets the module where this type is contained.

public virtual RModule Module {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.NameSpace Property

The namespace of the type, should be null if it is nested

public virtual string NameSpace {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.PackingSize Property

public virtual System.Reflection.Emit.PackingSize PackingSize {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.properties Field

protected ArrayList properties;

See Also

RType Class | Rail.Reflect Namespace


RType.TypeSize Property

public virtual int TypeSize {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType Properties

The properties of the RType class are listed below. For a complete list of RType class members, see the RType Members topic.

Public Instance Properties

Assembly | Gets the assembly where this type is contained.
Attributes | Gets the attributes of this type
BaseType | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType | When overridden in a derived class, returns the RType of the object encompassed or referred to by the current array.
FieldsCount
FullName | Gets the full name of the type. The full name is composed of the namespace"."type name TODO: What to do if it is a nested type? - SOLVED
IsArray Whether this
RType
instance represents an array.
IsNested Whether this
RType
instance is a nested type.
IsPrimitive Whether this
RType
instance represents a primitive type.
IsValueType Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module | Gets the module where this type is contained.
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace | The namespace of the type, should be null if it is nested
PackingSize
RArrayShape | If this object represents an array this property gets or sets it's shape
TypeSize

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RType Class | Rail.Reflect Namespace


RType.FieldsCount Property

public virtual int FieldsCount {get;}

See Also

RType Class | Rail.Reflect Namespace


RType.FullName Property

Gets the full name of the type. The full name is composed of the namespace"."type name TODO: What to do if it is a nested type? - SOLVED

public virtual string FullName {get; set;}

See Also

RType Class | Rail.Reflect Namespace


RType.IsArray Property

Whether this

RType
instance represents an array.

public virtual bool IsArray {get;}

See Also

RType Class | Rail.Reflect Namespace


RType.IsNested Property

Whether this

RType
instance is a nested type.

public virtual bool IsNested {get;}

See Also

RType Class | Rail.Reflect Namespace


RType.IsPrimitive Property

Whether this

RType
instance represents a primitive type.

public virtual bool IsPrimitive {get;}

Remarks

All primitive types are value types, but not all value types are primitives -- e.g. user defined value types are not primitives.

See Also

RType Class | Rail.Reflect Namespace


RType.IsValueType Property

Whether this

RType
instance represents a Value type.

public virtual bool IsValueType {get;}

Remarks

A type is a value type only if it derives from

System.ValueType

See Also

RType Class | Rail.Reflect Namespace


RType.RArrayShape Property

If this object represents an array this property gets or sets it's shape

public virtual ARRAY.ArrayShape RArrayShape {get; set;}

Exceptions

Exception Type | Condition
NotSupportedException | This type is not an array.

See Also

RType Class | Rail.Reflect Namespace


RType Methods

The methods of the RType class are listed below. For a complete list of RType class members, see the RType Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank | If this object represents an array, this method returns the number of dimensions.
GetConstructor | Overloaded.
GetConstructors | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent |
GetEvents |
GetField | Overloaded.
GetFields | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface | Searches for the interface with the given name.
GetInterfaces | Returns all interfaces implemented by this type.
GetMethod |
GetMethods | Overloaded.
GetProperties |
GetProperty |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RType Class | Rail.Reflect Namespace


RType.GetArrayRank Method

If this object represents an array, this method returns the number of dimensions.

public virtual int GetArrayRank();

Exceptions

Exception Type | Condition
NotSupportedException | This type is not an array.

See Also

RType Class | Rail.Reflect Namespace


GetConstructor Method

An NDoc Documented Class Library

RType.GetConstructor Method

Overload List

public virtual RConstructor GetConstructor(RParameter[]);

public virtual RConstructor GetConstructor(BindingFlags,RParameter[]);

See Also

RType Class | Rail.Reflect Namespace


RType.GetConstructor Method (RParameter[])

public virtual RConstructor GetConstructor(
RParameter[] args
);

Parameters

args

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetConstructor Overload List


RType.GetConstructor Method (BindingFlags, RParameter[])

public virtual RConstructor GetConstructor(
BindingFlags bf,
RParameter[] args
);

Parameters

bf
args

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetConstructor Overload List


GetConstructors Method

An NDoc Documented Class Library

RType.GetConstructors Method

Overload List

public virtual RConstructor[] GetConstructors();

public virtual RConstructor[] GetConstructors(BindingFlags);

See Also

RType Class | Rail.Reflect Namespace


RType.GetConstructors Method ()

public virtual RConstructor[] GetConstructors();

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetConstructors Overload List


RType.GetConstructors Method (BindingFlags)

public virtual RConstructor[] GetConstructors(
BindingFlags bf
);

Parameters

bf

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetConstructors Overload List


RType.GetEvent Method

public virtual REvent GetEvent(
string eventName
);

Parameters

eventName

Return Value

See Also

RType Class | Rail.Reflect Namespace


RType.GetEvents Method

public virtual REvent[] GetEvents();

Return Value

See Also

RType Class | Rail.Reflect Namespace


GetField Method

An NDoc Documented Class Library

RType.GetField Method

Overload List

public virtual RField GetField(string);

public virtual RField GetField(string,BindingFlags);

See Also

RType Class | Rail.Reflect Namespace


RType.GetField Method (String)

public virtual RField GetField(
string name
);

Parameters

name

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetField Overload List


RType.GetField Method (String, BindingFlags)

public virtual RField GetField(
string name,
BindingFlags bf
);

Parameters

name
bf

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetField Overload List


GetFields Method

An NDoc Documented Class Library

RType.GetFields Method

Overload List

public virtual RField[] GetFields();

public virtual RField[] GetFields(BindingFlags);

See Also

RType Class | Rail.Reflect Namespace


RType.GetFields Method ()

public virtual RField[] GetFields();

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetFields Overload List


RType.GetFields Method (BindingFlags)

public virtual RField[] GetFields(
BindingFlags bf
);

Parameters

bf

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetFields Overload List


RType.GetInterface Method

Searches for the interface with the given name.

public virtual RType GetInterface(
string name
);

Parameters

name
The fully qualified name of the interface to search for.

Return Value

The interface if it is found, null otherwise.

See Also

RType Class | Rail.Reflect Namespace


RType.GetInterfaces Method

Returns all interfaces implemented by this type.

public virtual RType[] GetInterfaces();

Return Value

An array with the interfaces implemented by this type.

See Also

RType Class | Rail.Reflect Namespace


RType.GetMethod Method

public virtual RMethod GetMethod(
string name,
RType returnValue,
RParameter[] args
);

Parameters

name
returnValue
args

Return Value

See Also

RType Class | Rail.Reflect Namespace


GetMethods Method

An NDoc Documented Class Library

RType.GetMethods Method

Overload List

public virtual RMethod[] GetMethods();

public virtual RMethod[] GetMethods(BindingFlags);

See Also

RType Class | Rail.Reflect Namespace


RType.GetMethods Method ()

public virtual RMethod[] GetMethods();

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetMethods Overload List


RType.GetMethods Method (BindingFlags)

public virtual RMethod[] GetMethods(
BindingFlags bf
);

Parameters

bf

Return Value

See Also

RType Class | Rail.Reflect Namespace | RType.GetMethods Overload List


RType.GetProperties Method

public virtual RProperty[] GetProperties();

Return Value

See Also

RType Class | Rail.Reflect Namespace


RType.GetProperty Method

public virtual RProperty GetProperty(
string name
);

Parameters

name

Return Value

See Also

RType Class | Rail.Reflect Namespace


RTypeDef Class

For a list of all members of this type, see RTypeDef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RType
Rail.Reflect.RTypeDef

public sealed class RTypeDef : RType, IVisitable, ICustomAttributeOwnerDef

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RTypeDef Members | Rail.Reflect Namespace


RTypeDef Members

RTypeDef overview

Public Instance Properties

Assembly
Attributes | Gets or sets the attributes of this type
BaseType | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType
FieldsCount (inherited from RType)
FullName (inherited from RType) | Gets the full name of the type. The full name is composed of the namespace"."type name TODO: What to do if it is a nested type? - SOLVED
IsArray (inherited from RType) Whether this
RType
instance represents an array.
IsNested (inherited from RType) Whether this
RType
instance is a nested type.
IsPrimitive (inherited from RType) Whether this
RType
instance represents a primitive type.
IsValueType (inherited from RType) Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace | The namespace of the type, should be null if it is nested
PackingSize
RArrayShape
TypeSize

Public Instance Methods

Accept | Visits this type.
AddCustomAttributtes |
AddInterface | Adds a new interface to the ones implemented by this type.
CopyConstructor |
CopyEvent |
CopyField |
CopyMethod |
CopyMethodBody | Overloaded.
CopyProperty |
DefineConstructor | Overloaded.
DefineEvent |
DefineField |
DefineMethod | Overloaded.
DefineProperty |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank (inherited from RType) | If this object represents an array, this method returns the number of dimensions.
GetConstructor (inherited from RType) | Overloaded.
GetConstructors (inherited from RType) | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent (inherited from RType) |
GetEvents (inherited from RType) |
GetField (inherited from RType) | Overloaded.
GetFields (inherited from RType) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface (inherited from RType) | Searches for the interface with the given name.
GetInterfaces (inherited from RType) | Returns all interfaces implemented by this type.
GetMethod (inherited from RType) |
GetMethods (inherited from RType) | Overloaded.
GetProperties (inherited from RType) |
GetProperty (inherited from RType) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveConstructor | Remove a Constructor TODO: What if the constructor is used in the Assembly
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveEvent | TODO: What if there's a reference in the code to this event??
RemoveField |
RemoveInterface | Removes the given interface from the list of implemented interfaces
RemoveMethod |
RemoveProperty | TODO: What if there's a reference to this property in the code
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef Properties

The properties of the RTypeDef class are listed below. For a complete list of RTypeDef class members, see the RTypeDef Members topic.

Public Instance Properties

Assembly
Attributes | Gets or sets the attributes of this type
BaseType | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType
FieldsCount (inherited from RType)
FullName (inherited from RType) | Gets the full name of the type. The full name is composed of the namespace"."type name TODO: What to do if it is a nested type? - SOLVED
IsArray (inherited from RType) Whether this
RType
instance represents an array.
IsNested (inherited from RType) Whether this
RType
instance is a nested type.
IsPrimitive (inherited from RType) Whether this
RType
instance represents a primitive type.
IsValueType (inherited from RType) Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace | The namespace of the type, should be null if it is nested
PackingSize
RArrayShape
TypeSize

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.Assembly Property

public override RAssembly Assembly {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.Attributes Property

Gets or sets the attributes of this type

public override System.Reflection.TypeAttributes Attributes {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.BaseType Property

Gets or sets the base class of this type.

public override RType BaseType {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.ElementType Property

public override RType ElementType {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.Module Property

public override RModule Module {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.NameSpace Property

The namespace of the type, should be null if it is nested

public override string NameSpace {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.PackingSize Property

public override System.Reflection.Emit.PackingSize PackingSize {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RArrayShape Property

public override ARRAY.ArrayShape RArrayShape {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.TypeSize Property

public override int TypeSize {set;}

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef Methods

The methods of the RTypeDef class are listed below. For a complete list of RTypeDef class members, see the RTypeDef Members topic.

Public Instance Methods

Accept | Visits this type.
AddCustomAttributtes |
AddInterface | Adds a new interface to the ones implemented by this type.
CopyConstructor |
CopyEvent |
CopyField |
CopyMethod |
CopyMethodBody | Overloaded.
CopyProperty |
DefineConstructor | Overloaded.
DefineEvent |
DefineField |
DefineMethod | Overloaded.
DefineProperty |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank (inherited from RType) | If this object represents an array, this method returns the number of dimensions.
GetConstructor (inherited from RType) | Overloaded.
GetConstructors (inherited from RType) | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent (inherited from RType) |
GetEvents (inherited from RType) |
GetField (inherited from RType) | Overloaded.
GetFields (inherited from RType) | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface (inherited from RType) | Searches for the interface with the given name.
GetInterfaces (inherited from RType) | Returns all interfaces implemented by this type.
GetMethod (inherited from RType) |
GetMethods (inherited from RType) | Overloaded.
GetProperties (inherited from RType) |
GetProperty (inherited from RType) |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
RemoveConstructor | Remove a Constructor TODO: What if the constructor is used in the Assembly
RemoveCustomAttribute | TODO: How should the attribute be specified?
RemoveEvent | TODO: What if there's a reference in the code to this event??
RemoveField |
RemoveInterface | Removes the given interface from the list of implemented interfaces
RemoveMethod |
RemoveProperty | TODO: What if there's a reference to this property in the code
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.Accept Method

Visits this type.

public void Accept(
Visitor v
);

Parameters

v
The visitor to be used.

Implements

IVisitable.Accept

Remarks

A type has the following subelements: fields, methods, constructors, properties and events. The order in which they are visited depends on the Walker.

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.AddCustomAttributtes Method

public void AddCustomAttributtes(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.AddCustomAttributtes

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.AddInterface Method

Adds a new interface to the ones implemented by this type.

public void AddInterface(
RType interfaceType
);

Parameters

interfaceType
The type of interface to implement

Remarks

This method does nothing if the interface is alredy implemented.

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.CopyConstructor Method

public RConstructorDef CopyConstructor(
RConstructorDef source
);

Parameters

source

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.CopyEvent Method

public REventDef CopyEvent(
REvent original,
string newName
);

Parameters

original
newName

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.CopyField Method

public RFieldDef CopyField(
RField original,
string newName
);

Parameters

original
newName

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.CopyMethod Method

public RMethodDef CopyMethod(
RMethodDef source,
string newName
);

Parameters

source
newName

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


CopyMethodBody Method

An NDoc Documented Class Library

RTypeDef.CopyMethodBody Method

Overload List

public void CopyMethodBody(RConstructorDef,RConstructorDef);

public void CopyMethodBody(RMethodDef,RMethodDef);

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.CopyMethodBody Method (RConstructorDef, RConstructorDef)

public void CopyMethodBody(
RConstructorDef source,
RConstructorDef target
);

Parameters

source
target

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.CopyMethodBody Overload List


RTypeDef.CopyMethodBody Method (RMethodDef, RMethodDef)

public void CopyMethodBody(
RMethodDef source,
RMethodDef target
);

Parameters

source
target

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.CopyMethodBody Overload List


RTypeDef.CopyProperty Method

public RPropertyDef CopyProperty(
RProperty source,
string newName
);

Parameters

source
newName

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


DefineConstructor Method

An NDoc Documented Class Library

RTypeDef.DefineConstructor Method

Overload List

public RConstructorDef DefineConstructor(RParameter[]);

public RConstructorDef DefineConstructor(RParameter[],bool);

public RConstructorDef DefineConstructor(RParameter[],string);

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.DefineConstructor Method (RParameter[])

public RConstructorDef DefineConstructor(
RParameter[] args
);

Parameters

args

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.DefineConstructor Overload List


RTypeDef.DefineConstructor Method (RParameter[], Boolean)

public RConstructorDef DefineConstructor(
RParameter[] args,
bool isStatic
);

Parameters

args
isStatic

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.DefineConstructor Overload List


RTypeDef.DefineConstructor Method (RParameter[], String)

public RConstructorDef DefineConstructor(
RParameter[] args,
string name
);

Parameters

args
name

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.DefineConstructor Overload List


RTypeDef.DefineEvent Method

public REventDef DefineEvent(
string name,
RType eventType
);

Parameters

name
eventType

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.DefineField Method

public RFieldDef DefineField(
string name,
RType type
);

Parameters

name
type

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


DefineMethod Method

An NDoc Documented Class Library

RTypeDef.DefineMethod Method

Overload List

public RMethodDef DefineMethod(string,RType,RParameter[]);

public RMethodDef DefineMethod(string,RType,RParameter[],MethodAttributes);

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.DefineMethod Method (String, RType, RParameter[])

public RMethodDef DefineMethod(
string name,
RType returnValue,
RParameter[] args
);

Parameters

name
returnValue
args

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.DefineMethod Overload List


RTypeDef.DefineMethod Method (String, RType, RParameter[], MethodAttributes)

public RMethodDef DefineMethod(
string name,
RType returnValue,
RParameter[] args,
MethodAttributes me
);

Parameters

name
returnValue
args
me

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace | RTypeDef.DefineMethod Overload List


RTypeDef.DefineProperty Method

public RPropertyDef DefineProperty(
string name,
RType propertyType
);

Parameters

name
propertyType

Return Value

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveConstructor Method

Remove a Constructor TODO: What if the constructor is used in the Assembly

public void RemoveConstructor(
RType[] args
);

Parameters

args

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveCustomAttribute Method

TODO: How should the attribute be specified?

public void RemoveCustomAttribute(
RCustomAttrib attribute
);

Parameters

attribute

Implements

ICustomAttributeOwnerDef.RemoveCustomAttribute

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveEvent Method

TODO: What if there's a reference in the code to this event??

public void RemoveEvent(
string eventName
);

Parameters

eventName

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveField Method

public void RemoveField(
string name
);

Parameters

name

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveInterface Method

Removes the given interface from the list of implemented interfaces

public void RemoveInterface(
RType interfaceType
);

Parameters

interfaceType
The type of the interface

Remarks

This method returns silently if the given interface is not found in the list of implemented interfaces.

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveMethod Method

public void RemoveMethod(
RMethod method
);

Parameters

method

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeDef.RemoveProperty Method

TODO: What if there's a reference to this property in the code

public void RemoveProperty(
string name
);

Parameters

name

See Also

RTypeDef Class | Rail.Reflect Namespace


RTypeRef Class

For a list of all members of this type, see RTypeRef Members.

System.Object
Rail.Reflect.CustomAttributeOwner
Rail.Reflect.RMember
Rail.Reflect.RType
Rail.Reflect.RTypeRef

public sealed class RTypeRef : RType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RTypeRef Members | Rail.Reflect Namespace


RTypeRef Members

RTypeRef overview

Public Instance Properties

Assembly
Attributes (inherited from RType) | Gets the attributes of this type
BaseType (inherited from RType) | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType (inherited from RType) | When overridden in a derived class, returns the RType of the object encompassed or referred to by the current array.
FieldsCount (inherited from RType)
FullName
IsArray (inherited from RType) Whether this
RType
instance represents an array.
IsNested (inherited from RType) Whether this
RType
instance is a nested type.
IsPrimitive (inherited from RType) Whether this
RType
instance represents a primitive type.
IsValueType (inherited from RType) Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module (inherited from RType) | Gets the module where this type is contained.
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace (inherited from RType) | The namespace of the type, should be null if it is nested
PackingSize (inherited from RType)
TypeSize (inherited from RType)

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank (inherited from RType) | If this object represents an array, this method returns the number of dimensions.
GetConstructor | Overloaded.
GetConstructors | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent |
GetEvents |
GetField (inherited from RType) | Overloaded.
GetField | Overloaded.
GetFields | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface | Searches for the interface with the given name.
GetInterfaces | Returns all interfaces implemented by this type.
GetMethod |
GetMethods | Overloaded.
GetProperties |
GetProperty |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef Properties

The properties of the RTypeRef class are listed below. For a complete list of RTypeRef class members, see the RTypeRef Members topic.

Public Instance Properties

Assembly
Attributes (inherited from RType) | Gets the attributes of this type
BaseType (inherited from RType) | Gets or sets the base class of this type.
BindingFlags (inherited from RMember) | Gets the BindingFlags of the Member
DeclaringType (inherited from RMember) | Gets or sets the class that declares this member.
ElementType (inherited from RType) | When overridden in a derived class, returns the RType of the object encompassed or referred to by the current array.
FieldsCount (inherited from RType)
FullName
IsArray (inherited from RType) Whether this
RType
instance represents an array.
IsNested (inherited from RType) Whether this
RType
instance is a nested type.
IsPrimitive (inherited from RType) Whether this
RType
instance represents a primitive type.
IsValueType (inherited from RType) Whether this
RType
instance represents a Value type.
MemberType (inherited from RMember) | Gets the type of this member, such as field, method, and so on.
Module (inherited from RType) | Gets the module where this type is contained.
Name (inherited from RMember) | Gets or sets the name of this member.
NameSpace (inherited from RType) | The namespace of the type, should be null if it is nested
PackingSize (inherited from RType)
TypeSize (inherited from RType)

Protected Internal Instance Properties

CurrentCustomAttribute (inherited from CustomAttributeOwner)
CustomAttributeCount (inherited from CustomAttributeOwner)

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.Assembly Property

public override RAssembly Assembly {get; set;}

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.FullName Property

public override string FullName {get;}

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef Methods

The methods of the RTypeRef class are listed below. For a complete list of RTypeRef class members, see the RTypeRef Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetArrayRank (inherited from RType) | If this object represents an array, this method returns the number of dimensions.
GetConstructor | Overloaded.
GetConstructors | Overloaded.
GetCustomAttributes (inherited from CustomAttributeOwner) | Overloaded.
GetEvent |
GetEvents |
GetField (inherited from RType) | Overloaded.
GetField | Overloaded.
GetFields | Overloaded.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInterface | Searches for the interface with the given name.
GetInterfaces | Returns all interfaces implemented by this type.
GetMethod |
GetMethods | Overloaded.
GetProperties |
GetProperty |
GetType (inherited from Object) | Gets the Type of the current instance.
IsDefined (inherited from CustomAttributeOwner) |
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Internal Instance Methods

InternalAddCustomAttributtes (inherited from CustomAttributeOwner) | Adds a custom attribute to this element
InternalRemoveCustomAttribute (inherited from CustomAttributeOwner) | Removes the given custom attribute instance from this member.
MoveToNextCustomAttribute (inherited from CustomAttributeOwner) |

See Also

RTypeRef Class | Rail.Reflect Namespace


GetConstructor Method

An NDoc Documented Class Library

RTypeRef.GetConstructor Method

Overload List

public override RConstructor GetConstructor(RParameter[]);

public override RConstructor GetConstructor(BindingFlags,RParameter[]);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetConstructor Method (RParameter[])

public override RConstructor GetConstructor(
RParameter[] args
);

Parameters

args

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetConstructor Overload List


RTypeRef.GetConstructor Method (BindingFlags, RParameter[])

public override RConstructor GetConstructor(
BindingFlags bf,
RParameter[] args
);

Parameters

bf
args

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetConstructor Overload List


GetConstructors Method

An NDoc Documented Class Library

RTypeRef.GetConstructors Method

Overload List

public override RConstructor[] GetConstructors();

public override RConstructor[] GetConstructors(BindingFlags);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetConstructors Method ()

public override RConstructor[] GetConstructors();

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetConstructors Overload List


RTypeRef.GetConstructors Method (BindingFlags)

public override RConstructor[] GetConstructors(
BindingFlags bf
);

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetConstructors Overload List


RTypeRef.GetEvent Method

public override REvent GetEvent(
string eventName
);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetEvents Method

public override REvent[] GetEvents();

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace


GetField Method

An NDoc Documented Class Library

RTypeRef.GetField Method

Overload List

public override RField GetField(string);

Inherited from RType.

public virtual RField GetField(string,BindingFlags);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetField Method (String)

public override RField GetField(
string name
);

Parameters

name

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetField Overload List


GetFields Method

An NDoc Documented Class Library

RTypeRef.GetFields Method

Overload List

public override RField[] GetFields();

public override RField[] GetFields(BindingFlags);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetFields Method ()

public override RField[] GetFields();

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetFields Overload List


RTypeRef.GetFields Method (BindingFlags)

public override RField[] GetFields(
BindingFlags bf
);

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetFields Overload List


RTypeRef.GetInterface Method

Searches for the interface with the given name.

public override RType GetInterface(
string name
);

Parameters

name
The fully qualified name of the interface to search for.

Return Value

The interface if it is found, null otherwise.

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetInterfaces Method

Returns all interfaces implemented by this type.

public override RType[] GetInterfaces();

Return Value

An array with the interfaces implemented by this type.

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetMethod Method

public override RMethod GetMethod(
string name,
RType returnValue,
RParameter[] args
);

Parameters

name
returnValue
args

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace


GetMethods Method

An NDoc Documented Class Library

RTypeRef.GetMethods Method

Overload List

public override RMethod[] GetMethods();

public override RMethod[] GetMethods(BindingFlags);

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetMethods Method ()

public override RMethod[] GetMethods();

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetMethods Overload List


RTypeRef.GetMethods Method (BindingFlags)

public override RMethod[] GetMethods(
BindingFlags bf
);

Parameters

bf

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace | RTypeRef.GetMethods Overload List


RTypeRef.GetProperties Method

public override RProperty[] GetProperties();

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace


RTypeRef.GetProperty Method

public override RProperty GetProperty(
string name
);

Parameters

name

Return Value

See Also

RTypeRef Class | Rail.Reflect Namespace


RVersion Class

For a list of all members of this type, see RVersion Members.

System.Object
Rail.Reflect.RVersion

public sealed class RVersion

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

RVersion Members | Rail.Reflect Namespace


RVersion Members

RVersion overview

Public Instance Properties

Build
Major
Minor
Revision

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString |

See Also

RVersion Class | Rail.Reflect Namespace


RVersion Properties

The properties of the RVersion class are listed below. For a complete list of RVersion class members, see the RVersion Members topic.

Public Instance Properties

Build
Major
Minor
Revision

See Also

RVersion Class | Rail.Reflect Namespace


RVersion.Build Property

public int Build {get; set;}

See Also

RVersion Class | Rail.Reflect Namespace


RVersion.Major Property

public int Major {get; set;}

See Also

RVersion Class | Rail.Reflect Namespace


RVersion.Minor Property

public int Minor {get; set;}

See Also

RVersion Class | Rail.Reflect Namespace


RVersion.Revision Property

public int Revision {get; set;}

See Also

RVersion Class | Rail.Reflect Namespace


RVersion Methods

The methods of the RVersion class are listed below. For a complete list of RVersion class members, see the RVersion Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString |

See Also

RVersion Class | Rail.Reflect Namespace


RVersion.ToString Method

public override string ToString();

Return Value

See Also

RVersion Class | Rail.Reflect Namespace


SigType Class

For a list of all members of this type, see SigType Members.

System.Object
Rail.Reflect.SigType
Derived types

public class SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

SigType Members | Rail.Reflect Namespace


SigType Members

SigType overview

Public Instance Constructors

SigType Constructor

Public Instance Fields

ElementType

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

SigType Class | Rail.Reflect Namespace


SigType Constructor

public SigType(
ElementType element
);

Parameters

element

See Also

SigType Class | Rail.Reflect Namespace


SigType Fields

The fields of the SigType class are listed below. For a complete list of SigType class members, see the SigType Members topic.

Public Instance Fields

ElementType

See Also

SigType Class | Rail.Reflect Namespace


SigType.ElementType Field

public ElementType ElementType;

See Also

SigType Class | Rail.Reflect Namespace


SZARRAY Class

For a list of all members of this type, see SZARRAY Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.SZARRAY

public class SZARRAY : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

SZARRAY Members | Rail.Reflect Namespace


SZARRAY Members

SZARRAY overview

Public Instance Constructors

SZARRAY Constructor

Public Instance Fields

ElementType (inherited from SigType) |
Type | TODO: CustomMod* not suported

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

SZARRAY Class | Rail.Reflect Namespace


SZARRAY Constructor

public SZARRAY(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

SZARRAY Class | Rail.Reflect Namespace


SZARRAY Fields

The fields of the SZARRAY class are listed below. For a complete list of SZARRAY class members, see the SZARRAY Members topic.

Public Instance Fields

ElementType (inherited from SigType) |
Type | TODO: CustomMod* not suported

See Also

SZARRAY Class | Rail.Reflect Namespace


SZARRAY.Type Field

TODO: CustomMod* not suported

public SigType Type;

See Also

SZARRAY Class | Rail.Reflect Namespace


TypeSpecSig Class

For a list of all members of this type, see TypeSpecSig Members.

System.Object
Rail.Reflect.MetadataSignatures
Rail.Reflect.TypeSpecSig

public class TypeSpecSig : MetadataSignatures

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

TypeSpecSig Members | Rail.Reflect Namespace


TypeSpecSig Members

TypeSpecSig overview

Public Instance Constructors

TypeSpecSig Constructor

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Type |

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

TypeSpecSig Class | Rail.Reflect Namespace


TypeSpecSig Constructor

public TypeSpecSig(
byte[] stream,
int index
);

Parameters

stream
index

See Also

TypeSpecSig Class | Rail.Reflect Namespace


TypeSpecSig Fields

The fields of the TypeSpecSig class are listed below. For a complete list of TypeSpecSig class members, see the TypeSpecSig Members topic.

Public Instance Fields

CallingConvention (inherited from MetadataSignatures) | Signature CallingConvention
Type |

See Also

TypeSpecSig Class | Rail.Reflect Namespace


TypeSpecSig.Type Field

public SigType Type;

See Also

TypeSpecSig Class | Rail.Reflect Namespace


ValueType Class

For a list of all members of this type, see ValueType Members.

System.Object
Rail.Reflect.SigType
Rail.Reflect.ValueType

public class ValueType : SigType

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Reflect

Assembly: RAIL (in RAIL.dll)

See Also

ValueType Members | Rail.Reflect Namespace


ValueType Members

ValueType overview

Public Instance Constructors

ValueType Constructor

Public Instance Fields

ElementType (inherited from SigType)
Index
TypeTable

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ValueType Class | Rail.Reflect Namespace


ValueType Constructor

public ValueType(
byte[] stream,
out int pos,
int posValue
);

Parameters

stream
pos
posValue

See Also

ValueType Class | Rail.Reflect Namespace


ValueType Fields

The fields of the ValueType class are listed below. For a complete list of ValueType class members, see the ValueType Members topic.

Public Instance Fields

ElementType (inherited from SigType)
Index
TypeTable

See Also

ValueType Class | Rail.Reflect Namespace


ValueType.Index Field

public int Index;

See Also

ValueType Class | Rail.Reflect Namespace


ValueType.TypeTable Field

public TokenType TypeTable;

See Also

ValueType Class | Rail.Reflect Namespace


Rail.Transformation

An NDoc Documented Class Library

Rail.Transformation Namespace

Namespace hierarchy

Classes

Class | Description
AddExceptionHandling
CodeTransformer Applies code transformations to the methods (
RMethodDef
) and constructors (
RConstructorDef
) visited. This instances of this class save a list of transformations that can be applied to MSIL code, and are only efectively applied when the instance of the class is passed to the method or methods through the
Accept
method in the destination object
EmptyVisitor A Visitor whose methods don't do anything. This class can be used as base for
Visitors
that don't need to implement all
VisitXXX
methods, therefore avoiding the need to create empty implementations for the methods that are not needed
FieldAccessReplacer Useful to redirect field access between to fields. This visitor implementes
VisitMethod
and
VisitConstructor
methods
FieldToPropAccessReplacer Useful to redirect field access between a field and a property. This visitor implementes
VisitMethod
and
VisitConstructor
methods
MethodEpilogueAdder | Useful add new instructions to the end of the method. Copy the MSIL instructions in a method to the end of other method When copying the instructions of a method to the other, we must assure that the parameters of the method to add are the same or less then the number of parameters in the method being instrumented, and the poarameters also have of be of the same type and defined in the same order. For accessing local variable we have to diferent approaches, the first one is using the local variables of the method being instrumented, this way the order and type of the local variables have to be the same in both methods. The second approach creates the local variables in the instrumented method to use with the added code. The access to fields and methods present in the method to add must be possible from the method where the instructions are being added.
MethodPrologueAdder | Useful add new instructions to the start of the method. Copy the MSIL instructions in a method to the start of other method When copying the instructions of a method to the other, we must assure that the parameters of the method to add are the same or less then the number of parameters in the method being instrumented, and the poarameters also have of be of the same type and defined in the same order. For accessing local variable we have to diferent approaches, the first one is using the local variables of the method being instrumented, this way the order and type of the local variables have to be the same in both methods. The second approach creates the local variables in the instrumented method to use with the added code. The access to fields and methods present in the method to add must be possible from the method where the instructions are being added.
MethodReplacer | Useful to change method access from a method to other inside the method body Both methods must have the same number, order and type of arguments. Both methods have to be static or both have to be defined in the same type
PropertyAccessReplacer | Useful to change property access from one property to other Both properties have to be static or both have to be defined in the same type.
ReferenceReplacer Replaces all occurrences of a reference to another one. Perhaps this class should be internal and the functionality of it exposed using a method (
ReplaceReference()
) of an utility class?
ReplaceFieldReadAccess | Useful to change field read access to a method
ReplaceFieldWriteAccess | Useful to change field write access to a method
ReplaceNew | Replaces de create new object instruction with a static method call
Visitor There are several specification options for visitors.
  • Controlling descent - How deep should the visitor go? The visitor could go only until modules, could descend into type or go all the way down to methods. Having visitors always going deep into the tree is inneficient. Solutions: locals and statements, 3; instructions, 4. The user specifies how deep to go. - Barat forces the visitors to encode the logic that controls descent, so users have greater control.
  • Another related issue is the order of the traversals. If the framework controls the descent logic, then the traversal orders will be hard-coded in it. In this case the options are having only one traversal order or allowing the client to specify one pre-defined order in the visitor (a property having an enumerated value). Barat uses a different mechanism. It's up to the Visitor to implement the traversal logic, so the client has full control.
(Choosing: The most simple solution that does the job...) The initial prototype will implement the following: - Descent all the way down. If performance proves to be unnaceptable, this can be easily changed using a solution similiar to JTrek. - To control the traversal order, we use a modified version of Barat. Two types: - Visitors are visible to the clients and contain only the logic to visit a certain node. Therefore, they are traversal order agnostic. - Walkers contain only the traversal logic and are internal to the framework. When a user wants to start a descent, he or she creates a Visitor, specifies the traversal order using a property (TraversalOrder {PostOrder, PreOrder, ...}), and calls visit in the Node where the visit should be initiated. Internally, the Visitor creates a corresponding walker. The framework, when needing to continue a visit, requests the Walker of the visitor and uses it to descend.

Interfaces

Interface | Description
IVisitable | Implemented by nodes that can accept a visitor

Enumerations

Enumeration | Description
TraversalOrder | Possible orders in which a descent can be organized


AddExceptionHandling Class

For a list of all members of this type, see AddExceptionHandling Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.AddExceptionHandling

public class AddExceptionHandling : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

AddExceptionHandling Members | Rail.Transformation Namespace


AddExceptionHandling Members

AddExceptionHandling overview

Public Instance Constructors

AddExceptionHandling Overloaded. Initializes a new instance of the AddExceptionHandling class.

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AddExceptionHandling Class | Rail.Transformation Namespace


AddExceptionHandling Constructor

Created an object for Adding Exception Handling to marked methods The methods should be marked with ExceptionAttribute Custom attributes and the code to be handled must be delimited by the static methods Marker.Start() and Marker.End(). If more then one pair of this methods exist, there must be an equal number of ExceptionAttribute attributes, if not, the first attribute will caracterize all the handlers. If there are no methods delimiters, the all code in the method is insert in the handler

Overload List

Created an object for Adding Exception Handling to marked methods The methods should be marked with ExceptionAttribute Custom attributes and the code to be handled must be delimited by the static methods Marker.Start() and Marker.End(). If more then one pair of this methods exist, there must be an equal number of ExceptionAttribute attributes, if not, the first attribute will caracterize all the handlers. If there are no methods delimiters, the all code in the method is insert in the handler

public AddExceptionHandling(RType,HandlerCode,bool);

public AddExceptionHandling(RType,HandlerCode,string);

See Also

AddExceptionHandling Class | Rail.Transformation Namespace


AddExceptionHandling Constructor (RType, HandlerCode, Boolean)

Created an object for Adding Exception Handling to marked methods The methods should be marked with ExceptionAttribute Custom attributes and the code to be handled must be delimited by the static methods Marker.Start() and Marker.End(). If more then one pair of this methods exist, there must be an equal number of ExceptionAttribute attributes, if not, the first attribute will caracterize all the handlers. If there are no methods delimiters, the all code in the method is insert in the handler

public AddExceptionHandling(
RType ExceptionType,
HandlerCode CodeHandlingType,
bool RemoveRelatedAttributes
);

Parameters

ExceptionType
The type of the exception to treat
CodeHandlingType
The code and the kind of handlers to insert
RemoveRelatedAttributes
If true all the used attributes are removed from the method because they already acomplished there function

See Also

AddExceptionHandling Class | Rail.Transformation Namespace | AddExceptionHandling Constructor Overload List


AddExceptionHandling Constructor (RType, HandlerCode, String)

public AddExceptionHandling(
RType ExceptionType,
HandlerCode CodeHandlingType,
string XmlReportFile
);

See Also

AddExceptionHandling Class | Rail.Transformation Namespace | AddExceptionHandling Constructor Overload List


AddExceptionHandling Methods

The methods of the AddExceptionHandling class are listed below. For a complete list of AddExceptionHandling class members, see the AddExceptionHandling Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AddExceptionHandling Class | Rail.Transformation Namespace


AddExceptionHandling.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

AddExceptionHandling Class | Rail.Transformation Namespace


AddExceptionHandling.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

AddExceptionHandling Class | Rail.Transformation Namespace


CodeTransformer Class

Applies code transformations to the methods (

RMethodDef
) and constructors (
RConstructorDef
) visited. This instances of this class save a list of transformations that can be applied to MSIL code, and are only efectively applied when the instance of the class is passed to the method or methods through the
Accept
method in the destination object

For a list of all members of this type, see CodeTransformer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.CodeTransformer

public sealed class CodeTransformer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

CodeTransformer Members | Rail.Transformation Namespace


CodeTransformer Members

CodeTransformer overview

Public Instance Constructors

CodeTransformer Constructor A
CodeTransformer
defines transformations to be applied to code.

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

add | Adds a new visitor (transformer) to the collection owned by this object
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

See Also

CodeTransformer Class | Rail.Transformation Namespace


CodeTransformer Constructor

A

CodeTransformer
defines transformations to be applied to code.

public CodeTransformer();

See Also

CodeTransformer Class | Rail.Transformation Namespace


CodeTransformer Methods

The methods of the CodeTransformer class are listed below. For a complete list of CodeTransformer class members, see the CodeTransformer Members topic.

Public Instance Methods

add | Adds a new visitor (transformer) to the collection owned by this object
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

See Also

CodeTransformer Class | Rail.Transformation Namespace


CodeTransformer.add Method

Adds a new visitor (transformer) to the collection owned by this object

public void add(
Visitor codeVisitor
);

Parameters

codeVisitor
The visitor to be inserted

See Also

CodeTransformer Class | Rail.Transformation Namespace


CodeTransformer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

CodeTransformer Class | Rail.Transformation Namespace


CodeTransformer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

CodeTransformer Class | Rail.Transformation Namespace


EmptyVisitor Class

A Visitor whose methods don't do anything. This class can be used as base for

Visitors
that don't need to implement all
VisitXXX
methods, therefore avoiding the need to create empty implementations for the methods that are not needed

For a list of all members of this type, see EmptyVisitor Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Derived types

public class EmptyVisitor : Visitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

EmptyVisitor Members | Rail.Transformation Namespace


EmptyVisitor Members

EmptyVisitor overview

Public Instance Constructors

EmptyVisitor Constructor Initializes a new instance of the EmptyVisitor class.

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor Constructor

Initializes a new instance of the EmptyVisitor class.

public EmptyVisitor();

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor Methods

The methods of the EmptyVisitor class are listed below. For a complete list of EmptyVisitor class members, see the EmptyVisitor Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitAssembly Method

public override void VisitAssembly(
RAssemblyDef assm
);

Parameters

assm

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitEvent Method

public override void VisitEvent(
REventDef evt
);

Parameters

evt

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitField Method

public override void VisitField(
RFieldDef field
);

Parameters

field

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitModule Method

public override void VisitModule(
RModuleDef module
);

Parameters

module

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitProperty Method

public override void VisitProperty(
RPropertyDef property
);

Parameters

property

See Also

EmptyVisitor Class | Rail.Transformation Namespace


EmptyVisitor.VisitType Method

public override void VisitType(
RTypeDef type
);

Parameters

type

See Also

EmptyVisitor Class | Rail.Transformation Namespace


FieldAccessReplacer Class

Useful to redirect field access between to fields. This visitor implementes

VisitMethod
and
VisitConstructor
methods

For a list of all members of this type, see FieldAccessReplacer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.FieldAccessReplacer

public class FieldAccessReplacer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The fields must be of the same type. They both have to be instance fields or static fields, you cannot use a static field to replace an instance field or vice-versa. If they are instance fields both have to be declared in the same type.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

FieldAccessReplacer Members | Rail.Transformation Namespace


FieldAccessReplacer Members

FieldAccessReplacer overview

Public Instance Constructors

FieldAccessReplacer Constructor Public constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FieldAccessReplacer Class | Rail.Transformation Namespace


FieldAccessReplacer Constructor

Public constructor

public FieldAccessReplacer(
RField oldField,
RField newField
);

Parameters

oldField
The RField to be replaced
newField
The replacement RField

See Also

FieldAccessReplacer Class | Rail.Transformation Namespace


FieldAccessReplacer Methods

The methods of the FieldAccessReplacer class are listed below. For a complete list of FieldAccessReplacer class members, see the FieldAccessReplacer Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FieldAccessReplacer Class | Rail.Transformation Namespace


FieldAccessReplacer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

FieldAccessReplacer Class | Rail.Transformation Namespace


FieldAccessReplacer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

FieldAccessReplacer Class | Rail.Transformation Namespace


FieldToPropAccessReplacer Class

Useful to redirect field access between a field and a property. This visitor implementes

VisitMethod
and
VisitConstructor
methods

For a list of all members of this type, see FieldToPropAccessReplacer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.FieldToPropAccessReplacer

public class FieldToPropAccessReplacer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The field and the property must be of the same type. They both have to be instance or static, you cannot use a static property to replace an instance field or an instance property to replace a satic field. If they are instance fields both have to be declared in the same type.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

FieldToPropAccessReplacer Members | Rail.Transformation Namespace


FieldToPropAccessReplacer Members

FieldToPropAccessReplacer overview

Public Instance Constructors

FieldToPropAccessReplacer Constructor The constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FieldToPropAccessReplacer Class | Rail.Transformation Namespace


FieldToPropAccessReplacer Constructor

The constructor

public FieldToPropAccessReplacer(
RField origField,
RProperty newProp
);

Parameters

origField
The field to replace
newProp
The replacement property

See Also

FieldToPropAccessReplacer Class | Rail.Transformation Namespace


FieldToPropAccessReplacer Methods

The methods of the FieldToPropAccessReplacer class are listed below. For a complete list of FieldToPropAccessReplacer class members, see the FieldToPropAccessReplacer Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

FieldToPropAccessReplacer Class | Rail.Transformation Namespace


FieldToPropAccessReplacer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

FieldToPropAccessReplacer Class | Rail.Transformation Namespace


FieldToPropAccessReplacer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

FieldToPropAccessReplacer Class | Rail.Transformation Namespace


IVisitable Interface

Implemented by nodes that can accept a visitor

For a list of all members of this type, see IVisitable Members.

public interface IVisitable

Types that implement IVisitable

Type | Description
RAssemblyDef | Represents an assembly that is being manipulated.
RConstructorDef |
REventDef |
RFieldDef |
RMethodDef |
RModuleDef | - A module is always associated with an assembly. - It's not permitted to change the assembly associated with a module. - Support constructors to create a new module based on a old one
RPropertyDef | Done
RTypeDef |

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

IVisitable Members | Rail.Transformation Namespace


IVisitable Members

IVisitable overview

Public Instance Methods

Accept

See Also

IVisitable Interface | Rail.Transformation Namespace


IVisitable Methods

The methods of the IVisitable interface are listed below. For a complete list of IVisitable interface members, see the IVisitable Members topic.

Public Instance Methods

Accept

See Also

IVisitable Interface | Rail.Transformation Namespace


IVisitable.Accept Method

void Accept(
Visitor visitor
);

See Also

IVisitable Interface | Rail.Transformation Namespace


MethodEpilogueAdder Class

Useful add new instructions to the end of the method. Copy the MSIL instructions in a method to the end of other method When copying the instructions of a method to the other, we must assure that the parameters of the method to add are the same or less then the number of parameters in the method being instrumented, and the poarameters also have of be of the same type and defined in the same order. For accessing local variable we have to diferent approaches, the first one is using the local variables of the method being instrumented, this way the order and type of the local variables have to be the same in both methods. The second approach creates the local variables in the instrumented method to use with the added code. The access to fields and methods present in the method to add must be possible from the method where the instructions are being added.

For a list of all members of this type, see MethodEpilogueAdder Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.MethodEpilogueAdder

public class MethodEpilogueAdder : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

MethodEpilogueAdder Members | Rail.Transformation Namespace


MethodEpilogueAdder Members

MethodEpilogueAdder overview

Public Instance Constructors

MethodEpilogueAdder Constructor Adds the code in MethodToAdd to the end of the method

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodEpilogueAdder Class | Rail.Transformation Namespace


MethodEpilogueAdder Constructor

Adds the code in MethodToAdd to the end of the method

public MethodEpilogueAdder(
RMethodDef MethodToAdd,
bool CreateLocals
);

Parameters

MethodToAdd
The method which instructions
CreateLocals
Bool value used to explicit if the local variables used in the method to add must be created in the method being instrumented

See Also

MethodEpilogueAdder Class | Rail.Transformation Namespace


MethodEpilogueAdder Methods

The methods of the MethodEpilogueAdder class are listed below. For a complete list of MethodEpilogueAdder class members, see the MethodEpilogueAdder Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodEpilogueAdder Class | Rail.Transformation Namespace


MethodEpilogueAdder.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

MethodEpilogueAdder Class | Rail.Transformation Namespace


MethodEpilogueAdder.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

MethodEpilogueAdder Class | Rail.Transformation Namespace


MethodPrologueAdder Class

Useful add new instructions to the start of the method. Copy the MSIL instructions in a method to the start of other method When copying the instructions of a method to the other, we must assure that the parameters of the method to add are the same or less then the number of parameters in the method being instrumented, and the poarameters also have of be of the same type and defined in the same order. For accessing local variable we have to diferent approaches, the first one is using the local variables of the method being instrumented, this way the order and type of the local variables have to be the same in both methods. The second approach creates the local variables in the instrumented method to use with the added code. The access to fields and methods present in the method to add must be possible from the method where the instructions are being added.

For a list of all members of this type, see MethodPrologueAdder Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.MethodPrologueAdder

public class MethodPrologueAdder : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

MethodPrologueAdder Members | Rail.Transformation Namespace


MethodPrologueAdder Members

MethodPrologueAdder overview

Public Instance Constructors

MethodPrologueAdder Constructor Adds the code in MethodToAdd to the start of the method

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodPrologueAdder Class | Rail.Transformation Namespace


MethodPrologueAdder Constructor

Adds the code in MethodToAdd to the start of the method

public MethodPrologueAdder(
RMethodDef MethodToAdd,
bool CreateLocals
);

Parameters

MethodToAdd
The method which instructions
CreateLocals
Bool value used to explicit if the local variables used in the method to add must be created in the method being instrumented

See Also

MethodPrologueAdder Class | Rail.Transformation Namespace


MethodPrologueAdder Methods

The methods of the MethodPrologueAdder class are listed below. For a complete list of MethodPrologueAdder class members, see the MethodPrologueAdder Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodPrologueAdder Class | Rail.Transformation Namespace


MethodPrologueAdder.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

MethodPrologueAdder Class | Rail.Transformation Namespace


MethodPrologueAdder.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

MethodPrologueAdder Class | Rail.Transformation Namespace


MethodReplacer Class

Useful to change method access from a method to other inside the method body Both methods must have the same number, order and type of arguments. Both methods have to be static or both have to be defined in the same type

For a list of all members of this type, see MethodReplacer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.MethodReplacer

public class MethodReplacer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

MethodReplacer Members | Rail.Transformation Namespace


MethodReplacer Members

MethodReplacer overview

Public Instance Constructors

MethodReplacer Constructor Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodReplacer Class | Rail.Transformation Namespace


MethodReplacer Constructor

Constructor

public MethodReplacer(
RMethod oldMethod,
RMethod newMethod
);

Parameters

oldMethod
The method to be replaced
newMethod
The method to use instead

See Also

MethodReplacer Class | Rail.Transformation Namespace


MethodReplacer Methods

The methods of the MethodReplacer class are listed below. For a complete list of MethodReplacer class members, see the MethodReplacer Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

MethodReplacer Class | Rail.Transformation Namespace


MethodReplacer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

MethodReplacer Class | Rail.Transformation Namespace


MethodReplacer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

MethodReplacer Class | Rail.Transformation Namespace


PropertyAccessReplacer Class

Useful to change property access from one property to other Both properties have to be static or both have to be defined in the same type.

For a list of all members of this type, see PropertyAccessReplacer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.PropertyAccessReplacer

public class PropertyAccessReplacer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

PropertyAccessReplacer Members | Rail.Transformation Namespace


PropertyAccessReplacer Members

PropertyAccessReplacer overview

Public Instance Constructors

PropertyAccessReplacer Constructor Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

PropertyAccessReplacer Class | Rail.Transformation Namespace


PropertyAccessReplacer Constructor

Constructor

public PropertyAccessReplacer(
RProperty oldProperty,
RProperty newProperty
);

Parameters

oldProperty
The property to be replaced
newProperty
The replacement property

See Also

PropertyAccessReplacer Class | Rail.Transformation Namespace


PropertyAccessReplacer Methods

The methods of the PropertyAccessReplacer class are listed below. For a complete list of PropertyAccessReplacer class members, see the PropertyAccessReplacer Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

PropertyAccessReplacer Class | Rail.Transformation Namespace


PropertyAccessReplacer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

PropertyAccessReplacer Class | Rail.Transformation Namespace


PropertyAccessReplacer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

PropertyAccessReplacer Class | Rail.Transformation Namespace


ReferenceReplacer Class

Replaces all occurrences of a reference to another one. Perhaps this class should be internal and the functionality of it exposed using a method (

ReplaceReference()
) of an utility class?

For a list of all members of this type, see ReferenceReplacer Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.ReferenceReplacer

public class ReferenceReplacer : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

ReferenceReplacer Members | Rail.Transformation Namespace


ReferenceReplacer Members

ReferenceReplacer overview

Public Instance Constructors

ReferenceReplacer Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer Constructor

public ReferenceReplacer(
RType oldType,
RType newType
);

Parameters

oldType
newType

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer Methods

The methods of the ReferenceReplacer class are listed below. For a complete list of ReferenceReplacer class members, see the ReferenceReplacer Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitEvent Method

public override void VisitEvent(
REventDef evt
);

Parameters

evt

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitField Method

public override void VisitField(
RFieldDef field
);

Parameters

field

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitProperty Method

public override void VisitProperty(
RPropertyDef property
);

Parameters

property

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReferenceReplacer.VisitType Method

public override void VisitType(
RTypeDef type
);

Parameters

type

See Also

ReferenceReplacer Class | Rail.Transformation Namespace


ReplaceFieldReadAccess Class

Useful to change field read access to a method

For a list of all members of this type, see ReplaceFieldReadAccess Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.ReplaceFieldReadAccess

public class ReplaceFieldReadAccess : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Both field and method must be static or they both have to be instance. If the are instance they have to be defined on the same type

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

ReplaceFieldReadAccess Members | Rail.Transformation Namespace


ReplaceFieldReadAccess Members

ReplaceFieldReadAccess overview

Public Instance Constructors

ReplaceFieldReadAccess Constructor Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceFieldReadAccess Class | Rail.Transformation Namespace


ReplaceFieldReadAccess Constructor

Constructor

public ReplaceFieldReadAccess(
RField origField,
RMethod newMethod
);

Parameters

origField
The field which read access is to be replaced
newMethod
The method to call instead of the field

See Also

ReplaceFieldReadAccess Class | Rail.Transformation Namespace


ReplaceFieldReadAccess Methods

The methods of the ReplaceFieldReadAccess class are listed below. For a complete list of ReplaceFieldReadAccess class members, see the ReplaceFieldReadAccess Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceFieldReadAccess Class | Rail.Transformation Namespace


ReplaceFieldReadAccess.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

ReplaceFieldReadAccess Class | Rail.Transformation Namespace


ReplaceFieldReadAccess.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

ReplaceFieldReadAccess Class | Rail.Transformation Namespace


ReplaceFieldWriteAccess Class

Useful to change field write access to a method

For a list of all members of this type, see ReplaceFieldWriteAccess Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.ReplaceFieldWriteAccess

public class ReplaceFieldWriteAccess : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Both field and method must be static or they both have to be instance. If the are instance they have to be defined on the same type

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

ReplaceFieldWriteAccess Members | Rail.Transformation Namespace


ReplaceFieldWriteAccess Members

ReplaceFieldWriteAccess overview

Public Instance Constructors

ReplaceFieldWriteAccess Constructor Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceFieldWriteAccess Class | Rail.Transformation Namespace


ReplaceFieldWriteAccess Constructor

Constructor

public ReplaceFieldWriteAccess(
RField origField,
RMethod newMethod
);

Parameters

origField
The field which write access is to be replaced
newMethod
The method to call instead of the field

See Also

ReplaceFieldWriteAccess Class | Rail.Transformation Namespace


ReplaceFieldWriteAccess Methods

The methods of the ReplaceFieldWriteAccess class are listed below. For a complete list of ReplaceFieldWriteAccess class members, see the ReplaceFieldWriteAccess Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceFieldWriteAccess Class | Rail.Transformation Namespace


ReplaceFieldWriteAccess.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

ReplaceFieldWriteAccess Class | Rail.Transformation Namespace


ReplaceFieldWriteAccess.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

ReplaceFieldWriteAccess Class | Rail.Transformation Namespace


ReplaceNew Class

Replaces de create new object instruction with a static method call

For a list of all members of this type, see ReplaceNew Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.ReplaceNew

public class ReplaceNew : EmptyVisitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The method being called in replacement of the create new instruction must be static and accept the same number, order and type of arguments

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

ReplaceNew Members | Rail.Transformation Namespace


ReplaceNew Members

ReplaceNew overview

Public Instance Constructors

ReplaceNew Constructor Constructor

Public Instance Properties

TraversalOrder (inherited from Visitor) Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceNew Class | Rail.Transformation Namespace


ReplaceNew Constructor

Constructor

public ReplaceNew(
RType origType,
RMethod newMethod
);

Parameters

origType
The type of the instance created with the create new instruction
newMethod
The static method to replace the create new instruction

See Also

ReplaceNew Class | Rail.Transformation Namespace


ReplaceNew Methods

The methods of the ReplaceNew class are listed below. For a complete list of ReplaceNew class members, see the ReplaceNew Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly (inherited from EmptyVisitor) |
VisitConstructor |
VisitEvent (inherited from EmptyVisitor) |
VisitField (inherited from EmptyVisitor) |
VisitMethod |
VisitModule (inherited from EmptyVisitor) |
VisitProperty (inherited from EmptyVisitor) |
VisitType (inherited from EmptyVisitor) |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ReplaceNew Class | Rail.Transformation Namespace


ReplaceNew.VisitConstructor Method

public override void VisitConstructor(
RConstructorDef method
);

Parameters

method

See Also

ReplaceNew Class | Rail.Transformation Namespace


ReplaceNew.VisitMethod Method

public override void VisitMethod(
RMethodDef method
);

Parameters

method

See Also

ReplaceNew Class | Rail.Transformation Namespace


TraversalOrder Enumeration

Possible orders in which a descent can be organized

public enum TraversalOrder

Members

Member Name | Description
PostOrder |
PreOrder |

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

Rail.Transformation Namespace


Visitor Class

There are several specification options for visitors.

  • Controlling descent - How deep should the visitor go? The visitor could go only until modules, could descend into type or go all the way down to methods. Having visitors always going deep into the tree is inneficient. Solutions: locals and statements, 3; instructions, 4. The user specifies how deep to go. - Barat forces the visitors to encode the logic that controls descent, so users have greater control.
  • Another related issue is the order of the traversals. If the framework controls the descent logic, then the traversal orders will be hard-coded in it. In this case the options are having only one traversal order or allowing the client to specify one pre-defined order in the visitor (a property having an enumerated value). Barat uses a different mechanism. It's up to the Visitor to implement the traversal logic, so the client has full control.
(Choosing: The most simple solution that does the job...) The initial prototype will implement the following: - Descent all the way down. If performance proves to be unnaceptable, this can be easily changed using a solution similiar to JTrek. - To control the traversal order, we use a modified version of Barat. Two types: - Visitors are visible to the clients and contain only the logic to visit a certain node. Therefore, they are traversal order agnostic. - Walkers contain only the traversal logic and are internal to the framework. When a user wants to start a descent, he or she creates a Visitor, specifies the traversal order using a property (TraversalOrder {PostOrder, PreOrder, ...}), and calls visit in the Node where the visit should be initiated. Internally, the Visitor creates a corresponding walker. The framework, when needing to continue a visit, requests the Walker of the visitor and uses it to descend.

For a list of all members of this type, see Visitor Members.

System.Object
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor

public abstract class Visitor

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Rail.Transformation

Assembly: RAIL (in RAIL.dll)

See Also

Visitor Members | Rail.Transformation Namespace


Visitor Members

Visitor overview

Public Instance Constructors

Visitor Constructor Summary of Visitor.

Public Instance Properties

TraversalOrder Gets or sets the traversal order.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Visitor Class | Rail.Transformation Namespace


Visitor Constructor

Summary of Visitor.

public Visitor();

See Also

Visitor Class | Rail.Transformation Namespace


Visitor Properties

The properties of the Visitor class are listed below. For a complete list of Visitor class members, see the Visitor Members topic.

Public Instance Properties

TraversalOrder Gets or sets the traversal order.

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.TraversalOrder Property

Gets or sets the traversal order.

public TraversalOrder TraversalOrder {get; set;}

Remarks

The default value is pre-order.

See Also

Visitor Class | Rail.Transformation Namespace


Visitor Methods

The methods of the Visitor class are listed below. For a complete list of Visitor class members, see the Visitor Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.
VisitAssembly |
VisitConstructor |
VisitEvent |
VisitField |
VisitMethod |
VisitModule |
VisitProperty |
VisitType |

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitAssembly Method

public abstract void VisitAssembly(
RAssemblyDef assm
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitConstructor Method

public abstract void VisitConstructor(
RConstructorDef method
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitEvent Method

public abstract void VisitEvent(
REventDef evt
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitField Method

public abstract void VisitField(
RFieldDef field
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitMethod Method

public abstract void VisitMethod(
RMethodDef method
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitModule Method

public abstract void VisitModule(
RModuleDef module
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitProperty Method

public abstract void VisitProperty(
RPropertyDef property
);

See Also

Visitor Class | Rail.Transformation Namespace


Visitor.VisitType Method

public abstract void VisitType(
RTypeDef type
);

See Also

Visitor Class | Rail.Transformation Namespace


Rail.ExceptionsHierarchy

An NDoc Documented Class Library

Rail.Exceptions Hierarchy

System.Object
Rail.Exceptions.Marker
System.Attribute
Rail.Exceptions.ExceptionAttribute
System.Exception ---- System.Runtime.Serialization.ISerializable
System.ApplicationException
Rail.Exceptions.InternalErrorException
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
Rail.Exceptions.HandlerCode

See Also

Rail.Exceptions Namespace


Instruction Hierarchy

System.Object
Instruction
ILArgument
ILBranch
ILField
ILLocalVariable
ILMethod
ILNone
ILOperandI2
ILOperandI4
ILOperandI8
ILOperandR4
ILOperandR8
ILSig
ILString
ILSwitch
ILToken
ILType
ILVirtualException

See Also

Instruction Class | Instruction Members | Rail.MSIL Namespace


Rail.MSILHierarchy

An NDoc Documented Class Library

Rail.MSIL Hierarchy

System.Object
Rail.MSIL.Code ---- System.Collections.IEnumerable
Rail.MSIL.Code.InstructionEnumerator ---- System.Collections.IEnumerator
Rail.MSIL.ExceptionBlock ---- System.IComparable
Rail.MSIL.ExceptionHandler
Rail.MSIL.ExceptionTable
Rail.MSIL.ILFactory
Rail.MSIL.Instruction
Rail.MSIL.ILArgument
Rail.MSIL.ILBranch ---- Rail.MSIL.ITargeter
Rail.MSIL.ILField
Rail.MSIL.ILLocalVariable
Rail.MSIL.ILMethod
Rail.MSIL.ILNone
Rail.MSIL.ILOperandI2
Rail.MSIL.ILOperandI4
Rail.MSIL.ILOperandI8
Rail.MSIL.ILOperandR4
Rail.MSIL.ILOperandR8
Rail.MSIL.ILSig
Rail.MSIL.ILString
Rail.MSIL.ILSwitch ---- Rail.MSIL.ITargeter
Rail.MSIL.ILToken
Rail.MSIL.ILType
Rail.MSIL.ILVirtualException
Rail.MSIL.ITargeter
Rail.MSIL.LocalVariable
Rail.MSIL.MetadataResolver
Rail.MSIL.MethodBody
Rail.MSIL.OpCodesClassifier
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
Rail.MSIL.ExceptionHandlerType
Rail.MSIL.MetadataResolver.TypeDefOrRefTag

See Also

Rail.MSIL Namespace


SigType Hierarchy

System.Object
SigType
ARRAY
CLASS
FNPTR
PTR
SZARRAY
ValueType

See Also

SigType Class | SigType Members | Rail.Reflect Namespace


Rail.ReflectHierarchy

An NDoc Documented Class Library

Rail.Reflect Hierarchy

System.Object
Rail.Reflect.ARRAY.ArrayShape
Rail.Reflect.CustomAttributeOwner ---- Rail.Reflect.ICustomAttributeOwner
Rail.Reflect.RAssembly
Rail.Reflect.RAssemblyDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RAssemblyRef
Rail.Reflect.RMember
Rail.Reflect.REvent
Rail.Reflect.REventDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.REventRef
Rail.Reflect.RField
Rail.Reflect.RFieldDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RFieldRef
Rail.Reflect.RMethodBase
Rail.Reflect.RConstructor
Rail.Reflect.RConstructorDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RConstructorRef
Rail.Reflect.RMethod
Rail.Reflect.RMethodDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RMethodRef
Rail.Reflect.RProperty
Rail.Reflect.RPropertyDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RPropertyRef
Rail.Reflect.RType
Rail.Reflect.RTypeDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RTypeRef
Rail.Reflect.RModule
Rail.Reflect.RModuleDef ---- Rail.Reflect.ICustomAttributeOwnerDef, Rail.Transformation.IVisitable
Rail.Reflect.RModuleRef
Rail.Reflect.RParameter ---- Rail.Reflect.ICustomAttributeOwnerDef
Rail.Reflect.RReturnType
Rail.Reflect.CustomMod
Rail.Reflect.ICustomAttributeOwner
Rail.Reflect.ICustomAttributeOwnerDef ---- Rail.Reflect.ICustomAttributeOwner
Rail.Reflect.LocalVarSig
Rail.Reflect.LocalVarSig.LocalSigType
Rail.Reflect.MarshalSpec
Rail.Reflect.MetadataSignatures
Rail.Reflect.FieldSig
Rail.Reflect.MethodDefSig
Rail.Reflect.MethodRefSig
Rail.Reflect.PropertySig
Rail.Reflect.TypeSpecSig
Rail.Reflect.OpCodesList
Rail.Reflect.Param
Rail.Reflect.RAssemblyName
Rail.Reflect.RAssemblyNameDef
Rail.Reflect.RAssemblyNameRef
Rail.Reflect.RCustomAttrib
Rail.Reflect.RetType
Rail.Reflect.RPInvokeInfo
Rail.Reflect.RResource
Rail.Reflect.RVersion
Rail.Reflect.SigType
Rail.Reflect.ARRAY
Rail.Reflect.CLASS
Rail.Reflect.FNPTR
Rail.Reflect.PTR
Rail.Reflect.SZARRAY
Rail.Reflect.ValueType
System.Exception ---- System.Runtime.Serialization.ISerializable
Rail.Reflect.AssemblyReadException
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
Rail.Reflect.MetadataSignatures.SigTypeEnum

See Also

Rail.Reflect Namespace


EmptyVisitor Hierarchy

System.Object
Visitor
EmptyVisitor
AddExceptionHandling
CodeTransformer
FieldAccessReplacer
FieldToPropAccessReplacer
MethodEpilogueAdder
MethodPrologueAdder
MethodReplacer
PropertyAccessReplacer
ReferenceReplacer
ReplaceFieldReadAccess
ReplaceFieldWriteAccess
ReplaceNew

See Also

EmptyVisitor Class | EmptyVisitor Members | Rail.Transformation Namespace


Rail.TransformationHierarchy

An NDoc Documented Class Library

Rail.Transformation Hierarchy

System.Object
Rail.Transformation.IVisitable
Rail.Transformation.Visitor
Rail.Transformation.EmptyVisitor
Rail.Transformation.AddExceptionHandling
Rail.Transformation.CodeTransformer
Rail.Transformation.FieldAccessReplacer
Rail.Transformation.FieldToPropAccessReplacer
Rail.Transformation.MethodEpilogueAdder
Rail.Transformation.MethodPrologueAdder
Rail.Transformation.MethodReplacer
Rail.Transformation.PropertyAccessReplacer
Rail.Transformation.ReferenceReplacer
Rail.Transformation.ReplaceFieldReadAccess
Rail.Transformation.ReplaceFieldWriteAccess
Rail.Transformation.ReplaceNew
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
Rail.Transformation.TraversalOrder

See Also

Rail.Transformation Namespace