21 references to ContainingMember
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Expressions.cs (11)
1312
MethodSymbol method = this.
ContainingMember
() as MethodSymbol;
1448
switch (
ContainingMember
())
1470
throw ExceptionUtilities.UnexpectedValue(
ContainingMember
());
1729
this.
ContainingMember
() is { Kind: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member
2079
(this.
ContainingMember
() is MethodSymbol { MethodKind: MethodKind.Constructor } containingMember && (object)containingMember != primaryCtor)) && // We are in a non-primary instance constructor
2089
(this.
ContainingMember
() is FieldSymbol || (object)primaryCtor == this.
ContainingMember
()) ||
2113
bool capture = (this.
ContainingMember
() is MethodSymbol containingMethod && (object)primaryCtor != containingMethod);
2221
this.
ContainingMember
() is not { Kind: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member
2228
ContainingMember
() is not SynthesizedSimpleProgramEntryPointSymbol)
2278
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)
1493
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
();