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