mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Weaver Helpers: remove unused AddSearchDirectoryHelper
This commit is contained in:
parent
a26a0a39e2
commit
5801051a29
@ -10,26 +10,6 @@ class Helpers
|
|||||||
{
|
{
|
||||||
// This code is taken from SerializationWeaver
|
// This code is taken from SerializationWeaver
|
||||||
|
|
||||||
class AddSearchDirectoryHelper
|
|
||||||
{
|
|
||||||
delegate void AddSearchDirectoryDelegate(string directory);
|
|
||||||
readonly AddSearchDirectoryDelegate _addSearchDirectory;
|
|
||||||
|
|
||||||
public AddSearchDirectoryHelper(IAssemblyResolver assemblyResolver)
|
|
||||||
{
|
|
||||||
// reflection is used because IAssemblyResolver doesn't implement AddSearchDirectory but both DefaultAssemblyResolver and NuGetAssemblyResolver do
|
|
||||||
MethodInfo addSearchDirectory = assemblyResolver.GetType().GetMethod("AddSearchDirectory", BindingFlags.Instance | BindingFlags.Public, null, new Type[] { typeof(string) }, null);
|
|
||||||
if (addSearchDirectory == null)
|
|
||||||
throw new Exception("Assembly resolver doesn't implement AddSearchDirectory method.");
|
|
||||||
_addSearchDirectory = (AddSearchDirectoryDelegate)Delegate.CreateDelegate(typeof(AddSearchDirectoryDelegate), assemblyResolver, addSearchDirectory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddSearchDirectory(string directory)
|
|
||||||
{
|
|
||||||
_addSearchDirectory(directory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string UnityEngineDLLDirectoryName()
|
public static string UnityEngineDLLDirectoryName()
|
||||||
{
|
{
|
||||||
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
|
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
|
||||||
|
Loading…
Reference in New Issue
Block a user