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

Helper methods (mainly extension methods) for working with Cecil and .NET reflection classes. Some are publically visible.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
PatchworkMetadataString string

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

Метод Описание
Clone ( this definition ) : AssemblyDefinition

Returns a reloaded clone of the assembly by serializing it and loading it from memory.

CloneReference ( this methodDef ) : FieldReference

Returns another reference to the same field.

CloneReference ( this methodRef ) : MethodReference

Creates another refernece to the same method.

GetAssemblyMetadataString ( this assembly ) : string

Returns a human-readable metadata string that describes the specified Cecil assembly definition.

SerializeAssembly ( this definition ) : byte[]

Serializes the assembly by writing it into a memory stream.

SetAccessibility ( this method, Accessibility newAccessibility ) : void

Sets the accessibility attributes of this member to the desired C#-like accessibility.

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

Метод Описание
GetAccessbility ( this memberDef ) : Accessibility

Gets the C#-like accessbility of this member.

GetAccessibilityDynamic ( dynamic whatever ) : Accessibility
GetAssemblyMetadataString ( string fullName, string path ) : string

Returns the metadata string that describes the assembly in the specified location, expected to have the specified full name.

SetAccessibilityDynamic ( dynamic whatever, Accessibility newAccessibility ) : void

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

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

Returns a reloaded clone of the assembly by serializing it and loading it from memory.
public static Clone ( this definition ) : AssemblyDefinition
definition this The assembly definition.
Результат Mono.Cecil.AssemblyDefinition

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

Returns another reference to the same field.
public static CloneReference ( this methodDef ) : FieldReference
methodDef this The field reference.
Результат Mono.Cecil.FieldReference

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

Creates another refernece to the same method.
public static CloneReference ( this methodRef ) : MethodReference
methodRef this The method reference.
Результат Mono.Cecil.MethodReference

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

Returns a human-readable metadata string that describes the specified Cecil assembly definition.
public static GetAssemblyMetadataString ( this assembly ) : string
assembly this The assembly.
Результат string

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

Serializes the assembly by writing it into a memory stream.
public static SerializeAssembly ( this definition ) : byte[]
definition this The assembly definition.
Результат byte[]

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

Sets the accessibility attributes of this member to the desired C#-like accessibility.
public static SetAccessibility ( this method, Accessibility newAccessibility ) : void
method this The method.
newAccessibility Accessibility The new accessibility.
Результат void

Описание свойств

PatchworkMetadataString публичное статическое свойство

Contains the metadata string of the executing Patchwork.Engine assembly, as determined by the GetAssemblyMetadataString(Mono.Cecil.AssemblyDefinition) method.
public static string PatchworkMetadataString
Результат string