mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Fix missing docs in preloader
This commit is contained in:
1 parent
78484b7070
commit
9ff80ca1a2
5 files changed
+16
-7
No files matched your search
@@ -57,10 +57,6 @@ namespace BepInEx.Preloader
|
||||
/// <summary>
|
||||
/// The main entrypoint of BepInEx, called from Doorstop.
|
||||
/// </summary>
|
||||
/// <param name="args">
|
||||
/// The arguments passed in from Doorstop. First argument is the path of the currently executing
|
||||
/// process.
|
||||
/// </param>
|
||||
public static void Main()
|
||||
{
|
||||
// We set it to the current directory first as a fallback, but try to use the same location as the .exe file.
|
||||
|
||||
@@ -4,10 +4,17 @@ using BepInEx.Logging;
|
||||
|
||||
namespace BepInEx.Preloader
|
||||
{
|
||||
/// <summary>
|
||||
/// Log listener that listens to logs during preloading time and buffers messages for output in Unity logs later.
|
||||
/// </summary>
|
||||
public class PreloaderConsoleListener : ILogListener
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<LogEventArgs> LogEvents { get; } = new List<LogEventArgs>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public void LogEvent(object sender, LogEventArgs eventArgs)
|
||||
{
|
||||
if ((eventArgs.Level & ConfigConsoleDisplayedLevel.Value) == 0)
|
||||
@@ -21,6 +28,7 @@ namespace BepInEx.Preloader
|
||||
LogLevel.Fatal | LogLevel.Error | LogLevel.Message | LogLevel.Info | LogLevel.Warning,
|
||||
"Which log levels to show in the console output.");
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose() { }
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,9 @@ namespace BepInEx.Preloader.Patching
|
||||
{
|
||||
private const BindingFlags ALL = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.IgnoreCase;
|
||||
|
||||
/// <summary>
|
||||
/// List of all patcher plugins to be applied
|
||||
/// </summary>
|
||||
public static List<PatcherPlugin> PatcherPlugins { get; } = new List<PatcherPlugin>();
|
||||
|
||||
private static readonly string DumpedAssembliesPath = Path.Combine(Paths.BepInExRootPath, "DumpedAssemblies");
|
||||
@@ -76,7 +79,6 @@ namespace BepInEx.Preloader.Patching
|
||||
/// Adds all patchers from all managed assemblies specified in a directory.
|
||||
/// </summary>
|
||||
/// <param name="directory">Directory to search patcher DLLs from.</param>
|
||||
/// <param name="patcherLocator">A function that locates assembly patchers in a given managed assembly.</param>
|
||||
public static void AddPatchersFromDirectory(string directory)
|
||||
{
|
||||
if (!Directory.Exists(directory))
|
||||
@@ -195,7 +197,7 @@ namespace BepInEx.Preloader.Patching
|
||||
{
|
||||
return new AssemblyName(fullName).Name;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
return fullName;
|
||||
}
|
||||
@@ -344,6 +346,7 @@ namespace BepInEx.Preloader.Patching
|
||||
/// Loads an individual assembly definition into the CLR.
|
||||
/// </summary>
|
||||
/// <param name="assembly">The assembly to load.</param>
|
||||
/// <param name="filename">File name of the assembly being loaded.</param>
|
||||
public static void Load(AssemblyDefinition assembly, string filename)
|
||||
{
|
||||
if (ConfigLoadDumpedAssemblies.Value)
|
||||
|
||||
@@ -35,11 +35,13 @@ namespace BepInEx.Preloader.Patching
|
||||
/// </summary>
|
||||
public string TypeName { get; set; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Save(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(TypeName);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Load(BinaryReader br)
|
||||
{
|
||||
TypeName = br.ReadString();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace BepInEx.Preloader.RuntimeFixes
|
||||
|
||||
public static void Apply()
|
||||
{
|
||||
HarmonyInstance = HarmonyWrapper.PatchAll(typeof(UnityPatches), HarmonyInstance);
|
||||
HarmonyInstance = HarmonyLib.Harmony.CreateAndPatchAll(typeof(UnityPatches));
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user