File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ export class RazorDocumentManager implements IRazorDocumentManager {
302
302
// vscode.workspace.openTextDocument may send a textDocument/didOpen
303
303
// request to the C# language server. We need to keep track of
304
304
// this to make sure we don't send a duplicate request later on.
305
- const razorUri = vscode . Uri . parse ( ' file:' + document . path , true ) ;
305
+ const razorUri = vscode . Uri . file ( document . path ) ;
306
306
if ( ! this . isRazorDocumentOpenInCSharpWorkspace ( razorUri ) ) {
307
307
this . didOpenRazorCSharpDocument ( razorUri ) ;
308
308
Original file line number Diff line number Diff line change @@ -40,13 +40,13 @@ export class DynamicFileInfoHandler {
40
40
const uris = request . razorFiles ;
41
41
const virtualUris = new Array < DocumentUri | null > ( ) ;
42
42
try {
43
- for ( const razorDocumentUri of uris ) {
44
- const vscodeUri = vscode . Uri . parse ( ' file:' + razorDocumentUri , true ) ;
43
+ for ( const razorDocumentPath of uris ) {
44
+ const vscodeUri = vscode . Uri . file ( razorDocumentPath ) ;
45
45
const razorDocument = await this . documentManager . getDocument ( vscodeUri ) ;
46
46
if ( razorDocument === undefined ) {
47
47
virtualUris . push ( null ) ;
48
48
this . logger . logWarning (
49
- `Could not find Razor document ${ razorDocumentUri } ; adding null as a placeholder in URI array.`
49
+ `Could not find Razor document ${ razorDocumentPath } ; adding null as a placeholder in URI array.`
50
50
) ;
51
51
} else {
52
52
// Retrieve generated doc URIs for each Razor URI we are given
@@ -70,8 +70,8 @@ export class DynamicFileInfoHandler {
70
70
private async removeDynamicFileInfo ( request : RemoveDynamicFileParams ) {
71
71
try {
72
72
const uris = request . razorFiles ;
73
- for ( const razorDocumentUri of uris ) {
74
- const vscodeUri = vscode . Uri . parse ( ' file:' + razorDocumentUri , true ) ;
73
+ for ( const razorDocumentPath of uris ) {
74
+ const vscodeUri = vscode . Uri . file ( razorDocumentPath ) ;
75
75
if ( this . documentManager . isRazorDocumentOpenInCSharpWorkspace ( vscodeUri ) ) {
76
76
this . documentManager . didCloseRazorCSharpDocument ( vscodeUri ) ;
77
77
}
You can’t perform that action at this time.
0 commit comments