示例#1
0
        /// <summary>
        /// Clones this instance.
        /// </summary>
        /// <returns></returns>
        public TextPatternReplacer Clone()
        {
            TextPatternReplacer result = new TextPatternReplacer(this.Pattern, this.GetValue, this.IsRecursive, this.IsCaching, this.IsCaseSensitive)
            {
                Cache = this.Cache
            };

            if (this._worker != null)
            {
                result.Worker = new Regex(this.Pattern, this.Worker.Options);
            }
            return(result);
        }
示例#2
0
 public TextStencil()
 {
     //_predefined = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
     _replacer          = new TextPatternReplacer(false, true, false);
     _replacer.GetValue = this.GetKeyVal;
 }