Ver código fonte

Merge pull request #21 from NeighTools/master

Remove unused references, fix IsNullOrWhiteSpace
Bepis 6 anos atrás
pai
commit
452622ca01
3 arquivos alterados com 11 adições e 12 exclusões
  1. 10 0
      BepInEx.Common/Utility.cs
  2. 0 12
      BepInEx/BepInEx.csproj
  3. 1 0
      BepInEx/Config.cs

+ 10 - 0
BepInEx.Common/Utility.cs

@@ -35,5 +35,15 @@ namespace BepInEx.Common
         {
             return $"file://{path.Replace('\\', '/')}";
         }
+
+        /// <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>
+        public static bool IsNullOrWhiteSpace(this string self)
+        {
+            return self == null || self.Trim().Length == 0;
+        }
     }
 }

+ 0 - 12
BepInEx/BepInEx.csproj

@@ -29,19 +29,7 @@
     <Reference Include="0Harmony">
       <HintPath>..\lib\0Harmony.dll</HintPath>
     </Reference>
-    <Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\Assembly-CSharp.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\lib\Assembly-CSharp-firstpass.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
     <Reference Include="System" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
     <Reference Include="UnityEngine">
       <HintPath>..\lib\UnityEngine.dll</HintPath>

+ 1 - 0
BepInEx/Config.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Text.RegularExpressions;
+using BepInEx.Common;
 
 namespace BepInEx
 {