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)
1312
return oldSolution.
WithDocumentSourceCodeKind
(documentId, sourceCodeKind);
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
SolutionTests\SolutionTests.cs (6)
255
Assert.Same(solution, solution.
WithDocumentSourceCodeKind
(documentId, SourceCodeKind.Regular));
257
var newSolution1 = solution.
WithDocumentSourceCodeKind
(documentId, SourceCodeKind.Script);
260
Assert.Throws<ArgumentOutOfRangeException>(() => solution.
WithDocumentSourceCodeKind
(documentId, (SourceCodeKind)(-1)));
262
Assert.Throws<ArgumentNullException>(() => solution.
WithDocumentSourceCodeKind
(null!, SourceCodeKind.Script));
263
Assert.Throws<InvalidOperationException>(() => solution.
WithDocumentSourceCodeKind
(s_unrelatedDocumentId, SourceCodeKind.Script));
293
var newSolution = solution.
WithDocumentSourceCodeKind
(documentId, SourceCodeKind.Interactive);