protected override IEnumerable <IChangeInstruction> GetReplacementInstructions(XmlElement replacementsNode) { foreach (var replacementNode in replacementsNode.OfType <XmlElement>()) { var bestMatch = GetMatch(replacementNode); if (bestMatch != null) { var instruction = new TextChangeInstruction("$({0})".FormatWith(replacementNode.Name), _history.ReplaceFromHistory(bestMatch.Value)); _history.AddInstruction(instruction); yield return(instruction); } } }
public StringReplaceTextFileChanger(TextChangeInstruction instruction) { _instruction = instruction; }
public void AddInstruction(TextChangeInstruction instruction) { _history.Add(instruction); }