/// <summary>
 /// Replaces a range of text with new text attempting only modifying lines which changed
 /// and doing so in a single edit.
 /// </summary>
 public static AP.ChangeInfo[] ReplaceByLines(this string oldCode, string newCode, string newLine = "\r\n")
 {
     return(LinePreservingCodeReplacer.Replace(oldCode, newCode, newLine));
 }
Beispiel #2
0
 /// <summary>
 /// Replaces a range of text with new text attempting only modifying lines which changed
 /// and doing so in a single edit.
 /// </summary>
 public static IReadOnlyList <DocumentChange> ReplaceByLines(this string oldCode, int startLine, string newCode, string newLine = "\r\n")
 {
     return(LinePreservingCodeReplacer.Replace(startLine, oldCode, newCode, newLine));
 }