Skip to content

Commit 8d584b4

Browse files
PR feedback
1 parent 51bcbed commit 8d584b4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorDocumentSynchronizationEndpoint.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public async Task<Unit> Handle(DidChangeTextDocumentParams notification, Cancell
8080
var sourceText = await document.GetTextAsync();
8181
sourceText = ApplyContentChanges(notification.ContentChanges, sourceText);
8282

83-
if(notification.TextDocument.Version is null)
83+
if (notification.TextDocument.Version is null)
8484
{
85-
throw new NotImplementedException("Provided version should not be null.");
85+
throw new InvalidOperationException("Provided version should not be null.");
8686
}
8787

8888
await Task.Factory.StartNew(
@@ -102,7 +102,7 @@ public async Task<Unit> Handle(DidOpenTextDocumentParams notification, Cancellat
102102

103103
if (notification.TextDocument.Version is null)
104104
{
105-
throw new NotImplementedException("Provided version should not be null.");
105+
throw new InvalidOperationException("Provided version should not be null.");
106106
}
107107

108108
await Task.Factory.StartNew(

src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/DefaultLSPDocument.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public override LSPDocumentSnapshot CurrentSnapshot
5757
}
5858
}
5959

60-
[Obsolete]
60+
[Obsolete("Use the int overload instead")]
6161
public override LSPDocumentSnapshot UpdateVirtualDocument<TVirtualDocument>(IReadOnlyList<ITextChange> changes, long hostDocumentVersion)
6262
{
6363
return UpdateVirtualDocument<TVirtualDocument>(changes, (int)hostDocumentVersion);

src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/LSPDocument.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public abstract class LSPDocument : IDisposable
1919

2020
public abstract IReadOnlyList<VirtualDocument> VirtualDocuments { get; }
2121

22-
[Obsolete]
22+
[Obsolete("Use the int overload instead")]
2323
public abstract LSPDocumentSnapshot UpdateVirtualDocument<TVirtualDocument>(IReadOnlyList<ITextChange> changes, long hostDocumentVersion) where TVirtualDocument : VirtualDocument;
2424

2525
public abstract LSPDocumentSnapshot UpdateVirtualDocument<TVirtualDocument>(IReadOnlyList<ITextChange> changes, int hostDocumentVersion) where TVirtualDocument : VirtualDocument;

0 commit comments

Comments
 (0)