Esempio n. 1
0
 public void Patch()
 {
     lock (locker)
     {
         var patchInfo = HarmonySharedState.GetPatchInfo(original);
         if (patchInfo == null)
         {
             patchInfo = new PatchInfo();
         }
         PatchFunctions.AddPrefix(patchInfo, instance.Id, prefix);
         PatchFunctions.AddPostfix(patchInfo, instance.Id, postfix);
         PatchFunctions.AddInfix(patchInfo, instance.Id, infix);
         PatchFunctions.UpdateWrapper(original, patchInfo);
         HarmonySharedState.UpdatePatchInfo(original, patchInfo);
     }
 }