File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using Microsoft . Windows . PowerShell . ScriptAnalyzer . Extensions ;
25
36namespace Microsoft . Windows . PowerShell . ScriptAnalyzer
47{
@@ -35,6 +38,7 @@ public class TextEdit : Range
3538 /// </summary>
3639 public string Text { get ; }
3740
41+ public string [ ] Lines { get ; }
3842 /// <summary>
3943 /// Constructs a TextEdit object.
4044 /// </summary>
@@ -56,6 +60,22 @@ public TextEdit(
5660 // be some information to encode the indentation level. Let the client decide the
5761 // new line characters to insert between each line and the indentation type (space or tab)
5862 Text = newText ;
63+ Lines = Text . GetLines ( ) . ToArray ( ) ;
5964 }
65+
66+ public TextEdit (
67+ int startLineNumber ,
68+ int startColumnNumber ,
69+ int endLineNumber ,
70+ int endColumnNumber ,
71+ IEnumerable < String > lines )
72+ : base ( startLineNumber , startColumnNumber , endLineNumber , endColumnNumber )
73+ {
74+ // TODO check arguments
75+ Lines = lines . ToArray ( ) ;
76+ Text = String . Join ( Environment . NewLine , Lines ) ;
77+ }
78+
79+
6080 }
6181}
You can’t perform that action at this time.
0 commit comments