Browse Source

Clean up warnings in PluginLoader

pull/94/head
Anairkoen Schno 3 years ago
parent
commit
12f5aa6b78
Signed by: DaNike GPG Key ID: BEFB74D5F3FC4387
5 changed files with 34 additions and 34 deletions
  1. +5
    -5
      IPA.Loader/Loader/PluginLoader.cs
  2. +29
    -29
      Net3-Proxy/Directory.cs
  3. BIN
      Refs/UnityEngine.CoreModule.Net4.dll
  4. BIN
      Refs/UnityEngine.Net4.dll
  5. BIN
      Refs/UnityEngine.UnityWebRequestModule.Net4.dll

+ 5
- 5
IPA.Loader/Loader/PluginLoader.cs View File

@ -76,7 +76,7 @@ namespace IPA.Loader
if (Directory.Exists(newPluginsName)) if (Directory.Exists(newPluginsName))
Directory.Move(newPluginsName, pluginDir); Directory.Move(newPluginsName, pluginDir);
else else
Directory.CreateDirectory(pluginDir);
_ = Directory.CreateDirectory(pluginDir);
} }
} }
@ -117,7 +117,7 @@ namespace IPA.Loader
Logger.loader.Critical(e); Logger.loader.Critical(e);
} }
var resolver = new CecilLibLoader();
using var resolver = new CecilLibLoader();
resolver.AddSearchDirectory(UnityGame.LibraryPath); resolver.AddSearchDirectory(UnityGame.LibraryPath);
resolver.AddSearchDirectory(UnityGame.PluginsPath); resolver.AddSearchDirectory(UnityGame.PluginsPath);
foreach (var plugin in plugins) foreach (var plugin in plugins)
@ -144,7 +144,7 @@ namespace IPA.Loader
{ {
const string manifestSuffix = ".manifest.json"; const string manifestSuffix = ".manifest.json";
if (resource is not EmbeddedResource embedded || if (resource is not EmbeddedResource embedded ||
!embedded.Name.EndsWith(manifestSuffix)) continue;
!embedded.Name.EndsWith(manifestSuffix, StringComparison.Ordinal)) continue;
pluginNs = embedded.Name.Substring(0, embedded.Name.Length - manifestSuffix.Length); pluginNs = embedded.Name.Substring(0, embedded.Name.Length - manifestSuffix.Length);
@ -385,7 +385,7 @@ namespace IPA.Loader
/// <summary> /// <summary>
/// A structure describing the reason that a plugin was ignored. /// A structure describing the reason that a plugin was ignored.
/// </summary> /// </summary>
public struct IgnoreReason
public struct IgnoreReason : IEquatable<IgnoreReason>
{ {
/// <summary> /// <summary>
/// Gets the ignore reason, as represented by the <see cref="Loader.Reason"/> enum. /// Gets the ignore reason, as represented by the <see cref="Loader.Reason"/> enum.
@ -1138,7 +1138,7 @@ namespace IPA.Loader
return exec; return exec;
} }
internal static bool IsFirstLoadComplete { get; private set; } = false;
internal static bool IsFirstLoadComplete { get; private set; }
internal static List<PluginExecutor> LoadPlugins() internal static List<PluginExecutor> LoadPlugins()
{ {


+ 29
- 29
Net3-Proxy/Directory.cs View File

@ -1,29 +1,29 @@
using System.Collections.Generic;
using System.IO;
using System.Security.AccessControl;
using OgDir = System.IO.Directory;
namespace Net3_Proxy
{
public static class Directory
{
public static void Move(string f, string t) => OgDir.Move(f, t);
public static string[] GetFiles(string d) => OgDir.GetFiles(d);
public static string[] GetFiles(string d, string s) => OgDir.GetFiles(d, s);
public static string[] GetFiles(string d, string s, SearchOption o) => OgDir.GetFiles(d, s, o);
public static string[] GetDirectories(string d) => OgDir.GetDirectories(d);
public static string[] GetDirectories(string d, string s) => OgDir.GetDirectories(d, s);
public static string[] GetDirectories(string d, string s, SearchOption o) => OgDir.GetDirectories(d, s, o);
public static bool Exists(string d) => OgDir.Exists(d);
public static void Delete(string d) => OgDir.Delete(d);
public static void Delete(string d, bool r) => OgDir.Delete(d, r);
public static void CreateDirectory(string d) => OgDir.CreateDirectory(d);
public static void CreateDirectory(string d, DirectorySecurity s) => OgDir.CreateDirectory(d, s);
public static IEnumerable<string> EnumerateFiles(string d) => GetFiles(d);
public static IEnumerable<string> EnumerateFiles(string d, string s) => GetFiles(d, s);
public static IEnumerable<string> EnumerateFiles(string d, string s, SearchOption o) => GetFiles(d, s, o);
public static IEnumerable<string> EnumerateDirectories(string d) => GetDirectories(d);
public static IEnumerable<string> EnumerateDirectories(string d, string s) => GetDirectories(d, s);
public static IEnumerable<string> EnumerateDirectories(string d, string s, SearchOption o) => GetDirectories(d, s, o);
}
}
using System.Collections.Generic;
using System.IO;
using System.Security.AccessControl;
using OgDir = System.IO.Directory;
namespace Net3_Proxy
{
public static class Directory
{
public static void Move(string f, string t) => OgDir.Move(f, t);
public static string[] GetFiles(string d) => OgDir.GetFiles(d);
public static string[] GetFiles(string d, string s) => OgDir.GetFiles(d, s);
public static string[] GetFiles(string d, string s, SearchOption o) => OgDir.GetFiles(d, s, o);
public static string[] GetDirectories(string d) => OgDir.GetDirectories(d);
public static string[] GetDirectories(string d, string s) => OgDir.GetDirectories(d, s);
public static string[] GetDirectories(string d, string s, SearchOption o) => OgDir.GetDirectories(d, s, o);
public static bool Exists(string d) => OgDir.Exists(d);
public static void Delete(string d) => OgDir.Delete(d);
public static void Delete(string d, bool r) => OgDir.Delete(d, r);
public static DirectoryInfo CreateDirectory(string d) => OgDir.CreateDirectory(d);
public static DirectoryInfo CreateDirectory(string d, DirectorySecurity s) => OgDir.CreateDirectory(d, s);
public static IEnumerable<string> EnumerateFiles(string d) => GetFiles(d);
public static IEnumerable<string> EnumerateFiles(string d, string s) => GetFiles(d, s);
public static IEnumerable<string> EnumerateFiles(string d, string s, SearchOption o) => GetFiles(d, s, o);
public static IEnumerable<string> EnumerateDirectories(string d) => GetDirectories(d);
public static IEnumerable<string> EnumerateDirectories(string d, string s) => GetDirectories(d, s);
public static IEnumerable<string> EnumerateDirectories(string d, string s, SearchOption o) => GetDirectories(d, s, o);
}
}

BIN
Refs/UnityEngine.CoreModule.Net4.dll View File


BIN
Refs/UnityEngine.Net4.dll View File


BIN
Refs/UnityEngine.UnityWebRequestModule.Net4.dll View File


Loading…
Cancel
Save