C# Класс OTAPI.Patcher.Engine.Extensions.CecilHelpers

Показать файл Открыть проект

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

Метод Описание
CompareParameterTypes ( this source, IEnumerable parameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : bool
Constructor ( this type ) : Mono.Cecil.MethodDefinition

Returns the default constructor, expecting only one in the type.

Field ( this typeDefinition, string name ) : FieldDefinition
ForEachInstruction ( this module, Mono.Cecil.Cil.Instruction>.Action callback ) : void

Enumerates all instructions in all methods across each type of the assembly

ForEachMethod ( this module, Action callback ) : void

Enumerates all methods in the current module

ForEachNestedType ( this parent, Action callback ) : void
ForEachType ( this module, Action callback ) : void

Enumerates over each type in the assembly, including nested types

Method ( this typeDefinition, string name, Collection parameters, bool isStatic = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
Method ( this typeDefinition, string name, System parameters, bool isStatic = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
Method ( this typeDefinition, string name, bool isStatic = null, ParameterTypeCollection parameters = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
NestedType ( this typeDefinition, string name ) : Mono.Cecil.TypeDefinition
Next ( this initial, Boolean>.Func predicate ) : Instruction
Next ( this initial, int count = -1 ) : List
Previous ( this initial, Boolean>.Func predicate ) : Instruction
Previous ( this initial, int count ) : Instruction
Property ( this typeDefinition, string name ) : Mono.Cecil.PropertyDefinition
SignatureMatches ( this method, Mono.Cecil.MethodDefinition compareTo, bool ignoreDeclaringType = true ) : bool
SignatureMatches ( this type, Mono.Cecil.TypeDefinition compareTo ) : bool
StaticConstructor ( this type ) : Mono.Cecil.MethodDefinition

Returns the static constructor of the type, if any

Type ( this moduleDefinition, string fullName ) : Mono.Cecil.TypeDefinition

Returns a type from the current module by its fullName

TypeDefinition ( this type, AssemblyDefinition definition ) : Mono.Cecil.TypeDefinition

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

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

public static CompareParameterTypes ( this source, IEnumerable parameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : bool
source this
parameters IEnumerable
acceptParamObjectTypes bool
substituteByRefs bool
Результат bool

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

Returns the default constructor, expecting only one in the type.
public static Constructor ( this type ) : Mono.Cecil.MethodDefinition
type this
Результат Mono.Cecil.MethodDefinition

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

public static Field ( this typeDefinition, string name ) : FieldDefinition
typeDefinition this
name string
Результат Mono.Cecil.FieldDefinition

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

Enumerates all instructions in all methods across each type of the assembly
public static ForEachInstruction ( this module, Mono.Cecil.Cil.Instruction>.Action callback ) : void
module this
callback Mono.Cecil.Cil.Instruction>.Action
Результат void

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

Enumerates all methods in the current module
public static ForEachMethod ( this module, Action callback ) : void
module this
callback Action
Результат void

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

public static ForEachNestedType ( this parent, Action callback ) : void
parent this
callback Action
Результат void

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

Enumerates over each type in the assembly, including nested types
public static ForEachType ( this module, Action callback ) : void
module this
callback Action
Результат void

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

public static Method ( this typeDefinition, string name, Collection parameters, bool isStatic = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
typeDefinition this
name string
parameters Collection
isStatic bool
skipMethodParameters int
skipInputParameters int
acceptParamObjectTypes bool
substituteByRefs bool
Результат Mono.Cecil.MethodDefinition

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

public static Method ( this typeDefinition, string name, System parameters, bool isStatic = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
typeDefinition this
name string
parameters System
isStatic bool
skipMethodParameters int
skipInputParameters int
acceptParamObjectTypes bool
substituteByRefs bool
Результат Mono.Cecil.MethodDefinition

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

public static Method ( this typeDefinition, string name, bool isStatic = null, ParameterTypeCollection parameters = null, int skipMethodParameters, int skipInputParameters, bool acceptParamObjectTypes = false, bool substituteByRefs = false ) : Mono.Cecil.MethodDefinition
typeDefinition this
name string
isStatic bool
parameters ParameterTypeCollection
skipMethodParameters int
skipInputParameters int
acceptParamObjectTypes bool
substituteByRefs bool
Результат Mono.Cecil.MethodDefinition

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

public static NestedType ( this typeDefinition, string name ) : Mono.Cecil.TypeDefinition
typeDefinition this
name string
Результат Mono.Cecil.TypeDefinition

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

public static Next ( this initial, Boolean>.Func predicate ) : Instruction
initial this
predicate Boolean>.Func
Результат Instruction

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

public static Next ( this initial, int count = -1 ) : List
initial this
count int
Результат List

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

public static Previous ( this initial, Boolean>.Func predicate ) : Instruction
initial this
predicate Boolean>.Func
Результат Instruction

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

public static Previous ( this initial, int count ) : Instruction
initial this
count int
Результат Instruction

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

public static Property ( this typeDefinition, string name ) : Mono.Cecil.PropertyDefinition
typeDefinition this
name string
Результат Mono.Cecil.PropertyDefinition

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

public static SignatureMatches ( this method, Mono.Cecil.MethodDefinition compareTo, bool ignoreDeclaringType = true ) : bool
method this
compareTo Mono.Cecil.MethodDefinition
ignoreDeclaringType bool
Результат bool

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

public static SignatureMatches ( this type, Mono.Cecil.TypeDefinition compareTo ) : bool
type this
compareTo Mono.Cecil.TypeDefinition
Результат bool

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

Returns the static constructor of the type, if any
public static StaticConstructor ( this type ) : Mono.Cecil.MethodDefinition
type this
Результат Mono.Cecil.MethodDefinition

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

Returns a type from the current module by its fullName
public static Type ( this moduleDefinition, string fullName ) : Mono.Cecil.TypeDefinition
moduleDefinition this
fullName string
Результат Mono.Cecil.TypeDefinition

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

public static TypeDefinition ( this type, AssemblyDefinition definition ) : Mono.Cecil.TypeDefinition
type this
definition Mono.Cecil.AssemblyDefinition
Результат Mono.Cecil.TypeDefinition