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

Contains the meat of the patcher, organises the source assembly, and a list of all the modification instances that will run against the source assembly.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
modificationAssemblyGlob IEnumerable
readerParams ReaderParameters
resolver NugetAssemblyResolver

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

Метод Описание
AllowDuplicateModificationTypes ( System allowedTypes ) : void

This will allow ILRepack to merge all our modifications into one assembly. In our case we define hooks in the same namespace across different modification assemblies, and of course ILRepack detects the conflict. By enumerating each type of the modifications, we add each full name to the allowed list.

Patcher ( string sourceAssemblyPath, IEnumerable modificationAssemblyGlob, string outputAssemblyPath ) : Mono.Cecil

Creates a new instance of the patcher with the specified source assembly path and a glob containing all the modification assemblies.

Run ( ) : void

Защищенные методы

Метод Описание
Cleanup ( ) : void

Cleans up data after a successful patch

GlobModificationAssemblies ( ) : IEnumerable
LoadModification ( Type type ) : ModificationBase
LoadModificationAssemblies ( ) : void
LoadSourceAssembly ( ) : void
PackAssemblies ( ) : void
RemoveModificationsFromPackedAssembly ( ) : void

Removes all ModificationBase implementations from the output assembly. Additionally it will also remove references that were added due to ModificationBases being merged in.

RunModifications ( ) : void
SaveSourceAssembly ( ) : void

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

Метод Описание
CurrentDomain_AssemblyLoad ( object sender, AssemblyLoadEventArgs args ) : void
CurrentDomain_AssemblyResolve ( object sender, ResolveEventArgs args ) : Assembly
Resolver_OnResolved ( object sender, NugetAssemblyResolvedEventArgs e ) : void
Resolver_ResolveFailure ( object sender, Mono.Cecil.AssemblyNameReference reference ) : AssemblyDefinition

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

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

This will allow ILRepack to merge all our modifications into one assembly. In our case we define hooks in the same namespace across different modification assemblies, and of course ILRepack detects the conflict. By enumerating each type of the modifications, we add each full name to the allowed list.
public AllowDuplicateModificationTypes ( System allowedTypes ) : void
allowedTypes System
Результат void

Cleanup() защищенный Метод

Cleans up data after a successful patch
protected Cleanup ( ) : void
Результат void

GlobModificationAssemblies() защищенный Метод

protected GlobModificationAssemblies ( ) : IEnumerable
Результат IEnumerable

LoadModification() защищенный Метод

protected LoadModification ( Type type ) : ModificationBase
type System.Type
Результат ModificationBase

LoadModificationAssemblies() защищенный Метод

protected LoadModificationAssemblies ( ) : void
Результат void

LoadSourceAssembly() защищенный Метод

protected LoadSourceAssembly ( ) : void
Результат void

PackAssemblies() защищенный Метод

protected PackAssemblies ( ) : void
Результат void

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

Creates a new instance of the patcher with the specified source assembly path and a glob containing all the modification assemblies.
public Patcher ( string sourceAssemblyPath, IEnumerable modificationAssemblyGlob, string outputAssemblyPath ) : Mono.Cecil
sourceAssemblyPath string Path to the source assembly that modifications need to applied to
modificationAssemblyGlob IEnumerable A list of globs that yields a list of modifications
outputAssemblyPath string Path for the modified assembly to be saved
Результат Mono.Cecil

RemoveModificationsFromPackedAssembly() защищенный Метод

Removes all ModificationBase implementations from the output assembly. Additionally it will also remove references that were added due to ModificationBases being merged in.
protected RemoveModificationsFromPackedAssembly ( ) : void
Результат void

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

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

RunModifications() защищенный Метод

protected RunModifications ( ) : void
Результат void

SaveSourceAssembly() защищенный Метод

protected SaveSourceAssembly ( ) : void
Результат void

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

modificationAssemblyGlob защищенное свойство

Glob pattern for the list of modification assemblies that will run against the source assembly.
protected IEnumerable modificationAssemblyGlob
Результат IEnumerable

readerParams защищенное свойство

protected ReaderParameters readerParams
Результат ReaderParameters

resolver защищенное свойство

protected NugetAssemblyResolver,OTAPI.Patcher.Engine resolver
Результат NugetAssemblyResolver