@@ -51,7 +51,7 @@ public TextDocumentHandler(
51
51
52
52
public Task < Unit > Handle ( DidChangeTextDocumentParams notification , CancellationToken token )
53
53
{
54
- ScriptFile changedFile = _workspaceService . GetFile ( notification . TextDocument . Uri . ToString ( ) ) ;
54
+ ScriptFile changedFile = _workspaceService . GetFile ( notification . TextDocument . Uri ) ;
55
55
56
56
// A text change notification can batch multiple change requests
57
57
foreach ( TextDocumentContentChangeEvent textChange in notification . ContentChanges )
@@ -85,7 +85,7 @@ public Task<Unit> Handle(DidOpenTextDocumentParams notification, CancellationTok
85
85
{
86
86
ScriptFile openedFile =
87
87
_workspaceService . GetFileBuffer (
88
- notification . TextDocument . Uri . ToString ( ) ,
88
+ notification . TextDocument . Uri ,
89
89
notification . TextDocument . Text ) ;
90
90
91
91
// TODO: Get all recently edited files in the workspace
@@ -106,7 +106,7 @@ TextDocumentRegistrationOptions IRegistration<TextDocumentRegistrationOptions>.G
106
106
public Task < Unit > Handle ( DidCloseTextDocumentParams notification , CancellationToken token )
107
107
{
108
108
// Find and close the file in the current session
109
- var fileToClose = _workspaceService . GetFile ( notification . TextDocument . Uri . ToString ( ) ) ;
109
+ var fileToClose = _workspaceService . GetFile ( notification . TextDocument . Uri ) ;
110
110
111
111
if ( fileToClose != null )
112
112
{
@@ -120,9 +120,7 @@ public Task<Unit> Handle(DidCloseTextDocumentParams notification, CancellationTo
120
120
121
121
public async Task < Unit > Handle ( DidSaveTextDocumentParams notification , CancellationToken token )
122
122
{
123
- ScriptFile savedFile =
124
- _workspaceService . GetFile (
125
- notification . TextDocument . Uri . ToString ( ) ) ;
123
+ ScriptFile savedFile = _workspaceService . GetFile ( notification . TextDocument . Uri ) ;
126
124
127
125
if ( savedFile != null )
128
126
{
0 commit comments