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 SourceMethodSymbolWithAttributes)?.WithTypeParametersBinder; 381Debug.Assert(binder.ContainingMemberOrLambda == ContainingSymbol); 390bool hasErrors = ParameterHelpers.ReportDefaultParameterErrors(binder, ContainingSymbol, parameterSyntax, this, valueBeforeConversion, convertedExpression, diagnostics); 422var sourceMethod = this.ContainingSymbol as SourceOrdinaryMethodSymbol; 473ImmutableArray<ParameterSymbol> implParameters = this.ContainingSymbol switch 485Debug.Assert(!this.ContainingSymbol.IsPartialImplementation()); 494ImmutableArray<ParameterSymbol> defParameters = this.ContainingSymbol switch 506Debug.Assert(!this.ContainingSymbol.IsPartialDefinition()); 689var parameters = ContainingSymbol.GetParameters(); 1034private bool IsValidCallerInfoContext(AttributeSyntax node) => !ContainingSymbol.IsExplicitInterfaceImplementation() 1035&& !ContainingSymbol.IsOperator() 1049var implParameter = this.ContainingSymbol.IsPartialImplementation() ? this : PartialImplementationPart; 1076else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1104else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1137else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1178else if (!HasExplicitDefaultValue && !ContainingSymbol.IsPartialImplementation()) // attribute applied to parameter without default 1228else if (this.ContainingSymbol is MethodSymbol method && 1263ImmutableArray<ParameterSymbol> containingSymbolParameters = ContainingSymbol.GetParameters(); 1345if (!ContainingSymbol.RequiresInstanceReceiver() || ContainingSymbol is MethodSymbol { MethodKind: MethodKind.Constructor or MethodKind.DelegateInvoke or MethodKind.LambdaMethod }) 1348diagnostics.Add(ErrorCode.ERR_NotInstanceInvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, ContainingSymbol); 1359diagnostics.Add(ErrorCode.ERR_InvalidInterpolatedStringHandlerArgumentName, arguments.AttributeSyntaxOpt.Location, name, ContainingSymbol); 1568var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1619diagnostics.Add(ErrorCode.ERR_ParamsMemberCannotBeLessVisibleThanDeclaringMember, syntax, reportAsLessVisible, ContainingSymbol); 1627var binder = GetDefaultParameterValueBinder(syntax).WithContainingMemberOrLambda(ContainingSymbol); // this binder is good for our purpose 1643if (ContainingSymbol.ContainingSymbol is NamedTypeSymbol) // No need to check for lambdas or local function 1663bool result = method.IsAsRestrictive(ContainingSymbol, ref useSiteInfo) && 1664method.ContainingType.IsAtLeastAsVisibleAs(ContainingSymbol, ref useSiteInfo); 1674diagnostics.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);