Example #1
0
        private static void PatchTypes(Collection <TypeDefinition> types)
        {
            int count = 0;

            foreach (TypeDefinition type in types)
            {
                TypePatch patch = Patches.FindBySource(type.FullName);
                if (patch == null)
                {
                    continue;
                }

                PatchType(type, patch);
                if (++count >= Patches.Count)
                {
                    break;
                }
            }
        }
Example #2
0
 private static void PatchType(TypeDefinition type, TypePatch patch)
 {
     PatchMethods(type.Methods, patch.GetMethodPatches());
 }