C# Class Patchwork.Engine.Utility.CecilLoader

Helper and extension methods for loading code elements from their Cecil metadata.
Afficher le fichier Open project: GregRos/Patchwork

Méthodes publiques

Méthode Description
LoadField ( this fieldDef ) : FieldInfo

Loads a Cecil.FieldDefinition as a System.FieldInfo. Requires loading the assembly.

LoadIntoMemory ( this def, bool reflectionOnly = false ) : Assembly

Loads a copy of the assembly from memory.

LoadLocalAssembly ( this assemblyDef ) : Assembly

Tries to load the assembly from disk by using its Cecil identifiers. Can fail, so don't use it often.

LoadMethod ( this methodDef ) : MethodBase

Converts a Cecil.MethodDefinition to a MethodBase. Also converts constructors. Requires loading the type and/or assembly.

LoadType ( this typeDef ) : Type

Loads a type using its Cecil definition. Involves loading the assembly from disk.

Private Methods

Méthode Description
LoadMember ( this memberDef ) : MemberInfo

Loads the member from its IMemberDefinition.

LoadProperty ( this propDef ) : PropertyInfo

Loads the property from its Cecil metadata. Involves loading the assembly from disk.

Method Details

LoadField() public static méthode

Loads a Cecil.FieldDefinition as a System.FieldInfo. Requires loading the assembly.
Could not find the field.
public static LoadField ( this fieldDef ) : FieldInfo
fieldDef this The field definition.
Résultat System.Reflection.FieldInfo

LoadIntoMemory() public static méthode

Loads a copy of the assembly from memory.
public static LoadIntoMemory ( this def, bool reflectionOnly = false ) : Assembly
def this The definition.
reflectionOnly bool
Résultat System.Reflection.Assembly

LoadLocalAssembly() public static méthode

Tries to load the assembly from disk by using its Cecil identifiers. Can fail, so don't use it often.
Could not load the assembly from its Mono.Cecil definition.
public static LoadLocalAssembly ( this assemblyDef ) : Assembly
assemblyDef this The assembly definition.
Résultat System.Reflection.Assembly

LoadMethod() public static méthode

Converts a Cecil.MethodDefinition to a MethodBase. Also converts constructors. Requires loading the type and/or assembly.
No member matched the search criteria. Could not load the type or assembly. More than one member matched the search criteria.
public static LoadMethod ( this methodDef ) : MethodBase
methodDef this The method definition.
Résultat System.Reflection.MethodBase

LoadType() public static méthode

Loads a type using its Cecil definition. Involves loading the assembly from disk.
Could not find the type from its Mono.Cecil identifiers, or could not load the /// assembly.
public static LoadType ( this typeDef ) : Type
typeDef this The type definition.
Résultat System.Type