// Token: 0x060001BA RID: 442 RVA: 0x0000E898 File Offset: 0x0000CA98 private void ProcessModule(ModuleDefMD module, Dictionary <Rule, PatternExpression> rules, string snKeyPath, string snKeyPass, List <ObfAttrMarker.ObfuscationAttributeInfo> settingAttrs, Dictionary <Regex, List <ObfAttrMarker.ObfuscationAttributeInfo> > namespaceAttrs) { this.context.Annotations.Set <StrongNameKey>(module, Marker.SNKey, Marker.LoadSNKey(this.context, (snKeyPath == null) ? null : Path.Combine(this.project.BaseDirectory, snKeyPath), snKeyPass)); ObfAttrMarker.ProtectionSettingsStack moduleStack = new ObfAttrMarker.ProtectionSettingsStack(); moduleStack.Push(this.ProcessAttributes(settingAttrs)); this.ApplySettings(module, rules, moduleStack.GetInfos(), null); Dictionary <Regex, ObfAttrMarker.ProtectionSettingsStack> nsSettings = namespaceAttrs.ToDictionary((KeyValuePair <Regex, List <ObfAttrMarker.ObfuscationAttributeInfo> > kvp) => kvp.Key, delegate(KeyValuePair <Regex, List <ObfAttrMarker.ObfuscationAttributeInfo> > kvp) { ObfAttrMarker.ProtectionSettingsStack nsStack = new ObfAttrMarker.ProtectionSettingsStack(moduleStack); nsStack.Push(this.ProcessAttributes(kvp.Value)); return(nsStack); }); foreach (TypeDef type in module.Types) { ObfAttrMarker.ProtectionSettingsStack typeStack = ObfAttrMarker.MatchNamespace(nsSettings, type.Namespace) ?? moduleStack; typeStack.Push(this.ProcessAttributes(ObfAttrMarker.ReadObfuscationAttributes(type))); this.ApplySettings(type, rules, typeStack.GetInfos(), null); this.ProcessTypeMembers(type, rules, typeStack); typeStack.Pop(); } }
// Token: 0x060001BC RID: 444 RVA: 0x0000ECB0 File Offset: 0x0000CEB0 private void ProcessMember(IDnlibDef member, Dictionary <Rule, PatternExpression> rules, ObfAttrMarker.ProtectionSettingsStack stack) { stack.Push(this.ProcessAttributes(ObfAttrMarker.ReadObfuscationAttributes(member))); this.ApplySettings(member, rules, stack.GetInfos(), null); stack.Pop(); }
// Token: 0x060001BB RID: 443 RVA: 0x0000E9DC File Offset: 0x0000CBDC private void ProcessTypeMembers(TypeDef type, Dictionary <Rule, PatternExpression> rules, ObfAttrMarker.ProtectionSettingsStack stack) { foreach (TypeDef nestedType in type.NestedTypes) { stack.Push(this.ProcessAttributes(ObfAttrMarker.ReadObfuscationAttributes(nestedType))); this.ApplySettings(nestedType, rules, stack.GetInfos(), null); this.ProcessTypeMembers(nestedType, rules, stack); stack.Pop(); } foreach (PropertyDef prop in type.Properties) { stack.Push(this.ProcessAttributes(ObfAttrMarker.ReadObfuscationAttributes(prop))); this.ApplySettings(prop, rules, stack.GetInfos(), null); if (prop.GetMethod != null) { this.ProcessMember(prop.GetMethod, rules, stack); } if (prop.SetMethod != null) { this.ProcessMember(prop.SetMethod, rules, stack); } foreach (MethodDef i in prop.OtherMethods) { this.ProcessMember(i, rules, stack); } stack.Pop(); } foreach (EventDef evt in type.Events) { stack.Push(this.ProcessAttributes(ObfAttrMarker.ReadObfuscationAttributes(evt))); this.ApplySettings(evt, rules, stack.GetInfos(), null); if (evt.AddMethod != null) { this.ProcessMember(evt.AddMethod, rules, stack); } if (evt.RemoveMethod != null) { this.ProcessMember(evt.RemoveMethod, rules, stack); } if (evt.InvokeMethod != null) { this.ProcessMember(evt.InvokeMethod, rules, stack); } foreach (MethodDef j in evt.OtherMethods) { this.ProcessMember(j, rules, stack); } stack.Pop(); } foreach (MethodDef method in type.Methods) { if (method.SemanticsAttributes == MethodSemanticsAttributes.None) { this.ProcessMember(method, rules, stack); } } foreach (FieldDef field in type.Fields) { this.ProcessMember(field, rules, stack); } }