Class PatcherContext

Context provided to patcher plugins from the associated patcher engine.

Inheritance
System.Object PatcherContext
Inherited Members
System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace: BepInEx.Preloader.Core.Patching
Assembly: BepInEx.Preloader.Core.dll
Syntax
public class PatcherContext

Properties

AvailableAssemblies

Contains a list of assemblies that will be patched and loaded into the runtime.

The dictionary has the name of the file, without any directories. These are used by the dumping functionality, and as such, these are also required to be unique. They do not have to be exactly the same as the real filename, however they have to be mapped deterministically.

Order is not respected, as it will be sorted by dependencies.

Declaration
public Dictionary<string, AssemblyDefinition> AvailableAssemblies { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, AssemblyDefinition>

AvailableAssembliesPaths

Contains a mapping of available assembly name to their original filenames.

Declaration
public Dictionary<string, string> AvailableAssembliesPaths { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>

DumpedAssembliesPath

Declaration
public string DumpedAssembliesPath { get; }
Property Value
Type Description
System.String

LoadedAssemblies

Contains a dictionary of assemblies that have been loaded as part of executing this assembly patcher.

The key is the same key as used in LoadedAssemblies, while the value is the actual assembly itself.

Declaration
public Dictionary<string, Assembly> LoadedAssemblies { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Reflection.Assembly>

PatchDefinitions

A list of individual patches that AssemblyPatcher will execute, generated by parsing PatcherPlugins.

Declaration
public List<PatchDefinition> PatchDefinitions { get; }
Property Value
Type Description
System.Collections.Generic.List<PatchDefinition>

PatcherPlugins

A list of plugins that will be initialized and executed, in the order of the list.

Declaration
public List<BasePatcher> PatcherPlugins { get; }
Property Value
Type Description
System.Collections.Generic.List<BasePatcher>