1 write to SelectionResult
Microsoft.CodeAnalysis.Features (1)
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
82SelectionResult = selectionResult;
31 references to SelectionResult
Microsoft.CodeAnalysis.CSharp.Features (26)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (9)
339var token = this.SelectionResult.GetFirstTokenInSelection(); 356var isAsync = this.SelectionResult.ContainsAwaitExpression(); 385var typeDecl = SelectionResult.GetContainingScopeOf<BaseTypeDeclarationSyntax>(); 392var memberDecl = SelectionResult.GetContainingScopeOf<MemberDeclarationSyntax>(); 530var token = this.SelectionResult.GetFirstTokenInSelection(); 849if (this.SelectionResult.ContainsAwaitExpression()) 851if (this.SelectionResult.ContainsConfigureAwaitFalse()) 1136var scope = this.SelectionResult.GetContainingScope(); 1141scope = this.SelectionResult.GetFirstTokenInSelection().Parent;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (9)
34var containingScope = this.SelectionResult.GetContainingScope(); 89Contract.ThrowIfFalse(this.SelectionResult.IsExtractMethodOnExpression); 93var containingScope = (ExpressionSyntax)this.SelectionResult.GetContainingScope(); 117var scope = (SyntaxNode)this.SelectionResult.GetContainingScopeOf<StatementSyntax>(); 118scope ??= this.SelectionResult.GetContainingScopeOf<FieldDeclarationSyntax>(); 120scope ??= this.SelectionResult.GetContainingScopeOf<ConstructorInitializerSyntax>(); 124scope ??= this.SelectionResult.GetContainingScopeOf<ArrowExpressionClauseSyntax>()?.Parent; 126scope ??= this.SelectionResult.GetContainingScopeOf<PrimaryConstructorBaseTypeSyntax>(); 140var sourceNode = this.SelectionResult.GetContainingScope();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.MultipleStatementsCodeGenerator.cs (4)
36var firstStatementUnderContainer = this.SelectionResult.GetFirstStatementUnderContainer(); 37var lastStatementUnderContainer = this.SelectionResult.GetLastStatementUnderContainer(); 81=> this.SelectionResult.GetFirstStatementUnderContainer(); 84=> this.SelectionResult.GetLastStatementUnderContainer();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.SingleStatementCodeGenerator.cs (4)
32Contract.ThrowIfFalse(this.SelectionResult.IsExtractMethodOnSingleStatement); 34return [this.SelectionResult.GetFirstStatement()]; 38=> this.SelectionResult.GetFirstStatement(); 44return this.SelectionResult.GetFirstStatement();
Microsoft.CodeAnalysis.Features (5)
ExtractMethod\MethodExtractor.CodeGenerator.cs (5)
90protected SemanticDocument SemanticDocument => SelectionResult.SemanticDocument; 145var semanticDocument = SelectionResult.SemanticDocument; 237return callSiteContainer ?? this.SelectionResult.GetOutermostCallSiteContainerToProcess(cancellationToken); 262var returnType = SelectionResult.GetReturnType(cancellationToken); 494if (!this.SelectionResult.ContainsAwaitExpression())