1 implementation of TryAddDocumentToWorkspace
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\MetadataAsSourceFileService.cs (1)
168public bool TryAddDocumentToWorkspace(string filePath, SourceTextContainer sourceTextContainer, [NotNullWhen(true)] out DocumentId? documentId)
8 references to TryAddDocumentToWorkspace
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
PdbSourceDocument\PdbSourceDocumentTests.cs (4)
872var result = service.TryAddDocumentToWorkspace(requestPath, new StaticSourceTextContainer(SourceText.From(string.Empty)), out var documentId); 891var openResult = service.TryAddDocumentToWorkspace(file.FilePath, new StaticSourceTextContainer(SourceText.From(string.Empty)), out var documentId); 934var openResult = service.TryAddDocumentToWorkspace(fileOne.FilePath, new StaticSourceTextContainer(SourceText.From(string.Empty)), out var documentId); 945Assert.Throws<System.InvalidOperationException>(() => service.TryAddDocumentToWorkspace(fileTwo.FilePath, new StaticSourceTextContainer(SourceText.From(string.Empty)), out var documentIdTwo));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
307Assert.True(_metadataAsSourceService.TryAddDocumentToWorkspace(file.FilePath, stringText.Container, out var _));
Microsoft.CodeAnalysis.LanguageServer (1)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (1)
78if (_metadataAsSourceFileService.TryAddDocumentToWorkspace(documentFilePath, documentText.Container, out var documentId))
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (1)
58if (metadataAsSourceFileService.TryAddDocumentToWorkspace(documentFilePath, container, out var documentId))
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
273if (_fileTrackingMetadataAsSourceService.Value.TryAddDocumentToWorkspace(moniker, textBuffer.AsTextContainer(), out var _))