/// <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); }
public TextStencil() { //_predefined = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase); _replacer = new TextPatternReplacer(false, true, false); _replacer.GetValue = this.GetKeyVal; }