public ConditionalCustomPostRewriter(IRewriteContent preRewriter, Predicate <Uri> sourceUrlCondition, string valueToBeReplaced, string valueToReplaceWith)
     : this(preRewriter, sourceUrlCondition, new Regex(Regex.Escape(valueToBeReplaced ?? "")), valueToReplaceWith)
 {
     if (valueToBeReplaced == null)
     {
         throw new ArgumentNullException("valueToBeReplaced");
     }
 }
        public ConditionalCustomPostRewriter(IRewriteContent preRewriter, Predicate <Uri> sourceUrlCondition, Regex toBeReplaced, string valueToReplaceWith)
        {
            if (preRewriter == null)
            {
                throw new ArgumentNullException("preRewriter");
            }
            if (sourceUrlCondition == null)
            {
                throw new ArgumentNullException("sourceUrlCondition");
            }
            if (toBeReplaced == null)
            {
                throw new ArgumentNullException("toBeReplaced");
            }
            if (valueToReplaceWith == null)
            {
                throw new ArgumentNullException("valueToReplaceWith");
            }

            _preRewriter        = preRewriter;
            _sourceUrlCondition = sourceUrlCondition;
            ToBeReplaced        = toBeReplaced;
            ValueToReplaceWith  = valueToReplaceWith;
        }