/// <summary> /// 添加白名单规则,符合正则表达式匹配的用户名都被加入白名单 /// </summary> /// <param name="ruleRegexExpr">正则表达式</param> /// <returns></returns> public int AddWhiteListRuleRegex(string ruleRegexExpr) { Rule rule = CreateRule(ruleRegexExpr, GenRuleId()); WhitelistRules.Add(rule); return(rule.RuleID); }
private int AddWhiteListRuleRegex(string ruleRegexExpr, int id) { WhitelistRules.Add(CreateRule(ruleRegexExpr, id)); return(id); }