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