Esempio n. 1
0
        private void MarkAsGenerated(TypeDefinition typeDefinition)
        {
            // if in this module, then mark as generated
            if (typeDefinition.Module != module)
            {
                return;
            }

            // dont add twice
            if (typeDefinition.HasCustomAttribute(GeneratedAttribute))
            {
                return;
            }

            typeDefinition.AddCustomAttribute(module, GeneratedAttribute);
        }
Esempio n. 2
0
 internal static void AddPatchedByTypeAttribute(this TypeDefinition targetType, TypeDefinition yourType)
 {
     //calling PatchedByTypeAttribute(object patchType, object actionAttributeType);
     targetType.AddCustomAttribute(targetType.Module, typeof(PatchedByTypeAttribute), yourType.FullName);
 }