8 references to WithDocumentSourceCodeKind
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\Document.cs (1)
386=> this.Project.Solution.WithDocumentSourceCodeKind(this.Id, kind).GetRequiredDocument(Id);
Workspace\Workspace.cs (1)
1312return oldSolution.WithDocumentSourceCodeKind(documentId, sourceCodeKind);
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
SolutionTests\SolutionTests.cs (6)
255Assert.Same(solution, solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Regular)); 257var newSolution1 = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Script); 260Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentSourceCodeKind(documentId, (SourceCodeKind)(-1))); 262Assert.Throws<ArgumentNullException>(() => solution.WithDocumentSourceCodeKind(null!, SourceCodeKind.Script)); 263Assert.Throws<InvalidOperationException>(() => solution.WithDocumentSourceCodeKind(s_unrelatedDocumentId, SourceCodeKind.Script)); 293var newSolution = solution.WithDocumentSourceCodeKind(documentId, SourceCodeKind.Interactive);