Procházet zdrojové kódy

Fix missing docs in preloader
Rebase of 9ff80ca

Bepis před 4 roky
rodič
revize
328b4fff06

+ 8 - 0
BepInEx.Preloader.Core/Logging/PreloaderConsoleListener.cs

@@ -4,10 +4,17 @@ using BepInEx.Logging;
 
 namespace BepInEx.Preloader.Core.Logging
 {
+	/// <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>
+		/// A list of all <see cref="LogEventArgs"/> objects that this listener has received.
+		/// </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.Core.Logging
 			LogLevel.Fatal | LogLevel.Error | LogLevel.Warning | LogLevel.Message | LogLevel.Info,
 			"Which log levels to show in the console output.");
 
+		/// <inheritdoc />
 		public void Dispose() { }
 	}
 }

+ 1 - 2
BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs

@@ -87,7 +87,6 @@ namespace BepInEx.Preloader.Core
 		///     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 void AddPatchersFromDirectory(string directory)
 		{
 			if (!Directory.Exists(directory))
@@ -252,7 +251,7 @@ namespace BepInEx.Preloader.Core
 			{
 				return new AssemblyName(fullName).Name;
 			}
-			catch (Exception e)
+			catch (Exception)
 			{
 				return fullName;
 			}

+ 2 - 0
BepInEx.Preloader.Core/Patching/PatcherPlugin.cs

@@ -35,11 +35,13 @@ namespace BepInEx.Preloader.Core
 		/// </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();

+ 1 - 5
BepInEx.Preloader.Unity/DoorstopEntrypoint.cs

@@ -57,11 +57,7 @@ namespace BepInEx.Preloader.Unity
 		/// <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(string[] args)
+		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.
 			string silentExceptionLog = $"preloader_{DateTime.Now:yyyyMMdd_HHmmss_fff}.log";