2 writes to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
879
this.
Document
= Workspace.CurrentSolution.Projects.Single().Documents.Single();
968
this.
Document
= this.Result;
20 references to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (20)
95
var root = await testContext.
Document
.GetSyntaxRootAsync();
96
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
99
testContext.Result = testContext.
Document
.WithSyntaxRoot(newRoot);
322
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
325
testContext.Result = testContext.
Document
.WithSyntaxRoot((await testContext.
Document
.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax));
337
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
341
testContext.Result = testContext.
Document
.WithSyntaxRoot((await testContext.
Document
.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax));
551
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
552
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
556
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(oldNode, newNode));
570
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
571
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
575
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, newNode));
592
var codeGenerator = testContext.
Document
.GetRequiredLanguageService<ICodeGenerationService>();
593
var options = await testContext.
Document
.GetCodeGenerationOptionsAsync(testContext.Workspace.GlobalOptions, CancellationToken.None);
627
testContext.Result = testContext.
Document
.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, updatedDeclarationNode));
882
this.Service =
Document
.Project.Services.GetService<ICodeGenerationService>();
973
var simplified = Simplifier.ReduceAsync(this.
Document
, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result;