Base:
property
ContainingSymbol
Microsoft.CodeAnalysis.CSharp.Symbol.ContainingSymbol
44 references to ContainingSymbol
Microsoft.CodeAnalysis.CSharp (44)
FlowAnalysis\DefiniteAssignment.cs (1)
1890if (parameter is SourceComplexParameterSymbolBase { ContainingSymbol: LocalFunctionSymbol or LambdaSymbol } sourceComplexParam)
Symbols\Source\SourceComplexParameterSymbol.cs (29)
82private Binder WithTypeParametersBinderOpt => (ContainingSymbol as SourceMethodSymbol)?.WithTypeParametersBinder; 382Debug.Assert(binder.ContainingMemberOrLambda == ContainingSymbol); 391bool hasErrors = ParameterHelpers.ReportDefaultParameterErrors(binder, ContainingSymbol, parameterSyntax, this, valueBeforeConversion, convertedExpression, diagnostics); 423var sourceMethod = this.ContainingSymbol as SourceOrdinaryMethodSymbol; 474ImmutableArray<ParameterSymbol> implParameters = this.ContainingSymbol.GetPartialImplementationPart()?.GetParameters() ?? default; 481Debug.Assert(!this.ContainingSymbol.IsPartialImplementation()); 490ImmutableArray<ParameterSymbol> defParameters = this.ContainingSymbol.GetPartialDefinitionPart()?.GetParameters() ?? default; 497Debug.Assert(!this.ContainingSymbol.IsPartialDefinition()); 680var parameters = ContainingSymbol.GetParameters(); 1030private bool IsValidCallerInfoContext(AttributeSyntax node) => !ContainingSymbol.IsExplicitInterfaceImplementation() 1031&& !ContainingSymbol.IsOperator() 1045var implParameter = this.ContainingSymbol.IsPartialImplementation() ? this : PartialImplementationPart; 1072else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1100else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1133else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1174else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1224else if (this.ContainingSymbol is MethodSymbol method && 1259ImmutableArray<ParameterSymbol> containingSymbolParameters = ContainingSymbol.GetParameters(); 1341if (!ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke or MethodKind.LambdaMethod }) 1344diagnostics.Add(ErrorCode.ERR_NotInstanceInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, ContainingSymbol); 1355diagnostics.Add(ErrorCode.ERR_InvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, name, ContainingSymbol); 1564var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1615diagnostics.Add(ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember, syntax, reportAsLessVisible, ContainingSymbol); 1623var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1639if (ContainingSymbol.ContainingSymbol is NamedTypeSymbol) // No need to check for lambdas or local function 1659bool result = method.IsAsRestrictive(ContainingSymbol, ref useSiteInfo) && 1660method.ContainingType.IsAtLeastAsVisibleAs(ContainingSymbol, ref useSiteInfo); 1670diagnostics.Add(ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember, syntax, method, ContainingSymbol);
Symbols\Source\SourceDelegateClonedParameterSymbolForBeginAndEndInvoke.cs (1)
33(SourceDelegateMethodSymbol)ContainingSymbol,
Symbols\Source\SourceParameterSymbol.cs (5)
132this.ContainingSymbol, 146Debug.Assert(!(ContainingSymbol is LocalFunctionSymbol)); 149this.ContainingSymbol, 209=> ContainingSymbol.AddDeclarationDiagnostics(diagnostics); 290MethodSymbol owningMethod = ContainingSymbol as MethodSymbol;
Symbols\Source\SourcePropertyClonedParameterSymbolForAccessors.cs (1)
29this.ContainingSymbol);
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
101return parameter.ContainingSymbol is SynthesizedPrimaryConstructor &&
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (6)
38if (ContainingSymbol is SourcePropertyAccessorSymbol propertyAccessor && propertyAccessor.AssociatedSymbol is SourcePropertySymbolBase property) 70get { return (SourceMemberMethodSymbol)this.ContainingSymbol; } 76var accessor = (SourceMemberMethodSymbol)this.ContainingSymbol; 84if (ContainingSymbol is SourcePropertyAccessorSymbol propertyAccessor && propertyAccessor.AssociatedSymbol is SourcePropertySymbolBase property) 107public override TypeWithAnnotations TypeWithAnnotations => ((PropertySymbol)((SourcePropertyAccessorSymbol)ContainingSymbol).AssociatedSymbol).TypeWithAnnotations; 143(SourceEventAccessorSymbol)this.ContainingSymbol);