3 writes to _trackedDocuments
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
16 references to _trackedDocuments
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
Workspaces\LspWorkspaceManager.cs (16)
159Contract.ThrowIfTrue(_trackedDocuments.ContainsKey(uri), $"didOpen received for {uri} which is already open.");
160_trackedDocuments = _trackedDocuments.Add(uri, (documentText, languageId));
193Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didClose received for {uri} which is not open.");
194_trackedDocuments = _trackedDocuments.Remove(uri);
237Contract.ThrowIfFalse(_trackedDocuments.ContainsKey(uri), $"didChange received for {uri} which is not open.");
238var (_, language) = _trackedDocuments[uri];
239_trackedDocuments = _trackedDocuments.SetItem(uri, (newSourceText, language));
247public ImmutableDictionary<Uri, (SourceText Text, string LanguageId)> GetTrackedLspText() => _trackedDocuments;
315if (_trackedDocuments.TryGetValue(uri, out var trackedDocument))
394var documentsInWorkspace = GetDocumentsForUris(_trackedDocuments.Keys.ToImmutableArray(), workspaceCurrentSolution);
396_trackedDocuments.Keys.Where(static uri => uri.Scheme == SourceGeneratedDocumentUri.Scheme)
397.Select(uri => (identity: SourceGeneratedDocumentUri.DeserializeIdentity(workspaceCurrentSolution, uri), _trackedDocuments[uri].Text))
426lspSolution = lspSolution.WithDocumentText(workspaceDocuments.Select(d => d.Id), _trackedDocuments[uri].Text);
442foreach (var (uri, (sourceText, _)) in _trackedDocuments)
510var isTextEquivalent = await AreChecksumsEqualAsync(firstDocument, _trackedDocuments[uriInWorkspace].Text, cancellationToken).ConfigureAwait(false);
539if (_trackedDocuments.TryGetValue(uri, out var trackedDocument))