simplify module weaving

This commit is contained in:
Paul Pacheco 2020-09-22 11:45:31 -05:00
parent e79ffeaa8e
commit fdc21582db

View File

@ -268,6 +268,10 @@ static bool WeaveModule(ModuleDefinition moduleDefinition)
watch.Stop();
Console.WriteLine("Weave behaviours and messages took" + watch.ElapsedMilliseconds + " milliseconds");
if (modified)
PropertySiteProcessor.Process(moduleDefinition);
return modified;
}
catch (Exception ex)
@ -312,22 +316,6 @@ static bool Weave(string assName, IEnumerable<string> dependencies, string unity
if (modified)
{
// this must be done for ALL code, not just NetworkBehaviours
try
{
PropertySiteProcessor.Process(moduleDefinition);
}
catch (Exception e)
{
Log.Error("ProcessPropertySites exception: " + e);
return false;
}
if (WeavingFailed)
{
return false;
}
// write to outputDir if specified, otherwise perform in-place write
WriterParameters writeParams = new WriterParameters { WriteSymbols = true };
CurrentAssembly.Write(writeParams);