Remmove passthrough method

This commit is contained in:
Paul Pacheco 2020-09-22 12:33:18 -05:00
parent 3d331b4c61
commit 116336fbf1
2 changed files with 4 additions and 9 deletions

View File

@ -144,8 +144,10 @@ static void OnCompilationFinished(string assemblyPath, CompilerMessage[] message
HashSet<string> dependencyPaths = GetDependecyPaths(assemblyPath); HashSet<string> dependencyPaths = GetDependecyPaths(assemblyPath);
dependencyPaths.Add(Path.GetDirectoryName(mirrorRuntimeDll)); dependencyPaths.Add(Path.GetDirectoryName(mirrorRuntimeDll));
dependencyPaths.Add(Path.GetDirectoryName(unityEngineCoreModuleDLL)); dependencyPaths.Add(Path.GetDirectoryName(unityEngineCoreModuleDLL));
Log.WarningMethod = HandleWarning;
Log.ErrorMethod = HandleError;
if (Weaver.Process(assemblyPath, dependencyPaths.ToArray(), HandleWarning, HandleError)) if (Weaver.WeaveAssembly(assemblyPath, dependencyPaths.ToArray()))
{ {
// NOTE: WeaveFailed is critical for unit tests but isn't used elsewhere // NOTE: WeaveFailed is critical for unit tests but isn't used elsewhere
WeaveFailed = false; WeaveFailed = false;

View File

@ -323,7 +323,7 @@ static bool Weave(string assName, IEnumerable<string> dependencies)
return true; return true;
} }
static bool WeaveAssembly(string assembly, IEnumerable<string> dependencies) public static bool WeaveAssembly(string assembly, IEnumerable<string> dependencies)
{ {
WeavingFailed = false; WeavingFailed = false;
WeaveLists = new WeaverLists(); WeaveLists = new WeaverLists();
@ -339,12 +339,5 @@ static bool WeaveAssembly(string assembly, IEnumerable<string> dependencies)
} }
} }
public static bool Process(string assembly, string[] extraAssemblyPaths, Action<string> printWarning, Action<string> printError)
{
Log.WarningMethod = printWarning;
Log.ErrorMethod = printError;
return WeaveAssembly(assembly, extraAssemblyPaths);
}
} }
} }