C# Класс Tangerine.BLL.AssemblyPatcher

Patches given XAP assembly that is used to instrumentate application: - logging method calls (names) - logging method parameters (names and values) - logging return values - run custom code instead of method - run custom code on method enter - run custom code on method exit
Показать файл Открыть проект

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

Метод Описание
AssemblyPatcher ( string assemblyPath, IHookProvider hookProvider, DeviceType deviceType, PlatformVersion version ) : System
PatchAssembly ( ) : void

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

Метод Описание
DumpMethod ( string file, Mono.Cecil.MethodDefinition methodDefinition ) : void
ExcludeType ( Mono.Cecil.TypeDefinition typeDefinition ) : bool
InitializeConsoleMethods ( ) : void
InjectCustomCode ( Mono.Cecil.MethodDefinition method, MethodHook methodHook ) : void
InsertCustomCodeCall ( Mono.Cecil.MethodDefinition method, MethodReference generatedTypeCtorRef, MethodReference generatedMethodRef, Mono.Cecil.Cil.CilWorker cilWorker, Instruction instructionToInsertBefore, bool replaceMethod ) : void
LoadAssembly ( string assemblyPath ) : AssemblyDefinition
LoadGeneratedAssembly ( string assemblyName ) : AssemblyDefinition
LogMethodName ( Mono.Cecil.MethodDefinition methodDefinition, Mono.Cecil.TypeDefinition typeDefinition ) : Instruction
LogMethodParameters ( Mono.Cecil.MethodDefinition methodDefinition, Instruction targetInstruction ) : void
LogParameterName ( MethodBody body, string parameterName, Instruction targetInstruction ) : void
LogParameterValue ( MethodBody body, Mono.Cecil.ParameterDefinition parameter, Instruction targetInstruction ) : void
LogReturnValue ( Mono.Cecil.MethodDefinition methodDefinition ) : void
LogText ( Instruction textInstruction, MethodBody body, Instruction insertBefore ) : void
LogTextToConsole ( Instruction textInstruction, MethodBody body, Instruction insertBefore ) : void
LogTextToFile ( Instruction textInstruction, MethodBody body, Instruction insertBefore ) : void
LogValue ( MethodBody body, TypeReference valueType, Instruction targetInstruction ) : void
LogValueToConsole ( MethodBody body, TypeReference valueType, Instruction targetInstruction ) : void
PatchMethod ( Mono.Cecil.MethodDefinition methodDefinition, Mono.Cecil.TypeDefinition typeDefinition, MethodHook methodHook ) : void

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

AssemblyPatcher() публичный Метод

public AssemblyPatcher ( string assemblyPath, IHookProvider hookProvider, DeviceType deviceType, PlatformVersion version ) : System
assemblyPath string
hookProvider IHookProvider
deviceType DeviceType
version PlatformVersion
Результат System

PatchAssembly() публичный Метод

public PatchAssembly ( ) : void
Результат void