void ApplySettings(IDnlibDef def, Rules rules, IEnumerable <ProtectionSettingsInfo> infos, ProtectionSettings settings = null) { if (settings == null) { settings = new ProtectionSettings(); } else { settings = new ProtectionSettings(settings); } ApplyRules(context, def, rules, settings); settings = ProtectionParameters.GetParameters(context, def); ProtectionSettingsInfo?last = null; var parser = new ObfAttrParser(protections); foreach (var info in infos) { if (info.Exclude) { if (info.ApplyToMember) { settings.Clear(); } continue; } last = info; if (info.ApplyToMember && !string.IsNullOrEmpty(info.Settings)) { parser.ParseProtectionString(settings, info.Settings); } } if (last != null && !last.Value.ApplyToMember && !string.IsNullOrEmpty(last.Value.Settings)) { parser.ParseProtectionString(settings, last.Value.Settings); } }
// Token: 0x060001B4 RID: 436 RVA: 0x0000E008 File Offset: 0x0000C208 private void ApplySettings(IDnlibDef def, Dictionary <Rule, PatternExpression> rules, IEnumerable <ObfAttrMarker.ProtectionSettingsInfo> infos, ProtectionSettings settings = null) { if (settings == null) { settings = new ProtectionSettings(); } else { settings = new ProtectionSettings(settings); } base.ApplyRules(this.context, def, rules, settings); settings = ProtectionParameters.GetParameters(this.context, def); ObfAttrMarker.ProtectionSettingsInfo?last = null; ObfAttrParser parser = new ObfAttrParser(this.protections); foreach (ObfAttrMarker.ProtectionSettingsInfo info in infos) { if (info.Exclude) { if (info.ApplyToMember) { settings.Clear(); } } else { last = new ObfAttrMarker.ProtectionSettingsInfo?(info); if (info.ApplyToMember && !string.IsNullOrEmpty(info.Settings)) { parser.ParseProtectionString(settings, info.Settings); } } } if (last.HasValue && !last.Value.ApplyToMember && !string.IsNullOrEmpty(last.Value.Settings)) { parser.ParseProtectionString(settings, last.Value.Settings); } }
public ProtectionSettingsStack(ProtectionSettingsStack copy) { context = copy.context; stack = new Stack <Tuple <ProtectionSettings, ProtectionSettingsInfo[]> >(copy.stack); parser = copy.parser; }
public ProtectionSettingsStack(ConfuserContext context, Dictionary <string, Protection> protections) { this.context = context; stack = new Stack <Tuple <ProtectionSettings, ProtectionSettingsInfo[]> >(); parser = new ObfAttrParser(protections); }
public ProtectionSettingsStack(ProtectionSettingsStack copy) { context = copy.context; stack = new Stack<Tuple<ProtectionSettings, ProtectionSettingsInfo[]>>(copy.stack); parser = copy.parser; }
public ProtectionSettingsStack(ConfuserContext context, Dictionary<string, Protection> protections) { this.context = context; stack = new Stack<Tuple<ProtectionSettings, ProtectionSettingsInfo[]>>(); parser = new ObfAttrParser(protections); }
void ApplySettings(IDnlibDef def, Rules rules, IEnumerable<ProtectionSettingsInfo> infos, ProtectionSettings settings = null) { if (settings == null) settings = new ProtectionSettings(); else settings = new ProtectionSettings(settings); ApplyRules(context, def, rules, settings); settings = ProtectionParameters.GetParameters(context, def); ProtectionSettingsInfo? last = null; var parser = new ObfAttrParser(protections); foreach (var info in infos) { if (info.Exclude) { if (info.ApplyToMember) settings.Clear(); continue; } last = info; if (info.ApplyToMember && !string.IsNullOrEmpty(info.Settings)) { parser.ParseProtectionString(settings, info.Settings); } } if (last != null && !last.Value.ApplyToMember && !string.IsNullOrEmpty(last.Value.Settings)) { parser.ParseProtectionString(settings, last.Value.Settings); } }