2 writes to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
865this.Document = Workspace.CurrentSolution.Projects.Single().Documents.Single(); 954this.Document = this.Result;
20 references to Document
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (20)
91var root = await testContext.Document.GetSyntaxRootAsync(); 92var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 95testContext.Result = testContext.Document.WithSyntaxRoot(newRoot); 313var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 316testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldSyntax, newSyntax)); 328var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 332testContext.Result = testContext.Document.WithSyntaxRoot((await testContext.Document.GetSyntaxRootAsync()).ReplaceNode(oldMemberSyntax, newMemberSyntax)); 538var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 539var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 543testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(oldNode, newNode)); 557var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 558var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 562testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, newNode)); 579var codeGenerator = testContext.Document.GetRequiredLanguageService<ICodeGenerationService>(); 580var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 614testContext.Result = testContext.Document.WithSyntaxRoot(testContext.SemanticModel.SyntaxTree.GetRoot().ReplaceNode(declarationNode, updatedDeclarationNode)); 868this.Service = Document.Project.Services.GetService<ICodeGenerationService>(); 959var simplified = Simplifier.ReduceAsync(this.Document, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result;