Browse Source

Tabify whitespaces; cleanup code

ghorsington 5 năm trước cách đây
mục cha
commit
33d3517f18

+ 9 - 9
BepInEx.Preloader/Patching/AssemblyPatcher.cs

@@ -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)

+ 3 - 3
BepInEx.Preloader/Preloader.cs

@@ -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()
 		{