19 writes to DocumentUri
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Extensions\ProtocolConversions.cs (3)
382DocumentUri = location.DocumentUri, 501DocumentUri = uri, 531DocumentUri = documentUri,
Extensions\ProtocolConversions.Diagnostics.cs (1)
95DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(l.UnmappedFileSpan.Path)
Handler\Definitions\AbstractGoToDefinitionHandler.cs (1)
91DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(declarationFile.FilePath!),
Handler\References\FindUsagesLSPContext.cs (1)
285DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(declarationFile.FilePath),
Handler\Symbols\DocumentSymbolsHandler.cs (1)
97DocumentUri = document.GetURI(),
Protocol\Location.cs (1)
35set => DocumentUri = new DocumentUri(value);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Definitions\GoToDefinitionTests.cs (1)
97DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri($"C:\\{TestSpanMapper.GeneratedFileName}"),
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
105DocumentUri = definition.Single().DocumentUri,
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
76var caret = new LSP.Location { Range = new() { Start = new(0, 6), End = new(0, 7) }, DocumentUri = looseFileUri }; 297DocumentUri = looseFileUri,
References\FindImplementationsTests.cs (1)
99DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri($"C:\\{TestSpanMapper.GeneratedFileName}"),
Rename\RenameTests.cs (1)
177DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri($"C:\\{TestSpanMapper.GeneratedFileName}"),
Workspaces\SourceGeneratedDocumentTests.cs (1)
94var location = new LSP.Location { DocumentUri = sourceGeneratorDocumentUri, Range = new LSP.Range { Start = new LSP.Position(0, 6), End = new LSP.Position(0, 6) } };
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Utilities\AbstractLanguageServerClientTests.cs (1)
114DocumentUri = documentUri,
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (3)
135DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(sourceDefinition.FilePath), 147DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(sourceDefinition.FilePath), 185DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(declarationFile.FilePath),
142 references to DocumentUri
IdeBenchmarks (1)
Lsp\LspCompletionSerializationBenchmarks.cs (1)
108TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri),
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Extensions\ProtocolConversions.cs (1)
382DocumentUri = location.DocumentUri,
Handler\MapCode\MapCodeHandler.cs (1)
128if (!location.DocumentUri.Equals(textDocumentIdentifier.DocumentUri))
Handler\References\FindUsagesLSPContext.cs (1)
221DisplayPath = location?.DocumentUri.GetRequiredParsedUri().LocalPath,
Protocol\Location.cs (6)
34get => DocumentUri.GetRequiredParsedUri(); 57return other != null && this.DocumentUri != null && other.DocumentUri != null && 58this.DocumentUri.Equals(other.DocumentUri) && 64hashCode = (hashCode * -1521134295) + this.DocumentUri.GetHashCode();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (129)
CodeActions\CodeActionResolveTests.cs (1)
541DocumentUri = locations.Single().DocumentUri
CodeActions\CodeActionsTests.cs (6)
117TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 158TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 198TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 241TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 289TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 330TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri),
CodeActions\RunCodeActionsTests.cs (1)
41DocumentUri = caretLocation.DocumentUri
Completion\CompletionFeaturesTests.cs (16)
84TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 332await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 358await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 461TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 655TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 762TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 792await testLspServer.OpenDocumentAsync(caret.DocumentUri); 796TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 813await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "i")); 848await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 867await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "s")); 964TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 1033TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 1085await testLspServer.OpenDocumentAsync(caret.DocumentUri); 1089TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri), 1109await testLspServer.InsertTextAsync(caret.DocumentUri, (caret.Range.End.Line, caret.Range.End.Character, "f"));
Completion\CompletionTests.cs (14)
979await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 992await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "a")); 1047await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 1060await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "C")); 1115await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 1129await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "ask")); 1141await testLspServer.DeleteTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, caretLocation.Range.End.Line, caretLocation.Range.End.Character + 3)); 1154await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "i")); 1212await testLspServer.OpenDocumentAsync(firstCaret.DocumentUri); 1339await testLspServer.OpenDocumentAsync(firstCaretLocation.DocumentUri); 1355await testLspServer.InsertTextAsync(secondCaretLocation.DocumentUri, (secondCaretLocation.Range.End.Line, secondCaretLocation.Range.End.Character, "S")); 1370await testLspServer.InsertTextAsync(firstCaretLocation.DocumentUri, (firstCaretLocation.Range.End.Line, firstCaretLocation.Range.End.Character, "a")); 1459await testLspServer.OpenDocumentAsync(caretLocation.DocumentUri); 1472await testLspServer.InsertTextAsync(caretLocation.DocumentUri, (caretLocation.Range.End.Line, caretLocation.Range.End.Character, "z"));
DataTips\DataTipRangeHandlerTests.cs (1)
24TextDocument = new LSP.TextDocumentIdentifier { DocumentUri = caret.DocumentUri },
Definitions\GoToDefinitionTests.cs (3)
43Assert.True(results.Single().DocumentUri.GetRequiredParsedUri().OriginalString.StartsWith("file")); 312Assert.Equal(SourceGeneratedDocumentUri.Scheme, result.DocumentUri.GetRequiredParsedUri().Scheme); 331Assert.True(results.Single().DocumentUri.GetRequiredParsedUri().OriginalString.EndsWith("String.cs"));
Definitions\GoToTypeDefinitionTests.cs (3)
229Assert.Equal(SourceGeneratedDocumentUri.Scheme, result.DocumentUri.GetRequiredParsedUri().Scheme); 254await testLspServer.OpenDocumentAsync(results.Single().DocumentUri, text: string.Empty).ConfigureAwait(false); 256Assert.Equal(WorkspaceKind.MetadataAsSource, (await GetWorkspaceForDocument(testLspServer, results.Single().DocumentUri)).Kind);
Diagnostics\PullDiagnosticTests.cs (2)
694await testLspServer.ReplaceTextAsync(textLocation.DocumentUri, (textEdit.Range, textEdit.NewText)); 703await testLspServer.ReplaceTextAsync(textLocation.DocumentUri, (textEdit.Range, textEdit.NewText));
DocumentChanges\DocumentChangesTests.cs (25)
39await DidOpen(testLspServer, locationTyped.DocumentUri); 46await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// hi there")); 59await DidClose(testLspServer, locationTyped.DocumentUri); 80await DidOpen(testLspServer, locationTyped.DocumentUri); 104await DidOpen(testLspServer, locationTyped.DocumentUri); 106await Assert.ThrowsAnyAsync<StreamJsonRpc.RemoteRpcException>(() => DidOpen(testLspServer, locationTyped.DocumentUri)); 126await Assert.ThrowsAnyAsync<StreamJsonRpc.RemoteRpcException>(() => DidClose(testLspServer, locationTyped.DocumentUri)); 146await Assert.ThrowsAnyAsync<StreamJsonRpc.RemoteRpcException>(() => DidChange(testLspServer, locationTyped.DocumentUri, (0, 0, "goo"))); 166await DidOpen(testLspServer, locationTyped.DocumentUri); 168await DidClose(testLspServer, locationTyped.DocumentUri); 189await DidOpen(testLspServer, locationTyped.DocumentUri); 191await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// hi there")); 223await DidOpen(testLspServer, locationTyped.DocumentUri); 225await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// hi there")); 227var documentTextFromWorkspace = (await testLspServer.GetDocumentTextAsync(locationTyped.DocumentUri)).ToString(); 260await DidOpen(testLspServer, locationTyped.DocumentUri); 262await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// hi there"), (5, 0, " // this builds on that\r\n")); 295await DidOpen(testLspServer, locationTyped.DocumentUri); 297await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// there"), (4, 11, "hi ")); 329await DidOpen(testLspServer, locationTyped.DocumentUri); 331await DidChange(testLspServer, locationTyped.DocumentUri, (5, 0, " // this builds on that\r\n"), (4, 8, "// hi there")); 407await DidOpen(testLspServer, locationTyped.DocumentUri); 409await DidChange(testLspServer, locationTyped.DocumentUri, (4, 8, "// hi there")); 410await DidChange(testLspServer, locationTyped.DocumentUri, (5, 0, " // this builds on that\r\n")); 432var documentText = await testLspServer.GetDocumentTextAsync(locationTyped.DocumentUri);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (7)
34await DidOpen(testLspServer, caretLocation.DocumentUri); 39var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 46await DidClose(testLspServer, caretLocation.DocumentUri); 78await DidOpen(testLspServer, caretLocation.DocumentUri); 82await DidChange(testLspServer, caretLocation.DocumentUri, (4, 8, "// hi there")); 84var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 99await DidClose(testLspServer, caretLocation.DocumentUri);
DocumentChanges\DocumentChangesTests.WithFindAllReferences.cs (5)
37await DidOpen(testLspServer, locationTyped.DocumentUri); 47await DidChange(testLspServer, locationTyped.DocumentUri, (5, 0, "var i = someInt + 1;\r\n")); 56await DidChange(testLspServer, locationTyped.DocumentUri, (10, 0, "int someInt = A.someInt + 1;\r\n")); 66await DidChange(testLspServer, locationTyped.DocumentUri, (13, 0, "var j = someInt + A.someInt;\r\n")); 82await DidClose(testLspServer, locationTyped.DocumentUri);
Formatting\FormatDocumentOnTypeTests.cs (2)
111var documentText = await testLspServer.GetDocumentTextAsync(locationTyped.DocumentUri); 129TextDocument = CreateTextDocumentIdentifier(locationTyped.DocumentUri),
Formatting\FormatDocumentRangeTests.cs (3)
38var documentText = await testLspServer.GetDocumentTextAsync(rangeToFormat.DocumentUri); 68var documentText = await testLspServer.GetDocumentTextAsync(rangeToFormat.DocumentUri); 102TextDocument = CreateTextDocumentIdentifier(location.DocumentUri),
Formatting\FormatDocumentTests.cs (9)
37var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 70var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 102var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 134var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 166var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 202var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 230var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 255var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri; 281var documentURI = testLspServer.GetLocations("caret").Single().DocumentUri;
InlineCompletions\InlineCompletionsTests.cs (2)
243var document = testLspServer.GetDocumentAsync(locationTyped.DocumentUri); 269TextDocument = CreateTextDocumentIdentifier(locationTyped.DocumentUri),
MapCode\MapCodeTests.cs (1)
81var documentUri = ranges.Single().DocumentUri;
Metadata\LspMetadataAsSourceWorkspaceTests.cs (8)
48await testLspServer.OpenDocumentAsync(definition.Single().DocumentUri, text: string.Empty).ConfigureAwait(false); 50Assert.Equal(WorkspaceKind.MetadataAsSource, (await GetWorkspaceForDocument(testLspServer, definition.Single().DocumentUri)).Kind); 54await testLspServer.CloseDocumentAsync(definition.Single().DocumentUri).ConfigureAwait(false); 56Assert.Equal(WorkspaceKind.MetadataAsSource, (await GetWorkspaceForDocument(testLspServer, definition.Single().DocumentUri)).Kind); 86await testLspServer.OpenDocumentAsync(definition.Single().DocumentUri, text: """ 95var workspaceForDocument = await GetWorkspaceForDocument(testLspServer, definition.Single().DocumentUri); 105DocumentUri = definition.Single().DocumentUri, 118Assert.Contains("String.cs", definitionFromMetadata.Single().DocumentUri.UriString);
OnAutoInsert\OnAutoInsertTests.cs (3)
360var document = await testLspServer.GetDocumentAsync(locationTyped.DocumentUri); 375var documentText = await (await testLspServer.GetDocumentAsync(locationTyped.DocumentUri)).GetTextAsync(); 402TextDocument = CreateTextDocumentIdentifier(locationTyped.DocumentUri),
Ordering\RequestOrderingTests.cs (2)
198await ExecuteDidOpen(testLspServer, testLspServer.GetLocations("caret").First().DocumentUri); 247await ExecuteDidOpen(testLspServer, testLspServer.GetLocations("caret").First().DocumentUri);
ProjectContext\GetTextDocumentWithContextHandlerTests.cs (3)
35var documentUri = testLspServer.GetLocations("caret").Single().DocumentUri; 63var documentUri = testLspServer.GetLocations("caret").Single().DocumentUri; 94var documentUri = testLspServer.GetLocations("caret").Single().DocumentUri;
ProtocolConversionsTests.cs (1)
305var document = await GetTextDocumentAsync(testLspServer, caret.DocumentUri);
References\FindAllReferencesHandlerTests.cs (3)
219Assert.NotNull(results[0].Location!.DocumentUri); 339Assert.True(results[0].Location.DocumentUri.ToString().EndsWith("String.cs")); 347TextDocument = CreateTextDocumentIdentifier(caret.DocumentUri),
Rename\PrepareRenameTests.cs (1)
99TextDocument = CreateTextDocumentIdentifier(location.DocumentUri)
Rename\RenameTests.cs (2)
185var expectedMappedDocument = TestSpanMapper.MappedFileLocation.DocumentUri; 338TextDocument = CreateTextDocumentIdentifier(location.DocumentUri)
SemanticTokens\AbstractSemanticTokensTests.cs (3)
56TextDocument = new LSP.TextDocumentIdentifier { DocumentUri = caret.DocumentUri } 62TextDocument = new LSP.TextDocumentIdentifier { DocumentUri = location.DocumentUri }, 69TextDocument = new LSP.TextDocumentIdentifier { DocumentUri = caret.DocumentUri },
SimplifyMethod\SimplifyMethodTests.cs (1)
58TextDocument = CreateTextDocumentIdentifier(location.DocumentUri),
ValidateBreakableRange\ValidateBreakableRangeTests.cs (1)
265TextDocument = new LSP.TextDocumentIdentifier { DocumentUri = caret.DocumentUri },
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Services\ExtractRefactoringTests.cs (1)
90var updatedCode = testLspClient.GetDocumentText(caretLocation.DocumentUri);
Utilities\AbstractLanguageServerClientTests.cs (1)
142TextDocument = CreateTextDocumentIdentifier(location.DocumentUri),
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
290var document = GetOrAddDocument(location.DocumentUri.GetRequiredParsedUri().LocalPath);