mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Tabify whitespaces; cleanup code
This commit is contained in:
1 parent
79df187de2
commit
33d3517f18
2 files changed
+12
-12
No files matched your search
@@ -46,11 +46,11 @@ namespace BepInEx.Preloader.Patching
|
||||
if (type.IsInterface || type.IsAbstract && !type.IsSealed)
|
||||
return null;
|
||||
|
||||
var targetDlls = type.Methods.FirstOrDefault(m => m.Name.Equals("get_TargetDLLs", StringComparison.InvariantCultureIgnoreCase) &&
|
||||
var targetDlls = type.Methods.FirstOrDefault(m => m.Name.Equals("get_TargetDLLs", StringComparison.InvariantCultureIgnoreCase) &&
|
||||
m.IsPublic &&
|
||||
m.IsStatic);
|
||||
|
||||
if (targetDlls == null ||
|
||||
if (targetDlls == null ||
|
||||
targetDlls.ReturnType.FullName != "System.Collections.Generic.IEnumerable`1<System.String>")
|
||||
return null;
|
||||
|
||||
@@ -73,11 +73,11 @@ namespace BepInEx.Preloader.Patching
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
/// 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))
|
||||
return;
|
||||
@@ -142,9 +142,9 @@ namespace BepInEx.Preloader.Patching
|
||||
|
||||
Logger.Log(patcherCollection.Any() ? LogLevel.Info : LogLevel.Debug,
|
||||
$"Loaded {patcherCollection.Count} patcher methods from {assembly.Name.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, PatcherPlugin> patcher in sortedPatchers)
|
||||
foreach (KeyValuePair<string, PatcherPlugin> patcher in sortedPatchers)
|
||||
AddPatcher(patcher.Value);
|
||||
|
||||
foreach (var assemblyDefinition in patchers.Keys)
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace BepInEx.Preloader
|
||||
|
||||
public static bool IsDotNet46 { get; } = string.Compare("4.0.30319.42000", Environment.Version.ToString(), StringComparison.Ordinal) <= 0;
|
||||
|
||||
static Preloader()
|
||||
static Preloader()
|
||||
{
|
||||
ConfigEntrypointAssembly = ConfigFile.CoreConfig.Wrap(
|
||||
"Preloader.Entrypoint",
|
||||
"Assembly",
|
||||
"The local filename of the assembly to target.",
|
||||
IsPostUnity2017 ? "UnityEngine.CoreModule.dll" : "UnityEngine.dll"
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public static void Run()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user