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.
파일 보기 프로젝트 열기: DeathCradle/Open-Terraria-API 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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