115 overrides of ContainingSymbol
Microsoft.CodeAnalysis.CSharp (115)
Binder\Binder.ValueChecks.cs (1)
3027
public override Symbol
ContainingSymbol
CodeGen\Optimizer.cs (1)
2386
public override Symbol
ContainingSymbol
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
49
public override Symbol
ContainingSymbol
=> _containingSymbol;
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (1)
139
public override Symbol
ContainingSymbol
=> TopLevelMethod.ContainingSymbol;
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
199
public override Symbol
ContainingSymbol
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
40
public override Symbol
ContainingSymbol
=> _containingSymbol;
Lowering\LocalRewriter\DynamicSiteContainer.cs (1)
24
public override Symbol
ContainingSymbol
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (1)
34
public override Symbol
ContainingSymbol
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
104
public override Symbol
ContainingSymbol
Symbols\AliasSymbol.cs (1)
206
public sealed override Symbol
ContainingSymbol
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
57
public sealed override Symbol
ContainingSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
105
public override Symbol
ContainingSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
166
public override Symbol
ContainingSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
41
public sealed override Symbol
ContainingSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
135
public sealed override Symbol
ContainingSymbol
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
127
public override Symbol
ContainingSymbol
Symbols\ArrayTypeSymbol.cs (1)
302
public override Symbol?
ContainingSymbol
Symbols\AssemblySymbol.cs (1)
300
public sealed override Symbol
ContainingSymbol
Symbols\DiscardSymbol.cs (1)
21
public override Symbol?
ContainingSymbol
=> null;
Symbols\DynamicTypeSymbol.cs (1)
167
public override Symbol?
ContainingSymbol
Symbols\ErrorMethodSymbol.cs (1)
104
public override Symbol
ContainingSymbol
Symbols\ErrorPropertySymbol.cs (1)
42
public override Symbol
ContainingSymbol
{ get { return _containingSymbol; } }
Symbols\ErrorTypeSymbol.cs (1)
241
public override Symbol?
ContainingSymbol
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (1)
42
public override Symbol
ContainingSymbol
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
817
public override Symbol?
ContainingSymbol
=> null;
Symbols\FunctionPointers\FunctionPointerParameterSymbol.cs (1)
29
public override Symbol
ContainingSymbol
=> _containingSymbol;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
79
public override Symbol?
ContainingSymbol
=> null;
Symbols\FunctionTypeSymbol.cs (1)
110
public override Symbol?
ContainingSymbol
=> null;
Symbols\LabelSymbol.cs (1)
153
public override Symbol
ContainingSymbol
Symbols\MergedNamespaceSymbol.cs (1)
250
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEEventSymbol.cs (1)
217
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
162
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (1)
34
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
444
public override Symbol
ContainingSymbol
=> _containingType;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
218
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
606
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (1)
84
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
513
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
398
public override Symbol
ContainingSymbol
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
137
public override Symbol
ContainingSymbol
Symbols\MissingModuleSymbol.cs (1)
89
public override Symbol
ContainingSymbol
Symbols\MissingNamespaceSymbol.cs (1)
48
public override Symbol
ContainingSymbol
Symbols\NativeIntegerTypeSymbol.cs (4)
42
public override Symbol
ContainingSymbol
=> _underlyingType.ContainingSymbol;
343
public override Symbol
ContainingSymbol
=> _container;
417
public override Symbol
ContainingSymbol
=> _container;
468
public override Symbol
ContainingSymbol
=> _container;
Symbols\PointerTypeSymbol.cs (1)
173
public override Symbol?
ContainingSymbol
Symbols\RangeVariableSymbol.cs (1)
135
public override Symbol
ContainingSymbol
Symbols\ReducedExtensionMethodSymbol.cs (2)
452
public override Symbol
ContainingSymbol
628
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
132
public override Symbol?
ContainingSymbol
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
65
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
195
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
160
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
214
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
145
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
63
public sealed override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
192
public override Symbol
ContainingSymbol
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
55
public override Symbol
ContainingSymbol
Symbols\SignatureOnlyMethodSymbol.cs (1)
91
public override Symbol
ContainingSymbol
{ get { return _containingType; } }
Symbols\SignatureOnlyParameterSymbol.cs (1)
93
public override Symbol
ContainingSymbol
{ get { throw ExceptionUtilities.Unreachable(); } }
Symbols\SignatureOnlyPropertySymbol.cs (1)
62
public override Symbol
ContainingSymbol
{ get { return _containingType; } }
Symbols\Source\CrefTypeParameterSymbol.cs (1)
169
public override Symbol
ContainingSymbol
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
184
public override Symbol
ContainingSymbol
Symbols\Source\LambdaSymbol.cs (1)
254
public override Symbol
ContainingSymbol
Symbols\Source\LocalFunctionSymbol.cs (1)
328
public sealed override Symbol
ContainingSymbol
=> _containingSymbol;
Symbols\Source\SourceEventSymbol.cs (1)
93
public sealed override Symbol
ContainingSymbol
Symbols\Source\SourceFieldSymbol.cs (1)
98
public sealed override Symbol
ContainingSymbol
Symbols\Source\SourceFixedFieldSymbol.cs (1)
163
public override Symbol
ContainingSymbol
Symbols\Source\SourceLocalSymbol.cs (1)
259
public override Symbol
ContainingSymbol
Symbols\Source\SourceMemberContainerSymbol.cs (1)
763
public sealed override Symbol
ContainingSymbol
Symbols\Source\SourceMemberMethodSymbol.cs (1)
492
public sealed override Symbol
ContainingSymbol
Symbols\Source\SourceModuleSymbol.cs (1)
431
public override Symbol
ContainingSymbol
Symbols\Source\SourceNamespaceSymbol.cs (1)
70
public override Symbol
ContainingSymbol
Symbols\Source\SourceParameterSymbolBase.cs (1)
57
public sealed override Symbol
ContainingSymbol
Symbols\Source\SourcePropertySymbolBase.cs (1)
503
public override Symbol
ContainingSymbol
Symbols\Source\SourceTypeParameterSymbol.cs (3)
479
public override Symbol
ContainingSymbol
626
public override Symbol
ContainingSymbol
889
public override Symbol
ContainingSymbol
Symbols\Source\ThisParameterSymbol.cs (1)
171
public override Symbol
ContainingSymbol
Symbols\SubstitutedEventSymbol.cs (1)
38
public override Symbol
ContainingSymbol
Symbols\SubstitutedFieldSymbol.cs (1)
38
public override Symbol
ContainingSymbol
Symbols\SubstitutedMethodSymbol.cs (1)
189
public sealed override Symbol
ContainingSymbol
Symbols\SubstitutedNamedTypeSymbol.cs (1)
121
public sealed override Symbol
ContainingSymbol
Symbols\SubstitutedParameterSymbol.cs (1)
40
public override Symbol
ContainingSymbol
Symbols\SubstitutedPropertySymbol.cs (1)
39
public override Symbol
ContainingSymbol
Symbols\SubstitutedTypeParameterSymbol.cs (1)
41
public override Symbol
ContainingSymbol
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
144
public override Symbol
ContainingSymbol
=> _containingType;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
49
public override Symbol
ContainingSymbol
=> _containingType;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (1)
45
public override Symbol
ContainingSymbol
=> _containingType;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
821
public override Symbol?
ContainingSymbol
=> _containingModule.GlobalNamespace;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
62
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
148
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
213
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
76
public override Symbol
ContainingSymbol
=> _namespace;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
62
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
145
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
77
public sealed override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
93
public override Symbol
ContainingSymbol
=> _namespace;
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
115
public sealed override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (2)
69
public override Symbol?
ContainingSymbol
=> _containingModule.GlobalNamespace;
237
public override Symbol
ContainingSymbol
=> _container;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
55
public sealed override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
54
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
312
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedLocal.cs (1)
128
public sealed override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
130
public override Symbol?
ContainingSymbol
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
62
public override Symbol
ContainingSymbol
=> _globalNamespace;
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
48
public override Symbol
ContainingSymbol
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
22
public override Symbol
ContainingSymbol
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
57
public override Symbol
ContainingSymbol
Symbols\SynthesizedNamespaceSymbol.cs (1)
55
public override Symbol
ContainingSymbol
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (1)
91
public override Symbol
ContainingSymbol
Symbols\Tuples\TupleFieldSymbol.cs (1)
117
public sealed override Symbol
ContainingSymbol
Symbols\UpdatedContainingSymbolLocal.cs (1)
40
public override Symbol
ContainingSymbol
{ get; }
218 references to ContainingSymbol
Microsoft.CodeAnalysis.CSharp (218)
Binder\Binder.CapturedParametersFinder.cs (1)
155
if (candidate is ParameterSymbol parameter && parameter.
ContainingSymbol
== (object)_primaryConstructor)
Binder\Binder.ValueChecks.cs (5)
1135
parameterSymbol.
ContainingSymbol
is SynthesizedPrimaryConstructor primaryConstructor &&
2993
Debug.Assert(underlyingParameter.
ContainingSymbol
is MethodSymbol);
3029
get { return _underlyingParameter.
ContainingSymbol
; }
5725
if (!IsAnyReadOnly(addressKind) && containingSymbol is MethodSymbol {
ContainingSymbol
: NamedTypeSymbol, IsEffectivelyReadOnly: true })
5895
if (!TypeSymbol.Equals(field.ContainingType, containingSymbol.
ContainingSymbol
as NamedTypeSymbol, TypeCompareKind.AllIgnoreOptions))
Binder\Binder_Constraints.cs (4)
410
Symbol containingSymbol = typeParameter.
ContainingSymbol
;
465
MethodSymbol method => (TypeSymbol)method.
ContainingSymbol
,
556
typeWithAnnotations.DefaultType is TypeParameterSymbol typeParameterInConstraint && typeParameterInConstraint.
ContainingSymbol
== (object)typeParameter.
ContainingSymbol
)
Binder\Binder_Expressions.cs (14)
454
if (field is { IsStatic: false, RefKind: RefKind.None,
ContainingSymbol
: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } &&
487
var binder = new LocalScopeBinder(this.WithContainingMemberOrLambda(parameter.
ContainingSymbol
).WithAdditionalFlags(BinderFlags.ParameterDefaultValue));
489
parameter.
ContainingSymbol
,
1727
if (symbol.
ContainingSymbol
is NamedTypeSymbol { OriginalDefinition: var symbolContainerDefinition } &&
1771
shadowedParameter.
ContainingSymbol
== (object)primaryConstructor)
1935
if ((object)containingMethod != null && (object)symbol.
ContainingSymbol
!= (object)containingMethod)
1938
Debug.Assert(!symbol.
ContainingSymbol
.Equals(containingMethod));
2075
var primaryCtor = parameter.
ContainingSymbol
as SynthesizedPrimaryConstructor;
2222
(object)containingMember.
ContainingSymbol
!= primaryCtor.ContainingSymbol); // The member doesn't belong to our type, i.e. from nested type
2227
if (symbol.
ContainingSymbol
is SynthesizedSimpleProgramEntryPointSymbol &&
2354
containingMember = containingMember.
ContainingSymbol
;
2494
if (thisSymbol is not null && thisSymbol.
ContainingSymbol
!= ContainingMemberOrLambda && thisSymbol.RefKind != RefKind.None)
3168
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.
ContainingSymbol
.Kind == SymbolKind.NamedType)
5095
parameter.
ContainingSymbol
== (object)primaryConstructor)
Binder\Binder_Lookup.cs (3)
661
x = x.
ContainingSymbol
;
662
y = y.
ContainingSymbol
;
1652
for (Symbol s = symbol; (object)s != null; s = s.
ContainingSymbol
)
Binder\Binder_NameConflicts.cs (2)
25
=> symbol.TryGetFirstLocation() ?? symbol.
ContainingSymbol
.GetFirstLocation();
143
return containingMemberOrLambda.
ContainingSymbol
?.Kind == SymbolKind.NamedType &&
Binder\Binder_Operators.cs (1)
2649
if (parameterSymbol.
ContainingSymbol
is SynthesizedPrimaryConstructor primaryConstructor &&
Binder\Binder_Patterns.cs (3)
887
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.
ContainingSymbol
.Kind == SymbolKind.NamedType)
952
type.
ContainingSymbol
is var declContainer && declContainer.Kind == SymbolKind.Namespace && declContainer.Name == "System" &&
953
(declContainer.
ContainingSymbol
as NamespaceSymbol)?.IsGlobalNamespace == true;
Binder\Binder_Symbols.cs (5)
1490
if (colorColorValueReceiver is BoundParameter { ParameterSymbol: {
ContainingSymbol
: SynthesizedPrimaryConstructor primaryConstructor } parameter } &&
1872
if (aLocationsCount == 0 && bLocationsCount == 0) return Compare(fst.
ContainingSymbol
, snd.
ContainingSymbol
);
1876
int containerResult = Compare(fst.
ContainingSymbol
, snd.
ContainingSymbol
);
Binder\BinderFactory.cs (1)
129
if (memberOpt is {
ContainingSymbol
: SourceMemberContainerTypeSymbol container })
Binder\ContextualAttributeBinder.cs (1)
54
for (; (object)symbol != null; symbol = symbol.
ContainingSymbol
)
Binder\LocalBinderFactory.cs (2)
327
switch (parameter.
ContainingSymbol
)
341
switch (typeParameter.
ContainingSymbol
)
Binder\RefSafetyAnalysis.cs (2)
178
Debug.Assert(_localEscapeScopes?.ContainsKey(local) == true || _symbol != local.
ContainingSymbol
);
430
_symbol != node.LocalSymbol.
ContainingSymbol
);
Binder\Semantics\AccessCheck.cs (1)
80
symbol = symbol.
ContainingSymbol
;
Binder\Semantics\Conversions\ConversionsBase.cs (1)
3243
ContainingSymbol
: { Kind: SymbolKind.Namespace },
BoundTree\BoundInlineArrayAccess.cs (4)
22
ContainingSymbol
: NamespaceSymbol
25
ContainingSymbol
: NamespaceSymbol { IsGlobalNamespace: true }
52
ContainingSymbol
: NamespaceSymbol
55
ContainingSymbol
: NamespaceSymbol { IsGlobalNamespace: true }
CodeGen\EmitExpression.cs (1)
1383
if (!sym.
ContainingSymbol
.IsStatic)
Compilation\CSharpCompilation.cs (2)
3584
Debug.Assert(symbol.
ContainingSymbol
.Kind == SymbolKind.Namespace); // avoid unnecessary traversal of nested types
4719
symbol = symbol.
ContainingSymbol
;
Compiler\ClsComplianceChecker.cs (1)
680
Symbol container = parameters[0].
ContainingSymbol
;
Compiler\DocumentationCommentCompiler.cs (1)
1197
if (!parameter.
ContainingSymbol
.IsAccessor() && !documentedParameters.Add(parameter))
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
552
Symbol containingSymbol = memberSymbol.
ContainingSymbol
;
606
currentSymbol = currentSymbol.
ContainingSymbol
;
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (4)
153
Symbol containingSymbol = symbol.
ContainingSymbol
;
178
if ((object)symbol.
ContainingSymbol
!= null && symbol.
ContainingSymbol
.Name.Length != 0)
180
Visit(symbol.
ContainingSymbol
, builder);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
248
var otherContainer = Visit(@namespace.
ContainingSymbol
);
320
var otherContainer = this.Visit(sourceType.
ContainingSymbol
);
438
var otherContainer = Visit(symbol.
ContainingSymbol
);
Emitter\Model\PEModuleBuilder.cs (1)
1393
var container = param.
ContainingSymbol
;
Emitter\Model\TypeParameterSymbolAdapter.cs (8)
65
if (AdaptedTypeParameterSymbol.
ContainingSymbol
.Kind == SymbolKind.Method)
80
if (AdaptedTypeParameterSymbol.
ContainingSymbol
.Kind == SymbolKind.Method)
100
if (AdaptedTypeParameterSymbol.
ContainingSymbol
.Kind == SymbolKind.NamedType)
115
if (AdaptedTypeParameterSymbol.
ContainingSymbol
.Kind == SymbolKind.NamedType)
222
return ((MethodSymbol)AdaptedTypeParameterSymbol.
ContainingSymbol
).GetCciAdapter();
231
return ((NamedTypeSymbol)AdaptedTypeParameterSymbol.
ContainingSymbol
).GetCciAdapter();
347
return ((MethodSymbol)AdaptedTypeParameterSymbol.
ContainingSymbol
).GetCciAdapter();
356
return ((NamedTypeSymbol)AdaptedTypeParameterSymbol.
ContainingSymbol
).GetCciAdapter();
FlowAnalysis\DataFlowsOutWalker.cs (1)
234
param.
ContainingSymbol
is SynthesizedPrimaryConstructor); // Primary constructor parameter can be used in other initializers and methods
FlowAnalysis\DefiniteAssignment.cs (6)
340
case MethodSymbol { IsStatic: false,
ContainingSymbol
: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } and
356
case (FieldSymbol or PropertySymbol) and { IsStatic: false,
ContainingSymbol
: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } }:
689
!(captured is ParameterSymbol {
ContainingSymbol
: SynthesizedPrimaryConstructor primaryConstructor } parameter &&
746
if (symbol is ParameterSymbol {
ContainingSymbol
: SynthesizedPrimaryConstructor } parameter)
1837
Symbol containing = current.
ContainingSymbol
;
1945
if (!parameter.IsThis && parameter.RefKind != RefKind.Out && parameter.
ContainingSymbol
is SynthesizedPrimaryConstructor primaryCtor)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
167
symbol = symbol.
ContainingSymbol
;
FlowAnalysis\EmptyStructTypeCache.cs (1)
254
for (; symbol != null && symbol.Kind != SymbolKind.Namespace; symbol = symbol.
ContainingSymbol
)
FlowAnalysis\NullableWalker.cs (9)
2107
var container = method.
ContainingSymbol
;
2125
if (symbol is ParameterSymbol {
ContainingSymbol
: SynthesizedPrimaryConstructor primaryConstructor } parameter &&
2134
enclosingMemberMethod = enclosingMemberMethod.
ContainingSymbol
as MethodSymbol;
2138
methodThisParameter?.
ContainingSymbol
.
ContainingSymbol
== (object)primaryConstructor.ContainingSymbol &&
2242
var containingSymbol = parameterOpt?.
ContainingSymbol
;
6598
if (parameter.
ContainingSymbol
.GetTypeOrReturnType().Type.SpecialType != SpecialType.System_Boolean)
7121
while (current.
ContainingSymbol
is MethodSymbol container)
10089
parameter.
ContainingSymbol
is not SynthesizedPrimaryConstructor primaryConstructor || !primaryConstructor.GetCapturedParameters().ContainsKey(parameter):
FlowAnalysis\NullableWalker.Variables.cs (2)
217
Debug.Assert(!(method.
ContainingSymbol
is MethodSymbol containingMethod) ||
359
if (symbol.
ContainingSymbol
is MethodSymbol method &&
FlowAnalysis\ReadWriteWalker.cs (1)
102
Symbol containing = current.
ContainingSymbol
;
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (3)
632
Debug.Assert(symbol.
ContainingSymbol
!= null);
633
if (symbol.
ContainingSymbol
!= _currentFunction.OriginalMethodSymbol)
641
while (function != null && symbol.
ContainingSymbol
!= function.OriginalMethodSymbol)
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (1)
139
public override Symbol ContainingSymbol => TopLevelMethod.
ContainingSymbol
;
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
142
for (Symbol? enclosingSymbol = currentFunction; enclosingSymbol is MethodSymbol enclosingMethod; enclosingSymbol = enclosingSymbol.
ContainingSymbol
)
176
for (Symbol? enclosingSymbol = currentFunction; enclosingSymbol is MethodSymbol enclosingMethod; enclosingSymbol = enclosingSymbol.
ContainingSymbol
)
Lowering\LocalRewriter\DynamicSiteContainer.cs (1)
26
get { return _topLevelMethod.
ContainingSymbol
; }
Lowering\LocalRewriter\LocalRewriter.cs (1)
314
if (node.ParameterSymbol.
ContainingSymbol
is SynthesizedPrimaryConstructor primaryCtor &&
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
624
return expression is BoundParameter { ParameterSymbol: {
ContainingSymbol
: SynthesizedPrimaryConstructor primaryCtor } parameter } &&
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (3)
111
Debug.Assert(!allVariables.Any((s, method) => s.Symbol is ParameterSymbol {
ContainingSymbol
: var container } && container != method && container is not SynthesizedPrimaryConstructor, method));
121
!(symbol is ParameterSymbol {
ContainingSymbol
: var container } && container != method)) // Not interested in force hoisting parameters that do not belong to our method
287
if (node.ParameterSymbol.
ContainingSymbol
== topLevelMethod)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (4)
388
var xOwner = x.
ContainingSymbol
;
389
var yOwner = y.
ContainingSymbol
;
407
var other = symbol.
ContainingSymbol
;
414
other = other.
ContainingSymbol
;
Symbols\Compilation_WellKnownMembers.cs (2)
1192
if (typeParam.
ContainingSymbol
.Kind != SymbolKind.Method)
1206
if (typeParam.
ContainingSymbol
.Kind != SymbolKind.NamedType)
Symbols\ConstraintsHelper.cs (5)
173
if (constraintTypeParameter.
ContainingSymbol
== typeParameter.
ContainingSymbol
)
245
if (underlyingTypeParameter.
ContainingSymbol
== typeParameter.
ContainingSymbol
)
1042
Debug.Assert(ReferenceEquals(typeParameter.
ContainingSymbol
, containingSymbol.OriginalDefinition));
Symbols\ConstructedMethodSymbol.cs (1)
19
: base(containingSymbol: constructedFrom.
ContainingSymbol
,
Symbols\ConstructedNamedTypeSymbol.cs (1)
63
: base(newContainer: constructedFrom.
ContainingSymbol
,
Symbols\EventSymbol.cs (1)
263
Debug.Assert(ReferenceEquals(newOwner.OriginalDefinition, this.
ContainingSymbol
.OriginalDefinition));
Symbols\FieldSymbol.cs (1)
330
Debug.Assert(ReferenceEquals(newOwner.OriginalDefinition, this.
ContainingSymbol
.OriginalDefinition));
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
375
s = s.
ContainingSymbol
;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
316
var accessSymbol = containingSymbol.Kind == SymbolKind.Property ? containingSymbol.
ContainingSymbol
: containingSymbol;
Symbols\MethodSymbol.cs (2)
890
Debug.Assert(ReferenceEquals(newOwner.OriginalDefinition, this.
ContainingSymbol
.OriginalDefinition));
1064
method = method.
ContainingSymbol
as MethodSymbol;
Symbols\ModuleSymbol.cs (1)
43
return (AssemblySymbol)
ContainingSymbol
;
Symbols\NamedTypeSymbol.cs (3)
118
return this.
ContainingSymbol
as NamedTypeSymbol;
1355
Debug.Assert(ReferenceEquals(newOwner.OriginalDefinition, this.
ContainingSymbol
.OriginalDefinition));
1639
ContainingSymbol
?.Kind == SymbolKind.Namespace &&
Symbols\NativeIntegerTypeSymbol.cs (2)
42
public override Symbol ContainingSymbol => _underlyingType.
ContainingSymbol
;
82
Debug.Assert(_underlyingType.Equals(underlyingMember.
ContainingSymbol
));
Symbols\ObsoleteAttributeHelpers.cs (1)
91
symbol = symbol.
ContainingSymbol
;
Symbols\ParameterSymbol.cs (1)
164
(refKind == RefKind.Ref &&
ContainingSymbol
.ContainingType.IsComImport));
Symbols\PropertySymbol.cs (1)
382
Debug.Assert(ReferenceEquals(newOwner.OriginalDefinition, this.
ContainingSymbol
.OriginalDefinition));
Symbols\PublicModel\Symbol.cs (1)
67
return UnderlyingSymbol.
ContainingSymbol
.GetPublicSymbol();
Symbols\ReducedExtensionMethodSymbol.cs (2)
264
if (reducedFromTypeParameter.
ContainingSymbol
!= _reducedFrom)
454
get { return _reducedFrom.
ContainingSymbol
; }
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
136
return this.RetargetingTranslator.Retarget(_underlyingEvent.
ContainingSymbol
);
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
69
return this.RetargetingTranslator.Retarget(_underlyingField.
ContainingSymbol
);
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
199
return this.RetargetingTranslator.Retarget(_underlyingMethod.
ContainingSymbol
);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (2)
218
return this.RetargetingTranslator.Retarget(_underlyingType.
ContainingSymbol
);
260
Debug.Assert((object)_underlyingType == underlyingResult.
ContainingSymbol
);
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
149
return this.RetargetingTranslator.Retarget(_underlyingNamespace.
ContainingSymbol
);
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
67
return this.RetargetingModule.RetargetingTranslator.Retarget(_underlyingParameter.
ContainingSymbol
);
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
196
return this.RetargetingTranslator.Retarget(_underlyingProperty.
ContainingSymbol
);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
322
if (type.
ContainingSymbol
.Kind != SymbolKind.NamedType &&
1048
Debug.Assert((object)typeParameter.
ContainingSymbol
== _toFind);
1060
if ((object)containingType == typeParameter.
ContainingSymbol
)
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
59
return this.RetargetingTranslator.Retarget(_underlyingTypeParameter.
ContainingSymbol
);
Symbols\Source\LocalFunctionSymbol.cs (3)
440
if (tpEnclosing.
ContainingSymbol
.Kind == SymbolKind.Method)
447
Debug.Assert(tpEnclosing.
ContainingSymbol
.Kind == SymbolKind.NamedType);
451
diagnostics.Add(typeError, location, name, tpEnclosing.
ContainingSymbol
);
Symbols\Source\ParameterHelpers.cs (2)
196
parameter.RefKind, parameter.
ContainingSymbol
, thisKeyword, paramsKeyword, firstDefault, diagnostics);
907
for (Symbol current = symbol; (object)current != null; current = current.
ContainingSymbol
)
Symbols\Source\SourceAssemblySymbol.cs (1)
2840
string fullEmittedName = MetadataHelpers.BuildQualifiedName(originalDefinition.
ContainingSymbol
.ToDisplayString(SymbolDisplayFormat.QualifiedNameOnlyFormat),
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1643
if (ContainingSymbol.
ContainingSymbol
is NamedTypeSymbol) // No need to check for lambdas or local function
Symbols\Source\SourceMethodSymbol.cs (1)
44
if (
ContainingSymbol
is SourceMethodSymbol method)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
425
if (
ContainingSymbol
is SourceMemberContainerTypeSymbol { AnyMemberHasAttributes: false })
829
for (MethodSymbol? current = this; current is object; current = current.
ContainingSymbol
as MethodSymbol)
1469
if (
ContainingSymbol
is NamedTypeSymbol { IsComImport: true, TypeKind: TypeKind.Class or TypeKind.Interface })
Symbols\Source\SourceTypeParameterSymbol.cs (8)
128
var sourceMethod = this.
ContainingSymbol
as SourceOrdinaryMethodSymbol;
183
var sourceMethod = this.
ContainingSymbol
as SourceOrdinaryMethodSymbol;
189
binderOpt: (
ContainingSymbol
as LocalFunctionSymbol)?.WithTypeParametersBinder);
224
Debug.Assert(!inProgress.Any() || ReferenceEquals(inProgress.Head.ContainingSymbol, this.
ContainingSymbol
));
287
switch (this.
ContainingSymbol
)
297
throw ExceptionUtilities.UnexpectedValue(this.
ContainingSymbol
);
368
Debug.Assert(this.
ContainingSymbol
.IsContainingSymbolOfAllTypeParameters(this.EffectiveBaseClassNoUseSiteDiagnostics));
369
Debug.Assert(this.
ContainingSymbol
.IsContainingSymbolOfAllTypeParameters(this.DeducedBaseTypeNoUseSiteDiagnostics));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
705
(object)p.
ContainingSymbol
== containingType &&
Symbols\Source\TypeParameterConstraintClause.cs (4)
169
Symbol container = thisTypeParameter.
ContainingSymbol
;
176
if (type is TypeParameterSymbol typeParameter && (object)typeParameter.
ContainingSymbol
== (object)container)
229
Symbol container = thisTypeParameter.
ContainingSymbol
;
238
if ((object)typeParameter.
ContainingSymbol
== (object)container)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
56
ContainingSymbol.OriginalDefinition != _underlyingTypeParameter.
ContainingSymbol
.OriginalDefinition ? this :
Symbols\Symbol.cs (13)
118
Symbol container = this.
ContainingSymbol
;
149
for (var container = this.
ContainingSymbol
; (object)container != null; container = container.
ContainingSymbol
)
172
var container = this.
ContainingSymbol
;
218
return
ContainingSymbol
?.DeclaringCompilation;
311
ISymbolInternal ISymbolInternal.ContainingSymbol => this.
ContainingSymbol
;
343
var container = this.
ContainingSymbol
;
937
return this.
ContainingSymbol
.IsDefinedInSourceTree(tree, definedWithinSpan, cancellationToken);
1023
if (
ContainingSymbol
is SourceMemberContainerTypeSymbol container)
1618
return GetLocalNullableContextValue() ??
ContainingSymbol
?.GetNullableContextValue();
1693
byte containingValue =
ContainingSymbol
?.GetNullableContextValue() ?? 0;
1746
for (var currentFunction = variable.
ContainingSymbol
;
1748
currentFunction = currentFunction.
ContainingSymbol
)
Symbols\Symbol_Attributes.cs (1)
957
this.
ContainingSymbol
?.ForceCompleteObsoleteAttribute();
Symbols\SymbolExtensions.cs (6)
131
var containingSymbol = symbol.
ContainingSymbol
;
151
containingMember = containingMember.
ContainingSymbol
;
172
symbol = method.
ContainingSymbol
;
253
var symbol = type.
ContainingSymbol
;
254
for (; ((object?)containingSymbol != null) && (containingSymbol.Kind != SymbolKind.Namespace); containingSymbol = containingSymbol.
ContainingSymbol
)
367
Symbol? containingSymbol = symbol.
ContainingSymbol
;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (3)
63
=> ParameterSymbol.
ContainingSymbol
.
ContainingSymbol
;
66
=> ParameterSymbol.
ContainingSymbol
.ContainingType;
Symbols\Synthesized\SynthesizedContainer.cs (3)
62
if (
ContainingSymbol
.Kind == SymbolKind.NamedType &&
ContainingSymbol
.IsImplicitlyDeclared)
67
var compilation =
ContainingSymbol
.DeclaringCompilation;
Symbols\Tuples\TupleTypeSymbol.cs (1)
1083
Debug.Assert((object)underlyingAssociatedField.
ContainingSymbol
== TupleUnderlyingType);
Symbols\TypeMap.cs (2)
122
bool synthesized = !ReferenceEquals(oldTypeParameters[0].
ContainingSymbol
.OriginalDefinition, newOwner.OriginalDefinition);
183
oldOwner = oldOwner.
ContainingSymbol
.OriginalDefinition as MethodSymbol;
Symbols\TypeParameterSymbol.cs (5)
127
return this.
ContainingSymbol
as MethodSymbol;
138
return this.
ContainingSymbol
as NamedTypeSymbol;
673
return other.
ContainingSymbol
.ContainingType.Equals(this.
ContainingSymbol
.ContainingType, comparison);
678
return Hash.Combine(
ContainingSymbol
, Ordinal);
Symbols\TypeSymbolExtensions.cs (9)
352
return p.
ContainingSymbol
.Kind == SymbolKind.Method;
483
if (IsNamespaceName(type.
ContainingSymbol
, s_expressionsNamespaceName))
499
if (IsNamespaceName(type.
ContainingSymbol
, s_expressionsNamespaceName) &&
561
symbol = symbol.
ContainingSymbol
;
1010
for (Symbol s2 = sym2; s2.Kind != SymbolKind.Namespace; s2 = s2.
ContainingSymbol
)
1215
(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.
ContainingSymbol
== (object)parameterContainer;
1233
(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.
ContainingSymbol
is MethodSymbol;
1763
methodOrType = methodOrType.
ContainingSymbol
;
1777
var container = type.
ContainingSymbol
;
Symbols\UpdatedContainingSymbolLocal.cs (1)
70
ContainingSymbol.Equals(otherLocal.
ContainingSymbol
, compareKind));