77 references to TextDocumentKind
Microsoft.CodeAnalysis.EditorFeatures (2)
Preview\AbstractPreviewFactoryService.cs (2)
516Debug.Assert(oldDocument.Kind is TextDocumentKind.AdditionalDocument or TextDocumentKind.AnalyzerConfigDocument);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (16)
CodeFixes\CodeFixServiceTests.cs (11)
382TextDocumentKind documentKind = TextDocumentKind.Document) 392TextDocumentKind documentKind = TextDocumentKind.Document) 401TextDocumentKind.Document => project.Documents.Single(), 402TextDocumentKind.AdditionalDocument => project.AdditionalDocuments.Single(), 403TextDocumentKind.AnalyzerConfigDocument => project.AnalyzerConfigDocuments.Single(), 883GetDocumentAndExtensionManager(tuple.analyzerService, workspace, out var txtDocument, out var extensionManager, analyzerReference, documentKind: TextDocumentKind.AdditionalDocument); 900GetDocumentAndExtensionManager(tuple.analyzerService, workspace2, out var logDocument, out extensionManager, analyzerReference, documentKind: TextDocumentKind.AdditionalDocument); 962DocumentKinds = [nameof(TextDocumentKind.AdditionalDocument)], 972DocumentKinds = [nameof(TextDocumentKind.AdditionalDocument)])]
CodeRefactorings\CodeRefactoringServiceTest.cs (5)
247if (document.Kind == TextDocumentKind.AdditionalDocument) 259DocumentKinds = [nameof(TextDocumentKind.AdditionalDocument), nameof(TextDocumentKind.AnalyzerConfigDocument)], 269DocumentKinds = [nameof(TextDocumentKind.AdditionalDocument), nameof(TextDocumentKind.AnalyzerConfigDocument)])]
Microsoft.CodeAnalysis.Features (2)
CodeRefactorings\CodeRefactoringService.cs (1)
84var kinds = EnumArrayConverter.FromStringArray<TextDocumentKind>(attribute.DocumentKinds);
Common\AbstractProjectExtensionProvider.cs (1)
21public record class ExtensionInfo(ImmutableArray<TextDocumentKind> DocumentKinds, string[]? DocumentExtensions);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\CodeFixes\CodeFixService.cs (1)
988var kinds = EnumArrayConverter.FromStringArray<TextDocumentKind>(attribute.DocumentKinds);
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\RemoteWorkspace.SolutionCreator.cs (3)
562TextDocumentKind.Document => document.Project.Solution.WithDocumentTextLoader(document.Id, loader, mode).GetRequiredDocument(document.Id), 563TextDocumentKind.AnalyzerConfigDocument => document.Project.Solution.WithAnalyzerConfigDocumentTextLoader(document.Id, loader, mode).GetRequiredAnalyzerConfigDocument(document.Id), 564TextDocumentKind.AdditionalDocument => document.Project.Solution.WithAdditionalDocumentTextLoader(document.Id, loader, mode).GetRequiredAdditionalDocument(document.Id),
Microsoft.CodeAnalysis.TestAnalyzerReference (2)
NonSourceFileRefactoring.cs (2)
16DocumentKinds = [nameof(TextDocumentKind.AdditionalDocument), nameof(TextDocumentKind.AnalyzerConfigDocument)],
Microsoft.CodeAnalysis.Workspaces (21)
CodeFixes\ExportCodeFixProviderAttribute.cs (4)
20private static readonly string[] s_defaultDocumentKinds = [nameof(TextDocumentKind.Document)]; 21private static readonly string[] s_documentKindNames = Enum.GetNames(typeof(TextDocumentKind)); 37/// The document kinds for which this provider can provide code fixes. See <see cref="TextDocumentKind"/>. 38/// By default, the provider supports code fixes only for source documents, <see cref="TextDocumentKind.Document"/>.
CodeRefactorings\ExportCodeRefactoringProviderAttribute.cs (4)
19private static readonly string[] s_defaultDocumentKinds = [nameof(TextDocumentKind.Document)]; 20private static readonly string[] s_documentKindNames = Enum.GetNames(typeof(TextDocumentKind)); 36/// The document kinds for which this provider can provide refactorings. See <see cref="TextDocumentKind"/>. 37/// By default, the provider supports refactorings only for source documents, <see cref="TextDocumentKind.Document"/>.
Shared\Extensions\ISolutionExtensions.cs (4)
39public static TextDocumentKind? GetDocumentKind(this Solution solution, DocumentId documentId) 61case TextDocumentKind.Document: 64case TextDocumentKind.AnalyzerConfigDocument: 67case TextDocumentKind.AdditionalDocument:
Workspace\Solution\AdditionalDocument.cs (1)
13: base(project, state, TextDocumentKind.AdditionalDocument)
Workspace\Solution\AnalyzerConfigDocument.cs (1)
10: base(project, state, TextDocumentKind.AnalyzerConfigDocument)
Workspace\Solution\Document.cs (1)
47: base(project, state, TextDocumentKind.Document)
Workspace\Solution\TextDocument.cs (2)
18internal TextDocumentKind Kind { get; } 25internal TextDocument(Project project, TextDocumentState state, TextDocumentKind kind)
Workspace\Workspace_Editor.cs (4)
576Debug.Assert(oldDocument.Kind is TextDocumentKind.AdditionalDocument or TextDocumentKind.AnalyzerConfigDocument); 777Debug.Assert(oldDocument.Kind is TextDocumentKind.AdditionalDocument or TextDocumentKind.AnalyzerConfigDocument);
Microsoft.VisualStudio.LanguageServices (30)
Preview\FileChange.cs (1)
215public TextDocumentKind ChangedDocumentKind => (_left ?? _right).Kind;
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (3)
29case TextDocumentKind.Document: 33case TextDocumentKind.AnalyzerConfigDocument: 37case TextDocumentKind.AdditionalDocument:
Preview\TopLevelChange.cs (7)
116TextDocumentKind changedDocumentKind) 129case TextDocumentKind.Document: 133case TextDocumentKind.AnalyzerConfigDocument: 137case TextDocumentKind.AdditionalDocument: 156case TextDocumentKind.Document: 160case TextDocumentKind.AnalyzerConfigDocument: 164case TextDocumentKind.AdditionalDocument:
ProjectSystem\VisualStudioWorkspaceImpl.cs (19)
759=> AddDocumentCore(info, text, TextDocumentKind.Document); 762=> AddDocumentCore(info, text, TextDocumentKind.AdditionalDocument); 767AddDocumentCore(info, text, TextDocumentKind.AnalyzerConfigDocument); 770private void AddDocumentCore(DocumentInfo info, SourceText initialText, TextDocumentKind documentKind) 801case TextDocumentKind.AdditionalDocument: 805case TextDocumentKind.AnalyzerConfigDocument: 809case TextDocumentKind.Document: 875TextDocumentKind documentKind, 894TextDocumentKind documentKind, 966TextDocumentKind.AnalyzerConfigDocument); 979TextDocumentKind documentKind) 985var extension = documentKind == TextDocumentKind.Document ? GetPreferredExtension(documentId) : Path.GetExtension(documentName); 1001private void RemoveDocumentCore(DocumentId documentId, TextDocumentKind documentKind) 1032case TextDocumentKind.AdditionalDocument: 1036case TextDocumentKind.AnalyzerConfigDocument: 1040case TextDocumentKind.Document: 1051=> RemoveDocumentCore(documentId, TextDocumentKind.Document); 1054=> RemoveDocumentCore(documentId, TextDocumentKind.AdditionalDocument); 1057=> RemoveDocumentCore(documentId, TextDocumentKind.AnalyzerConfigDocument);