C# Класс Patchwork.Engine.Utility.CecilLoader

Helper and extension methods for loading code elements from their Cecil metadata.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

LoadField() публичный статический Метод

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.
Результат System.Reflection.FieldInfo

LoadIntoMemory() публичный статический Метод

Loads a copy of the assembly from memory.
public static LoadIntoMemory ( this def, bool reflectionOnly = false ) : Assembly
def this The definition.
reflectionOnly bool
Результат System.Reflection.Assembly

LoadLocalAssembly() публичный статический Метод

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.
Результат System.Reflection.Assembly

LoadMethod() публичный статический Метод

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.
Результат System.Reflection.MethodBase

LoadType() публичный статический Метод

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.
Результат System.Type