Exemplo n.º 1
0
        public HtmlTypographerSettings Replace(string pattern, string replacement,
                                               StringReplacementMode mode, RegexOptions options)
        {
            StringReplacementRule rule = new StringReplacementRule(mode, pattern, replacement);

            rule.Options = options;

            Replacements.Add(rule);
            return(this);
        }
        public StringReplacementRule(StringReplacementMode mode,
            string pattern, string replacement)
        {
            Precondition.Defined(pattern, () => Error.ArgumentNull("pattern"));

            _mode = mode;
            _pattern = pattern;
            _replacement = replacement;
            _options = RegexOptions.IgnoreCase | RegexOptions.Multiline |
                RegexOptions.Singleline;
        }
Exemplo n.º 3
0
        public StringReplacementRule(StringReplacementMode mode,
                                     string pattern, string replacement)
        {
            Precondition.Defined(pattern, () => Error.ArgumentNull("pattern"));

            _mode        = mode;
            _pattern     = pattern;
            _replacement = replacement;
            _options     = RegexOptions.IgnoreCase | RegexOptions.Multiline |
                           RegexOptions.Singleline;
        }
		public HtmlTypographerSettings Replace(string pattern, string replacement,
			StringReplacementMode mode, RegexOptions options)
		{
			StringReplacementRule rule = new StringReplacementRule(mode, pattern, replacement);
			rule.Options = options;
			
			Replacements.Add(rule);
			return this;
		}
		public HtmlTypographerSettings Replace(string pattern, string replacement,
			StringReplacementMode mode)
		{
			return Replace(pattern, replacement, mode, RegexOptions.None);
		}
Exemplo n.º 6
0
 public HtmlTypographerSettings Replace(string pattern, string replacement,
                                        StringReplacementMode mode)
 {
     return(Replace(pattern, replacement, mode, RegexOptions.None));
 }