public static IRedactor UseSanitizer <T>(this RedactorProcess obj, ISanitizerOptions options) where T : ISanitizer { obj.SanitizerType = typeof(T); obj.SanitizerOptions = options; return(obj); }
public static IRedactor UseMatcher <T>(this RedactorProcess obj) where T : IMatcher { obj.Matcher = Activator.CreateInstance <T>(); obj.MatcherType = typeof(T); return(obj); }
public static IRedactor UseValidator <T>(this RedactorProcess obj) where T : IValidator { obj.Validator = Activator.CreateInstance <T>(); obj.ValidatorType = typeof(T); return(obj); }
public static IRedactor UseExpressionMatcher <T>(this RedactorProcess obj, string expression) where T : IExpressionMatcher { obj.Matcher = Activator.CreateInstance <T>(); obj.MatcherType = typeof(T); (obj.Matcher as IExpressionMatcher).Expression = expression; return(obj); }
public static IRedactor UseMatchProcessor <T>(this RedactorProcess obj, IRedactorOptions options) where T : IMatchProcessor { obj.MatchProcessorType = typeof(T); obj.MatchProcessor = Activator.CreateInstance <T>(); obj.MatchProcessor.Configure(options); return(obj); }
public static IRedactor UseSanitizer <T>(this RedactorProcess obj) where T : ISanitizer { obj.SanitizerType = typeof(T); return(obj); }