public RegexReplaceConverterHook( string regexPattern, string regexReplace, ConverterHookType type, bool ignoreCase = true, bool multiline = true) { if (regexPattern == null) { throw new ArgumentNullException("regexPattern"); } if (regexReplace == null) { throw new ArgumentNullException("regexReplace"); } this.RegexPattern = regexPattern; this.RegexReplace = regexReplace; this.Type = type; this.IgnoreCase = ignoreCase; this.Multiline = multiline; var regexOptions = this.GetRegexOptions(); this.regex = new Regex(this.RegexPattern, regexOptions); this.RegexFlags = string.Format("g{0}{1}", this.IgnoreCase ? "i" : null, this.Multiline ? "m" : null); }
public RegexReplaceConverterHook(ConverterHookType type, RegexReplaceRule rule) { if (rule == null) { throw new ArgumentNullException("rule"); } this.Type = type; this.Rule = rule; }
public RegexReplaceConverterHook( ConverterHookType type, string regexPattern, string regexReplace = null, IEnumerable<RegexReplaceRule> innerRules = null, bool ignoreCase = true, bool multiline = true, Func<string, string> applyFactory = null, string javaScriptApply = null) : this(type, BuildRegexReplaceRule( regexPattern, regexReplace, innerRules, ignoreCase, multiline, applyFactory, javaScriptApply)) { }
public ServerSideConverterHook(ConverterHookType type, Func<string, string> applyFactory = null) { this.applyFactory = applyFactory; this.Type = type; }
public ServerSideConverterHook(ConverterHookType type, Func <string, string> applyFactory = null) { this.Type = type; this.applyFactory = applyFactory; }