8 overrides of ContainingMemberOrLambda
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Flags.cs (1)
36internal override Symbol ContainingMemberOrLambda
Binder\BuckStopsHereBinder.cs (1)
158internal override Symbol? ContainingMemberOrLambda
Binder\ExecutableCodeBinder.cs (1)
48internal override Symbol ContainingMemberOrLambda
Binder\InContainerBinder.cs (1)
43internal override Symbol ContainingMemberOrLambda
Binder\InMethodBinder.cs (1)
71internal override Symbol ContainingMemberOrLambda
Binder\ScriptLocalScopeBinder.cs (1)
24internal override Symbol ContainingMemberOrLambda
Binder\WithLambdaParametersBinder.cs (1)
53internal override Symbol ContainingMemberOrLambda
Binder\WithMethodTypeParametersBinder.cs (1)
29internal override Symbol ContainingMemberOrLambda
112 references to ContainingMemberOrLambda
Microsoft.CodeAnalysis.CSharp (112)
Binder\Binder.cs (6)
245return Next.ContainingMemberOrLambda; 426var member = this.ContainingMemberOrLambda; 444var containingMember = this.ContainingMemberOrLambda; 611ReportDiagnosticsIfObsolete(diagnostics, symbol, node, hasBaseReceiver, this.ContainingMemberOrLambda, this.ContainingType, this.Flags); 917var currentContainer = scope.ContainingMemberOrLambda; 918if (currentContainer != null && currentContainer != scope.Next?.ContainingMemberOrLambda)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
184enclosingBinder.ContainingMemberOrLambda!,
Binder\Binder.QueryTranslationState.cs (2)
75var result = new RangeVariableSymbol(name, binder.ContainingMemberOrLambda, identifier.GetLocation()); 119return new RangeVariableSymbol(transparentIdentifier, binder.ContainingMemberOrLambda, null, true);
Binder\Binder.ValueChecks.cs (6)
860if (!isValueType || (RequiresAssignableVariable(valueKind) && (this.ContainingMemberOrLambda as MethodSymbol)?.IsEffectivelyReadOnly == true)) 1176if (RequiresAssignableVariable(valueKind) && !backingField.ContainingType.IsReferenceType && (this.ContainingMemberOrLambda as MethodSymbol)?.IsEffectivelyReadOnly == true) 1438Symbol containing = this.ContainingMemberOrLambda; 1471if (!(ContainingMemberOrLambda is MethodSymbol method)) 1751var containing = this.ContainingMemberOrLambda; 1906var containingMember = ContainingMemberOrLambda;
Binder\Binder_AnonymousTypes.cs (1)
185var member = this.ContainingMemberOrLambda;
Binder\Binder_Attributes.cs (1)
133var boundAttribute = new ExecutableCodeBinder(node, this.ContainingMemberOrLambda, this).BindAttribute(node, boundAttributeType, (this as ContextualAttributeBinder)?.AttributedMember, diagnostics);
Binder\Binder_Await.cs (2)
107var containingMethod = this.ContainingMemberOrLambda as MethodSymbol; 151var containingMemberOrLambda = this.ContainingMemberOrLambda;
Binder\Binder_Deconstruct.cs (1)
893CheckRestrictedTypeInAsyncMethod(this.ContainingMemberOrLambda, declTypeWithAnnotations.Type, diagnostics, typeSyntax);
Binder\Binder_Expressions.cs (18)
37var memberOpt = this.ContainingMemberOrLambda?.ContainingNonLambdaMember(); 441Debug.Assert((object)this.ContainingMemberOrLambda == field); 500Debug.Assert(this.ContainingMemberOrLambda.Kind == SymbolKind.Method || this.ContainingMemberOrLambda.Kind == SymbolKind.Property); 1325Symbol container = this.ContainingMemberOrLambda; 1934var containingMethod = this.ContainingMemberOrLambda as MethodSymbol; 2134this.ContainingMemberOrLambda is MethodSymbol { MethodKind: MethodKind.AnonymousFunction or MethodKind.LocalFunction } && 2315return this.ContainingMemberOrLambda.ContainingNonLambdaMember(); 2343var containingMember = this.ContainingMemberOrLambda; 2490Debug.Assert(this.ContainingMemberOrLambda is not null); 2491ParameterSymbol? thisSymbol = this.ContainingMemberOrLambda.EnclosingThisSymbol(); 2494if (thisSymbol is not null && thisSymbol.ContainingSymbol != ContainingMemberOrLambda && thisSymbol.RefKind != RefKind.None) 3168if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.Kind == SymbolKind.NamedType) 3184CheckRestrictedTypeInAsyncMethod(this.ContainingMemberOrLambda, declType.Type, diagnostics, typeSyntax); 10811Debug.Assert(ContainingMemberOrLambda is { }); 10993resultIsUsed = (((SimpleLambdaExpressionSyntax)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda, Compilation); 10997resultIsUsed = (((ParenthesizedLambdaExpressionSyntax)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda, Compilation); 11001resultIsUsed = (((ArrowExpressionClauseSyntax)parent).Expression != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda, Compilation);
Binder\Binder_Initializers.cs (2)
147Debug.Assert((ContainingMemberOrLambda is TypeSymbol containing && TypeSymbol.Equals(containing, fieldSymbol.ContainingType, TypeCompareKind.ConsiderEverything2)) || //should be the binder for the type 207Debug.Assert(scriptClassBinder.ContainingMemberOrLambda is NamedTypeSymbol { IsScriptClass: true });
Binder\Binder_Invocation.cs (1)
1786ContainingMemberOrLambda is MethodSymbol containingMethod &&
Binder\Binder_NameConflicts.cs (2)
134var containingMemberOrLambda = this.ContainingMemberOrLambda; 144this.Next?.ContainingMemberOrLambda != containingMemberOrLambda;
Binder\Binder_Operators.cs (1)
2664accessedLocalOrParameterOpt = this.ContainingMemberOrLambda.EnclosingThisSymbol();
Binder\Binder_Patterns.cs (3)
886RoslynDebug.Assert(ContainingMemberOrLambda is { }); 887if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.Kind == SymbolKind.NamedType) 896CheckRestrictedTypeInAsyncMethod(this.ContainingMemberOrLambda, declType.Type, diagnostics, typeSyntax ?? (SyntaxNode)designation);
Binder\Binder_Statements.cs (14)
219var method = (MethodSymbol)this.ContainingMemberOrLambda; 482new SourceLabelSymbol((MethodSymbol)ContainingMemberOrLambda, node.Identifier); 1097CheckRestrictedTypeInAsyncMethod(this.ContainingMemberOrLambda, declTypeOpt.Type, localDiagnostics, typeSyntax); 1209ContainingMemberOrLambda, 2936return IsInAsyncMethod(this.ContainingMemberOrLambda as MethodSymbol); 2941var symbol = this.ContainingMemberOrLambda; 2947var symbol = this.ContainingMemberOrLambda; 2953var symbol = this.ContainingMemberOrLambda; 2965var symbol = this.ContainingMemberOrLambda as MethodSymbol; 2997var interactiveInitializerMethod = this.ContainingMemberOrLambda as SynthesizedInteractiveInitializerMethod; 3055var container = this.ContainingMemberOrLambda; 3185if (this.ContainingMemberOrLambda is LambdaSymbol) 3375var lambda = this.ContainingMemberOrLambda as LambdaSymbol; 3520var inferringLambda = this.ContainingMemberOrLambda is MethodSymbol method && (object)method.ReturnType == LambdaSymbol.ReturnTypeIsBeingInferred;
Binder\BinderFactory.BinderFactoryVisitor.cs (9)
436Symbol containingSymbol = binder.ContainingMemberOrLambda; 675var container = ((NamespaceOrTypeSymbol)outer.ContainingMemberOrLambda).GetSourceTypeMember(parent); 710var container = ((NamespaceOrTypeSymbol)outer.ContainingMemberOrLambda).GetSourceTypeMember(parent.Identifier.ValueText, 0, SyntaxKind.EnumDeclaration, parent); 775var typeSymbol = ((NamespaceOrTypeSymbol)resultBinder.ContainingMemberOrLambda).GetSourceTypeMember(parent); 1207result = result.WithContainingMemberOrLambda(outerBinder.ContainingMemberOrLambda); 1251SourceNamedTypeSymbol type = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((TypeDeclarationSyntax)memberSyntax); 1288SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax); 1325SourceNamedTypeSymbol typeSymbol = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember(typeDeclSyntax); 1344SourceNamedTypeSymbol delegateType = ((NamespaceOrTypeSymbol)outerBinder.ContainingMemberOrLambda).GetSourceTypeMember((DelegateDeclarationSyntax)memberSyntax);
Binder\CatchClauseBinder.cs (1)
34locals.Add(SourceLocalSymbol.MakeLocal(this.ContainingMemberOrLambda, this, allowRefKind: false, allowScoped: false, declarationOpt.Type, declarationOpt.Identifier, LocalDeclarationKind.CatchVariable, initializer: null));
Binder\EmbeddedStatementBinder.cs (1)
56var containingMethod = (MethodSymbol)this.ContainingMemberOrLambda;
Binder\ExecutableCodeBinder.cs (1)
50get { return _memberSymbol ?? Next.ContainingMemberOrLambda; }
Binder\ExpressionVariableFinder.cs (3)
608_scopeBinder.ContainingMemberOrLambda, 630containingSymbol: _scopeBinder.ContainingMemberOrLambda, 655containingSymbol: _scopeBinder.ContainingMemberOrLambda,
Binder\ForEachLoopBinder.cs (3)
89(MethodSymbol)this.ContainingMemberOrLambda, 151this.ContainingMemberOrLambda, 316CheckRestrictedTypeInAsyncMethod(this.ContainingMemberOrLambda, declType.Type, diagnostics, typeSyntax);
Binder\LocalBinderFactory.cs (11)
536Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 549Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 577Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 587Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 597Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 643Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 696Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 732Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 880Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); 1053Debug.Assert((object)_containingMemberOrLambda == enclosing.ContainingMemberOrLambda); 1058Debug.Assert((object)_containingMemberOrLambda == enclosing.ContainingMemberOrLambda);
Binder\LocalScopeBinder.cs (3)
334this.ContainingMemberOrLambda, 349this.ContainingMemberOrLambda, 355var containingMethod = (MethodSymbol)this.ContainingMemberOrLambda;
Binder\SwitchBinder.cs (1)
236labels.Add(new SourceLabelSymbol((MethodSymbol)this.ContainingMemberOrLambda, labelSyntax, boundLabelConstantOpt));
Binder\UsingStatementBinder.cs (1)
122CheckRestrictedTypeInAsyncMethod(originalBinder.ContainingMemberOrLambda, expressionOpt.Type, diagnostics, expressionOpt.Syntax);
BoundTree\UnboundLambda.cs (7)
83: this(syntax, unboundLambda.WithNoCache(), (LambdaSymbol)binder.ContainingMemberOrLambda!, body, diagnostics, binder, delegateType) 517Debug.Assert(binder.ContainingMemberOrLambda != null); 699Debug.Assert(Binder.ContainingMemberOrLambda is { }); 709Binder.ContainingMemberOrLambda, 776Debug.Assert(Binder.ContainingMemberOrLambda is { }); 811lambdaSymbol = CreateLambdaSymbol(Binder.ContainingMemberOrLambda, returnType, cacheKey.ParameterTypes, cacheKey.ParameterRefKinds, refKind); 995var lambdaSymbol = CreateLambdaSymbol(Binder.ContainingMemberOrLambda!,
Compilation\CSharpSemanticModel.cs (6)
235return new ExecutableCodeBinder(expression, binder.ContainingMemberOrLambda, binder).GetBinder(expression); 248return new ExecutableCodeBinder(attribute, binder.ContainingMemberOrLambda, binder).GetBinder(attribute); 415var boundNode = new ExecutableCodeBinder(attribute, binder.ContainingMemberOrLambda, binder).BindAttribute(attribute, attributeType, attributedMember: null, BindingDiagnosticBag.Discarded); 810binder = new ExecutableCodeBinder(constructorInitializer, binder.ContainingMemberOrLambda, binder); 883binder = new ExecutableCodeBinder(constructorInitializer, binder.ContainingMemberOrLambda, binder); 4904return binder == null ? null : binder.ContainingMemberOrLambda.GetPublicSymbol();
Compilation\InitializerSemanticModel.cs (1)
212binder = new ExecutableCodeBinder(initializer, binder.ContainingMemberOrLambda, binder);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
381Debug.Assert(binder.ContainingMemberOrLambda == ContainingSymbol);
Symbols\Source\SourceFixedFieldSymbol.cs (1)
87binder = new ExecutableCodeBinder(sizeExpression, binder.ContainingMemberOrLambda, binder).GetBinder(sizeExpression);
Symbols\TypeWithAnnotations.cs (1)
1184diagnostics.Add(new LazyObsoleteDiagnosticInfo(type, binder.ContainingMemberOrLambda, binder.Flags), syntax.GetLocation());