protected void RemoveSecurityAttributes () { foreach (TypeDefinition type in _assembly.MainModule.Types) { RemoveSecurityAttributes (type); if (type.HasMethods) foreach (MethodDefinition method in type.Methods) RemoveSecurityAttributes (method); } }