14 references to GetContainingScopeOf
Microsoft.CodeAnalysis.CSharp.Features (14)
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (2)
24=> this.SelectionResult.GetContainingScopeOf<PrimaryConstructorBaseTypeSyntax>() != null; 51var scope = SelectionResult.GetContainingScopeOf<ConstructorDeclarationSyntax>();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
385var typeDecl = SelectionResult.GetContainingScopeOf<BaseTypeDeclarationSyntax>(); 392var memberDecl = SelectionResult.GetContainingScopeOf<MemberDeclarationSyntax>();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (5)
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>();
ExtractMethod\CSharpSelectionResult.cs (5)
106var expressionBodiedMember = GetContainingScopeOf<ArrowExpressionClauseSyntax>(); 111return GetContainingScopeOf<TypeDeclarationSyntax>(); 115var constructorInitializer = GetContainingScopeOf<ConstructorInitializerSyntax>(); 120var field = GetContainingScopeOf<FieldDeclarationSyntax>(); 124var primaryConstructorBaseType = GetContainingScopeOf<PrimaryConstructorBaseTypeSyntax>();