String interpolation in SyncVarAccessReplacer

This commit is contained in:
MrGadget1024 2021-09-20 08:15:46 -04:00
parent 9cab21921f
commit 4c60de6680

View File

@ -47,7 +47,7 @@ static void ProcessClass(SyncVarAccessLists syncVarAccessLists, TypeDefinition t
static void ProcessMethod(SyncVarAccessLists syncVarAccessLists, MethodDefinition md)
{
// process all references to replaced members with properties
//Weaver.DLog(td, " ProcessSiteMethod " + md);
//Log.Warning($" ProcessSiteMethod {md}");
// skip static constructor, "MirrorProcessed", "InvokeUserCode_"
if (md.Name == ".cctor" ||
@ -110,10 +110,10 @@ static void ProcessSetInstruction(SyncVarAccessLists syncVarAccessLists, MethodD
if (syncVarAccessLists.replacementSetterProperties.TryGetValue(opField, out MethodDefinition replacement))
{
//replace with property
//DLog(td, " replacing " + md.Name + ":" + i);
//Log.Warning($" replacing {md.Name}:{i}", opField);
i.OpCode = OpCodes.Call;
i.Operand = replacement;
//DLog(td, " replaced " + md.Name + ":" + i);
//Log.Warning($" replaced {md.Name}:{i}", opField);
}
}
@ -128,10 +128,10 @@ static void ProcessGetInstruction(SyncVarAccessLists syncVarAccessLists, MethodD
if (syncVarAccessLists.replacementGetterProperties.TryGetValue(opField, out MethodDefinition replacement))
{
//replace with property
//DLog(td, " replacing " + md.Name + ":" + i);
//Log.Warning($" replacing {md.Name}:{i}");
i.OpCode = OpCodes.Call;
i.Operand = replacement;
//DLog(td, " replaced " + md.Name + ":" + i);
//Log.Warning($" replaced {md.Name}:{i}");
}
}