21 references to ContainingMember
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Expressions.cs (11)
1312
MethodSymbol method = this.
ContainingMember
() as MethodSymbol;
1448
switch (
ContainingMember
())
1472
diagnostics.Add(ErrorCode.ERR_NoSuchMember, node,
ContainingMember
(), "field");
1732
this.
ContainingMember
() is { Kind: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member
2082
(this.
ContainingMember
() is MethodSymbol { MethodKind: MethodKind.Constructor } containingMember && (object)containingMember != primaryCtor)) && // We are in a non-primary instance constructor
2092
(this.
ContainingMember
() is FieldSymbol || (object)primaryCtor == this.
ContainingMember
()) ||
2116
bool capture = (this.
ContainingMember
() is MethodSymbol containingMethod && (object)primaryCtor != containingMethod);
2224
this.
ContainingMember
() is not { Kind: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member
2231
ContainingMember
() is not SynthesizedSimpleProgramEntryPointSymbol)
2281
var containingMember =
ContainingMember
();
Binder\Binder_Invocation.cs (1)
1525
var containingMember = InAttributeArgument ? attributedMember :
ContainingMember
() switch
Binder\Binder_Statements.cs (6)
3706
BoundExpression initializerInvocation = GetBinder(initializer).BindConstructorInitializer(initializer.ArgumentList, (MethodSymbol)this.
ContainingMember
(), diagnostics);
3760
if (this.
ContainingMember
() is MethodSymbol { IsStatic: false } method)
3772
BoundExpression initializerInvocation = GetBinder(initializer).BindConstructorInitializer(initializer.ArgumentList, (MethodSymbol)this.
ContainingMember
(), diagnostics);
3774
Debug.Assert(!this.
ContainingMember
().IsImplicitlyDeclared);
3784
initializerInvocation = BindImplicitConstructorInitializer((MethodSymbol)this.
ContainingMember
(), diagnostics, Compilation);
3792
var constructorInitializer = new BoundExpressionStatement(ctorSyntax, initializerInvocation) { WasCompilerGenerated = ((MethodSymbol)
ContainingMember
()).IsImplicitlyDeclared };
Binder\Binder_Symbols.cs (1)
1511
this.
ContainingMember
() != (object)primaryConstructor &&
Compilation\AttributeSemanticModel.cs (1)
29
: base(syntax, attributeType, new ExecutableCodeBinder(syntax, rootBinder.
ContainingMember
(), rootBinder), containingPublicSemanticModel, parentRemappedSymbolsOpt)
Compilation\CSharpSemanticModel.cs (1)
3683
var containingMember = binder.
ContainingMember
();