Bepis преди 6 години
родител
ревизия
00ea1844c5
променени са 3 файла, в които са добавени 0 реда и са изтрити 140 реда
  1. 0 2
      BepInEx/BepInEx.csproj
  2. 0 58
      BepInEx/Deprecated/BepInLogger.cs
  3. 0 80
      BepInEx/Deprecated/Utility.cs

+ 0 - 2
BepInEx/BepInEx.csproj

@@ -71,8 +71,6 @@
     <Compile Include="ConsoleUtil\SafeConsole.cs" />
     <Compile Include="Bootstrap\Chainloader.cs" />
     <Compile Include="Contract\BaseUnityPlugin.cs" />
-    <Compile Include="Deprecated\BepInLogger.cs" />
-    <Compile Include="Deprecated\Utility.cs" />
     <Compile Include="Logging\BaseLogger.cs" />
     <Compile Include="Logging\Logger.cs" />
     <Compile Include="Logging\LogLevel.cs" />

+ 0 - 58
BepInEx/Deprecated/BepInLogger.cs

@@ -1,58 +0,0 @@
-using System;
-using BepInEx.Logging;
-
-namespace BepInEx
-{
-    /// <summary>
-    /// A helper class to use for logging.
-    /// </summary>
-    [Obsolete("This class has been deprecated; please use the Logger static class and BaseLogger implementations", true)]
-    public static class BepInLogger
-    {
-        /// <summary>
-        /// The handler for a entry logged event.
-        /// </summary>
-        /// <param name="entry">The text element of the log itself.</param>
-        /// <param name="show">Whether or not it should be dislpayed to the user.</param>
-        public delegate void EntryLoggedEventHandler(string entry, bool show = false);
-
-        /// <summary>
-        /// The listener event for an entry being logged.
-        /// </summary>
-        public static event EntryLoggedEventHandler EntryLogged;
-
-        /// <summary>
-        /// Logs an entry to the logger, and any listeners are notified of the entry.
-        /// </summary>
-        /// <param name="entry">The text element of the log itself.</param>
-        /// <param name="show">Whether or not it should be dislpayed to the user.</param>
-        public static void Log(string entry, bool show = false)
-        {
-	        Logger.Log(show ? LogLevel.Message : LogLevel.Info, entry);
-
-	        EntryLogged?.Invoke(entry, show);
-        }
-
-        /// <summary>
-        /// Logs an entry to the logger, and any listeners are notified of the entry.
-        /// </summary>
-        /// <param name="entry">The text element of the log itself. Uses .ToString().</param>
-        /// <param name="show">Whether or not it should be dislpayed to the user.</param>
-        /// <param name="color">The color of the text to show in the console.</param>
-        public static void Log(object entry, bool show, ConsoleColor color)
-        {
-	        Log(entry.ToString(), show);
-        }
-
-        /// <summary>
-        /// Logs an entry to the logger, and any listeners are notified of the entry.
-        /// </summary>
-        /// <param name="entry">The text element of the log itself.</param>
-        /// <param name="show">Whether or not it should be dislpayed to the user.</param>
-        /// <param name="color">The color of the text to show in the console.</param>
-        public static void Log(string entry, bool show, ConsoleColor color)
-        {
-			Log(entry, show);
-        }
-    }
-}

+ 0 - 80
BepInEx/Deprecated/Utility.cs

@@ -1,80 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-
-namespace BepInEx.Common
-{
-	/// <summary>
-	/// Generic helper properties and methods.
-	/// </summary>
-	[Obsolete("This class has moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-	public static class Utility
-	{
-		/// <summary>
-		/// The directory that the game .exe is being run from.
-		/// </summary>
-		[Obsolete("This property has been moved, please use Paths.GameRootPath instead", true)]
-		public static string ExecutingDirectory
-			=> Paths.GameRootPath;
-
-		/// <summary>
-		/// The path that the plugins folder is located.
-		/// </summary>
-		[Obsolete("This property has been moved, please use Paths.PluginPath instead", true)]
-		public static string PluginsDirectory
-			=> Paths.PluginPath;
-
-		/// <summary>
-		/// Combines multiple paths together, as the specfic method is not availble in .NET 3.5.
-		/// </summary>
-		/// <param name="parts">The multiple paths to combine together.</param>
-		/// <returns>A combined path.</returns>
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static string CombinePaths(params string[] parts) =>
-			BepInEx.Utility.CombinePaths(parts);
-
-		/// <summary>
-		/// Tries to parse a bool, with a default value if unable to parse.
-		/// </summary>
-		/// <param name="input">The string to parse</param>
-		/// <param name="defaultValue">The value to return if parsing is unsuccessful.</param>
-		/// <returns>Boolean value of input if able to be parsed, otherwise default value.</returns>
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static bool SafeParseBool(string input, bool defaultValue = false) =>
-			BepInEx.Utility.SafeParseBool(input, defaultValue);
-
-		/// <summary>
-		/// Converts a file path into a UnityEngine.WWW format.
-		/// </summary>
-		/// <param name="path">The file path to convert.</param>
-		/// <returns>A converted file path.</returns>
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static string ConvertToWWWFormat(string path)
-			=> BepInEx.Utility.ConvertToWWWFormat(path);
-
-		/// <summary>
-		/// Indicates whether a specified string is null, empty, or consists only of white-space characters.
-		/// </summary>
-		/// <param name="self">The string to test.</param>
-		/// <returns>True if the value parameter is null or empty, or if value consists exclusively of white-space characters.</returns>
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static bool IsNullOrWhiteSpace(this string self)
-			=> BepInEx.Utility.IsNullOrWhiteSpace(self);
-
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static IEnumerable<TNode> TopologicalSort<TNode>(IEnumerable<TNode> nodes,
-			Func<TNode, IEnumerable<TNode>> dependencySelector)
-			=> BepInEx.Utility.TopologicalSort(nodes, dependencySelector);
-
-		/// <summary>
-		/// Try to resolve and load the given assembly DLL.
-		/// </summary>
-		/// <param name="assemblyName">Name of the assembly, of the type <see cref="AssemblyName" />.</param>
-		/// <param name="directory">Directory to search the assembly from.</param>
-		/// <param name="assembly">The loaded assembly.</param>
-		/// <returns>True, if the assembly was found and loaded. Otherwise, false.</returns>
-		[Obsolete("This method has been moved, please use BepInEx.Utility instead of BepInEx.Common.Utility", true)]
-		public static bool TryResolveDllAssembly(AssemblyName assemblyName, string directory, out Assembly assembly)
-			=> BepInEx.Utility.TryResolveDllAssembly(assemblyName, directory, out assembly);
-	}
-}