Skip to content

Commit 2f50051

Browse files
author
Kapil Borle
committed
Convert Range type to class from struct
1 parent 7c3ebf8 commit 2f50051

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/PowerShellEditorServices.Protocol/LanguageServer/Hover.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class Hover
2323
{
2424
public MarkedString[] Contents { get; set; }
2525

26-
public Range? Range { get; set; }
26+
public Range Range { get; set; }
2727
}
2828

2929
public class HoverRequest

src/PowerShellEditorServices.Protocol/LanguageServer/TextDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public class TextDocumentChangeEvent
237237
/// Gets or sets the Range where the document was changed. Will
238238
/// be null if the server's TextDocumentSyncKind is Full.
239239
/// </summary>
240-
public Range? Range { get; set; }
240+
public Range Range { get; set; }
241241

242242
/// <summary>
243243
/// Gets or sets the length of the Range being replaced in the
@@ -267,7 +267,7 @@ public class Position
267267
}
268268

269269
[DebuggerDisplay("Start = {Start.Line}:{Start.Character}, End = {End.Line}:{End.Character}")]
270-
public struct Range
270+
public class Range
271271
{
272272
/// <summary>
273273
/// Gets or sets the starting position of the range.

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ protected Task HandleDidChangeTextDocumentNotification(
538538

539539
changedFile.ApplyChange(
540540
GetFileChangeDetails(
541-
textChange.Range.Value,
541+
textChange.Range,
542542
textChange.Text));
543543

544544
changedFiles.Add(changedFile);
@@ -870,7 +870,7 @@ await editorSession
870870
textDocumentPositionParams.Position.Character + 1);
871871

872872
List<MarkedString> symbolInfo = new List<MarkedString>();
873-
Range? symbolRange = null;
873+
Range symbolRange = null;
874874

875875
if (symbolDetails != null)
876876
{

0 commit comments

Comments
 (0)