void ProcessMember(IDnlibDef member, Rules rules, ProtectionSettingsStack stack) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(member))); ApplySettings(member, rules, stack.GetInfos()); ProcessBody(member as MethodDef, rules, stack); stack.Pop(); }
void ProcessTypeMembers(TypeDef type, ProtectionSettingsStack stack) { foreach (var nestedType in type.NestedTypes) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(nestedType))); ApplySettings(nestedType, stack.GetInfos()); ProcessTypeMembers(nestedType, stack); stack.Pop(); } foreach (var prop in type.Properties) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(prop))); ApplySettings(prop, stack.GetInfos()); if (prop.GetMethod != null) { ProcessMember(prop.GetMethod, stack); } if (prop.SetMethod != null) { ProcessMember(prop.SetMethod, stack); } foreach (var m in prop.OtherMethods) ProcessMember(m, stack); stack.Pop(); } foreach (var evt in type.Events) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(evt))); ApplySettings(evt, stack.GetInfos()); if (evt.AddMethod != null) { ProcessMember(evt.AddMethod, stack); } if (evt.RemoveMethod != null) { ProcessMember(evt.RemoveMethod, stack); } if (evt.InvokeMethod != null) { ProcessMember(evt.InvokeMethod, stack); } foreach (var m in evt.OtherMethods) ProcessMember(m, stack); stack.Pop(); } foreach (var method in type.Methods) { if (method.SemanticsAttributes == 0) ProcessMember(method, stack); } foreach (var field in type.Fields) { ProcessMember(field, stack); } }
void ProcessMember(IDnlibDef member, ProtectionSettingsStack stack) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(member))); ApplySettings(member, stack.GetInfos()); stack.Pop(); }
public void Dispose() { parent.Pop(); }
void ProcessTypeMembers(TypeDef type, Rules rules, ProtectionSettingsStack stack) { foreach (var nestedType in type.NestedTypes) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(nestedType))); ApplySettings(nestedType, rules, stack.GetInfos()); ProcessTypeMembers(nestedType, rules, stack); stack.Pop(); } foreach (var prop in type.Properties) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(prop))); ApplySettings(prop, rules, stack.GetInfos()); if (prop.GetMethod != null) { ProcessMember(prop.GetMethod, rules, stack); } if (prop.SetMethod != null) { ProcessMember(prop.SetMethod, rules, stack); } foreach (var m in prop.OtherMethods) { ProcessMember(m, rules, stack); } stack.Pop(); } foreach (var evt in type.Events) { stack.Push(ProcessAttributes(ReadObfuscationAttributes(evt))); ApplySettings(evt, rules, stack.GetInfos()); if (evt.AddMethod != null) { ProcessMember(evt.AddMethod, rules, stack); } if (evt.RemoveMethod != null) { ProcessMember(evt.RemoveMethod, rules, stack); } if (evt.InvokeMethod != null) { ProcessMember(evt.InvokeMethod, rules, stack); } foreach (var m in evt.OtherMethods) { ProcessMember(m, rules, stack); } stack.Pop(); } foreach (var method in type.Methods) { if (method.SemanticsAttributes == 0) { ProcessMember(method, rules, stack); } } foreach (var field in type.Fields) { ProcessMember(field, rules, stack); } }