File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public ExecuteCommandRegistrationOptions() : this(null)
46
46
{
47
47
}
48
48
49
- public ExecuteCommandRegistrationOptions ( ICollection < string > commands )
49
+ public ExecuteCommandRegistrationOptions ( IEnumerable < string > commands )
50
50
{
51
51
Commands = commands ;
52
52
}
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ public ExecuteCommandOptions()
259
259
260
260
}
261
261
262
- public ExecuteCommandOptions ( IList < string > commands )
262
+ public ExecuteCommandOptions ( IEnumerable < string > commands )
263
263
{
264
264
Commands = commands ;
265
265
}
@@ -268,7 +268,7 @@ public ExecuteCommandOptions(IList<string> commands)
268
268
/// Document links have a resolve provider as well.
269
269
/// </summary>
270
270
[ JsonProperty ]
271
- public IList < string > Commands { get ; set ; }
271
+ public IEnumerable < string > Commands { get ; set ; }
272
272
}
273
273
274
274
/// <summary>
Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ protected virtual void OnLoad(TextDocumentItem doc)
75
75
/// </summary>
76
76
public abstract TextDocument ApplyChanges ( IList < TextDocumentContentChangeEvent > changes ) ;
77
77
78
+ /// <summary>
79
+ /// Gets a part of the content by the specified line/column-based range.
80
+ /// </summary>
81
+ public virtual string GetRange ( Range range )
82
+ {
83
+ var start = OffsetAt ( range . Start ) ;
84
+ return GetRange ( start , OffsetAt ( range . End ) - start ) ;
85
+ }
86
+
78
87
/// <summary>
79
88
/// Gets a part of the content by the specified offset range.
80
89
/// </summary>
You can’t perform that action at this time.
0 commit comments