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