20 overrides of Kind
Microsoft.CodeAnalysis.CSharp (20)
Symbols\AliasSymbol.cs (1)
101
public override SymbolKind
Kind
Symbols\ArrayTypeSymbol.cs (1)
288
public override SymbolKind
Kind
Symbols\AssemblySymbol.cs (1)
196
public sealed override SymbolKind
Kind
Symbols\DiscardSymbol.cs (1)
31
public override SymbolKind
Kind
=> SymbolKind.Discard;
Symbols\DynamicTypeSymbol.cs (1)
54
public override SymbolKind
Kind
Symbols\EventSymbol.cs (1)
238
public sealed override SymbolKind
Kind
Symbols\FieldSymbol.cs (1)
186
public sealed override SymbolKind
Kind
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
79
public override SymbolKind
Kind
=> SymbolKind.FunctionPointerType;
Symbols\FunctionTypeSymbol.cs (1)
110
public override SymbolKind
Kind
=> SymbolKindInternal.FunctionType;
Symbols\LabelSymbol.cs (1)
164
public override SymbolKind
Kind
Symbols\LocalSymbol.cs (1)
189
public sealed override SymbolKind
Kind
Symbols\MethodSymbol.cs (1)
640
public sealed override SymbolKind
Kind
Symbols\ModuleSymbol.cs (1)
58
public sealed override SymbolKind
Kind
Symbols\NamedTypeSymbol.cs (1)
769
public override SymbolKind
Kind
// Cannot seal this method because of the ErrorSymbol.
Symbols\NamespaceSymbol.cs (1)
120
public sealed override SymbolKind
Kind
Symbols\ParameterSymbol.cs (1)
260
public sealed override SymbolKind
Kind
Symbols\PointerTypeSymbol.cs (1)
159
public override SymbolKind
Kind
Symbols\PropertySymbol.cs (1)
336
public sealed override SymbolKind
Kind
Symbols\RangeVariableSymbol.cs (1)
40
public override SymbolKind
Kind
Symbols\TypeParameterSymbol.cs (1)
187
public sealed override SymbolKind
Kind
679 references to Kind
Microsoft.CodeAnalysis.CSharp (679)
Binder\Binder.cs (9)
427
RoslynDebug.Assert(member is null || member.
Kind
!= SymbolKind.ErrorType);
445
switch (containingMember?.
Kind
)
604
switch (symbol.
Kind
)
643
RoslynDebug.Assert(symbol.
Kind
== SymbolKind.NamedType ||
644
symbol.
Kind
== SymbolKind.Field ||
645
symbol.
Kind
== SymbolKind.Method ||
646
symbol.
Kind
== SymbolKind.Event ||
647
symbol.
Kind
== SymbolKind.Property);
651
if (symbol.
Kind
== SymbolKind.Method)
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
290
Debug.Assert(symbol.
Kind
!= SymbolKind.Method);
291
treatAsInstanceMemberAccess = !(symbol.IsStatic || symbol.
Kind
== SymbolKind.NamedType);
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (2)
39
internal bool IsAlias => _symbol?.
Kind
== SymbolKind.Alias;
47
Debug.Assert(_symbol?.
Kind
== SymbolKind.Alias); // Not meaningful to use this property otherwise
Binder\Binder.ValueChecks.cs (6)
1454
if (containing.
Kind
== SymbolKind.Method)
1461
else if (containing.
Kind
== SymbolKind.Field)
1657
&& symbol.
Kind
!= SymbolKind.Event
1932
Debug.Assert(member.
Kind
!= SymbolKind.Property);
1933
Debug.Assert(member.
Kind
!= SymbolKind.Event);
3375
var symbolKind = symbol.
Kind
.Localize();
Binder\Binder_AnonymousTypes.cs (2)
124
if (symbol.
Kind
== SymbolKind.Property)
191
switch (member.
Kind
)
Binder\Binder_Attributes.cs (4)
531
if (namedArgumentNameSymbol.
Kind
== SymbolKind.Property)
609
if (namedArgumentNameSymbol.
Kind
== SymbolKind.ErrorType)
626
switch (namedArgumentNameSymbol.
Kind
)
947
switch (typeOfArgument.
Kind
)
Binder\Binder_Await.cs (1)
154
switch (containingMemberOrLambda.
Kind
)
Binder\Binder_Constraints.cs (2)
34
Debug.Assert((containingSymbol.
Kind
== SymbolKind.NamedType) || (containingSymbol.
Kind
== SymbolKind.Method));
Binder\Binder_Crefs.cs (8)
51
if (result.
Kind
== SymbolKind.ErrorType)
101
if ((object?)containerOpt != null && containerOpt.
Kind
== SymbolKind.TypeParameter)
663
if (s.
Kind
!= SymbolKind.Method)
722
if (symbol.
Kind
== SymbolKind.TypeParameter)
737
else if (symbol.
Kind
== SymbolKind.TypeParameter)
790
switch (candidate.
Kind
)
840
throw ExceptionUtilities.UnexpectedValue(candidate.
Kind
);
934
if (symbol.
Kind
== SymbolKind.Method)
Binder\Binder_Expressions.cs (31)
40
inStaticContext = memberOpt.
Kind
== SymbolKind.Field || memberOpt.
Kind
== SymbolKind.Method || memberOpt.
Kind
== SymbolKind.Property;
505
Debug.Assert(this.ContainingMemberOrLambda.
Kind
== SymbolKind.Method
506
|| this.ContainingMemberOrLambda.
Kind
== SymbolKind.Property
1419
if (type.IsUnboundGenericType() || type.
Kind
== SymbolKind.TypeParameter)
1665
bool isNamedType = (symbol.
Kind
== SymbolKind.NamedType) || (symbol.
Kind
== SymbolKind.ErrorType);
1769
this.ContainingMember() is {
Kind
: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member
1990
if (symbol.
Kind
is not (SymbolKind.Event or SymbolKind.Property))
1995
switch (symbol.
Kind
)
2126
this.ContainingMember() is not {
Kind
: not SymbolKind.NamedType, IsStatic: false } || // We are not in an instance member
2238
_ => throw ExceptionUtilities.UnexpectedValue(alias.Target.
Kind
),
2246
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
2269
this.ContainingMember() is not {
Kind
: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member
2328
(containingMember.
Kind
!= SymbolKind.NamedType || currentType.IsScriptClass);
2398
if (containingMember.
Kind
== SymbolKind.NamedType)
3218
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.
Kind
== SymbolKind.NamedType)
3294
if (containingSymbol.
Kind
== SymbolKind.Method
3312
if (member.
Kind
== SymbolKind.Field &&
7513
switch (leftSymbol.
Kind
)
7830
else if (sym.
Kind
== SymbolKind.Namespace)
7836
Debug.Assert(sym.
Kind
== SymbolKind.NamedType);
8052
throw ExceptionUtilities.UnexpectedValue(extensionMember.
Kind
);
8281
if (symbols.Length > 0 && symbols[0].
Kind
== SymbolKind.Method)
8324
switch (symbolOpt.
Kind
)
8434
Debug.Assert(symbol.
Kind
!= SymbolKind.Method);
8435
left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.
Kind
== SymbolKind.NamedType, diagnostics);
8439
if (symbol.
Kind
is not (SymbolKind.Event or SymbolKind.Property))
8444
switch (symbol.
Kind
)
8494
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
Binder\Binder_Invocation.cs (2)
370
else if (boundExpression.Type?.
Kind
== SymbolKind.FunctionPointerType)
2118
if (parameterType?.
Kind
== SymbolKind.NamedType &&
Binder\Binder_Lookup.cs (16)
375
if (existingDefinition.
Kind
!= SymbolKind.NamedType || arity == 0)
416
lookingForOverloadsOfKind = firstSymbol.
Kind
;
771
if (symbol.
Kind
== SymbolKind.NamedType)
1376
return symbol.
Kind
== SymbolKind.Method || symbol.IsIndexer();
1385
else if (nsOrType.
Kind
== SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder)
1409
else if (nsOrType.
Kind
== SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder)
1480
var unwrappedSymbol = symbol.
Kind
== SymbolKind.Alias
1637
switch (symbol.
Kind
)
1654
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
1671
Debug.Assert(symbol.
Kind
!= SymbolKind.Alias, "It is the caller's responsibility to unwrap aliased symbols.");
1708
else if ((options & LookupOptions.MustNotBeNamespace) != 0 && (symbol.
Kind
== SymbolKind.Namespace))
1799
switch (symbol.
Kind
)
1820
switch (symbol.
Kind
)
1840
switch (symbol.
Kind
)
1857
switch (symbol.
Kind
)
1906
diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_TypeArgsNotAllowed, symbol, symbol.
Kind
.Localize()) : null;
Binder\Binder_NameConflicts.cs (2)
157
switch (containingMemberOrLambda?.
Kind
)
164
return containingMemberOrLambda.ContainingSymbol?.
Kind
== SymbolKind.NamedType &&
Binder\Binder_Operators.cs (1)
1231
if (type.
Kind
!= SymbolKind.NamedType)
Binder\Binder_Patterns.cs (4)
561
if (strippedInputType.
Kind
is not SymbolKind.ErrorType and not SymbolKind.DynamicType and not SymbolKind.TypeParameter &&
887
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.
Kind
== SymbolKind.NamedType)
952
type.ContainingSymbol is var declContainer && declContainer.
Kind
== SymbolKind.Namespace && declContainer.Name == "System" &&
1491
member.Symbol is { Name: WellKnownMemberNames.LengthPropertyName or WellKnownMemberNames.CountPropertyName,
Kind
: SymbolKind.Property } memberSymbol)
Binder\Binder_Statements.cs (4)
1849
if (destinationType.
Kind
== SymbolKind.ArrayType)
2961
return symbol?.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningTask(this.Compilation);
2967
return symbol?.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningGenericTask(this.Compilation);
2973
if (symbol?.
Kind
== SymbolKind.Method)
Binder\Binder_Symbols.cs (15)
266
if (symbol.
Kind
!= SymbolKind.Alias)
590
if (left.
Kind
== SymbolKind.NamedType)
916
if (bindingResult.
Kind
== SymbolKind.Alias)
969
if (((AliasSymbol)s).Target.
Kind
== SymbolKind.NamedType) return true;
1094
if (symbol.
Kind
== SymbolKind.Alias)
1135
if (symbol.
Kind
== SymbolKind.Alias)
1335
if (((object)qualifierOpt != null) && (qualifierOpt.
Kind
== SymbolKind.TypeParameter))
1619
bool isLeftUnboundGenericType = left.
Kind
== SymbolKind.NamedType &&
1894
if (snd.
Kind
!= fst.
Kind
) return (int)fst.
Kind
- (int)snd.
Kind
;
1923
if (symbol.
Kind
== SymbolKind.NamedType)
2341
((object)qualifierOpt == null || qualifierOpt.
Kind
!= SymbolKind.ErrorType)) // Suppress cascading.
2717
if (contextualAttributeBinder is { AttributeTarget: {
Kind
: SymbolKind.Assembly } })
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
596
if (sym.
Kind
!= kind)
Binder\ContextualAttributeBinder.cs (1)
56
switch (symbol.
Kind
)
Binder\ExecutableCodeBinder.cs (3)
42
(memberSymbol.
Kind
!= SymbolKind.Local && memberSymbol.
Kind
!= SymbolKind.RangeVariable && memberSymbol.
Kind
!= SymbolKind.Parameter));
Binder\ForEachLoopBinder.cs (5)
952
if (collectionExprType.
Kind
== SymbolKind.DynamicType && isAsync)
959
if (collectionExprType.
Kind
== SymbolKind.ArrayType || collectionExprType.
Kind
== SymbolKind.DynamicType)
1407
if (member.
Kind
!= SymbolKind.Method)
1696
if (lookupSymbol.IsStatic || lookupSymbol.DeclaredAccessibility != Accessibility.Public || lookupSymbol.
Kind
!= SymbolKind.Property)
Binder\HostObjectModeBinder.cs (2)
36
if (hostObjectType.
Kind
== SymbolKind.ErrorType)
55
if (hostObjectType.
Kind
!= SymbolKind.ErrorType)
Binder\ImportChain.cs (1)
110
if (target.
Kind
== SymbolKind.Namespace)
Binder\InContainerBinder.cs (2)
54
get { return (_container.
Kind
== SymbolKind.NamedType) && ((NamedTypeSymbol)_container).IsScriptClass; }
82
if (_container.
Kind
== SymbolKind.Namespace)
Binder\InMethodBinder.cs (4)
148
if (refKind == RefKind.None && returnType.
Kind
== SymbolKind.NamedType)
179
if (refKind == RefKind.None && returnType.
Kind
== SymbolKind.NamedType)
251
SymbolKind parameterKind = parameter.
Kind
;
254
SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.
Kind
;
Binder\LocalBinderFactory.cs (4)
137
Debug.Assert(containingMemberOrLambda.
Kind
!= SymbolKind.Local && containingMemberOrLambda.
Kind
!= SymbolKind.RangeVariable && containingMemberOrLambda.
Kind
!= SymbolKind.Parameter);
296
=> target.
Kind
== SymbolKind.Method ? new WithMethodTypeParametersBinder((MethodSymbol)target, enclosing) : null;
Binder\LocalScopeBinder.cs (1)
504
SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.
Kind
;
Binder\MethodGroupResolution.cs (1)
50
Debug.Assert(((object)otherSymbol == null) || (otherSymbol.
Kind
!= SymbolKind.Method));
Binder\Semantics\AccessCheck.cs (5)
71
switch (symbol.
Kind
)
83
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
149
switch (symbol.
Kind
)
215
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
239
if (typeArg.Type.
Kind
!= SymbolKind.TypeParameter && !IsSymbolAccessibleCore(typeArg.Type, within, null, out unused, compilation, ref useSiteInfo, basesBeingResolved))
Binder\Semantics\Conversions\ConversionsBase.cs (10)
830
return (source.
Kind
== SymbolKind.DynamicType) ? Conversion.ExplicitDynamic : Conversion.ExplicitReference;
1281
if (destination.
Kind
== SymbolKind.NamedType)
1333
if (destination.
Kind
== SymbolKind.NamedType)
2527
return expressionType?.
Kind
== SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer();
2537
return source.
Kind
== SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer();
2643
if (destination.SpecialType == SpecialType.System_Object || destination.
Kind
== SymbolKind.DynamicType)
3241
ContainingSymbol: {
Kind
: SymbolKind.Namespace },
3294
if (destination.
Kind
== SymbolKind.DynamicType)
3345
if (destination.
Kind
== SymbolKind.DynamicType)
3469
else if (source.
Kind
== SymbolKind.DynamicType && destination.IsReferenceType)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
725
if (target.Type.
Kind
!= SymbolKind.NamedType)
921
if (formalType.Type.
Kind
!= SymbolKind.NamedType)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
1459
switch (member.
Kind
)
1466
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
3366
if (targetType.
Kind
!= SymbolKind.NamedType)
4750
switch (member.
Kind
)
4757
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
903
Debug.Assert(badMember.
Kind
== SymbolKind.Method);
Binder\WithLambdaParametersBinder.cs (1)
126
SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.
Kind
;
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
92
switch (nsOrType.NamespaceOrType.
Kind
)
190
switch (symbol.
Kind
)
BoundTree\BoundExpressionExtensions.cs (1)
73
var s => throw ExceptionUtilities.UnexpectedValue(s?.
Kind
)
BoundTree\BoundTreeRewriter.cs (2)
120
switch (symbol.
Kind
)
151
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
BoundTree\UnboundLambda.cs (1)
409
bool hasErrors = !types.IsDefault && types.Any(static t => t.Type?.
Kind
== SymbolKind.ErrorType);
BoundTree\VariablePendingInference.cs (2)
48
switch (this.VariableSymbol.
Kind
)
110
throw ExceptionUtilities.UnexpectedValue(this.VariableSymbol.
Kind
);
Compilation\CSharpCompilation.cs (4)
2406
within0.
Kind
== SymbolKind.Assembly ?
3078
if (symbol.
Kind
== SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor)
3632
Debug.Assert(symbol.ContainingSymbol.
Kind
== SymbolKind.Namespace); // avoid unnecessary traversal of nested types
4761
switch (symbol.
Kind
)
Compilation\CSharpSemanticModel.cs (7)
1577
if ((object)container == null || container.
Kind
== SymbolKind.Namespace)
1595
if ((object)containingType != null && containingType.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)containingType).IsScriptClass)
2377
if (symbol.
Kind
== SymbolKind.Alias)
3750
switch (containingMember.
Kind
)
3771
switch (containingMember.
Kind
)
3787
throw ExceptionUtilities.UnexpectedValue(containingMember.
Kind
);
4601
if (((object)otherSymbol != null) && (otherSymbol.
Kind
== SymbolKind.Method))
Compilation\InitializerSemanticModel.cs (4)
148
switch (this.MemberSymbol.
Kind
)
182
throw ExceptionUtilities.UnexpectedValue(this.MemberSymbol.
Kind
);
275
switch (MemberSymbol.
Kind
)
286
throw ExceptionUtilities.UnexpectedValue(MemberSymbol.
Kind
);
Compilation\LexicalOrderSymbolComparer.cs (2)
44
comparison = x.
Kind
.ToSortOrder() - y.
Kind
.ToSortOrder();
Compilation\SyntaxTreeSemanticModel.cs (3)
259
Debug.Assert(symbols.All(s => s.
Kind
== SymbolKind.TypeParameter || s.
Kind
== SymbolKind.Parameter));
366
if ((object)result == null || result.
Kind
== SymbolKind.ErrorType)
Compiler\ClsComplianceChecker.cs (39)
422
SymbolKind symbolKind = symbol.
Kind
;
448
if (symbol.
Kind
== SymbolKind.NamedType)
506
else if (symbol.IsAbstract && symbol.
Kind
!= SymbolKind.NamedType)
589
if (symbol.
Kind
== SymbolKind.Method)
681
if (container.
Kind
== SymbolKind.Method)
684
if ((object)associated != null && associated.
Kind
== SymbolKind.Property)
717
switch (symbol.
Kind
)
757
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
810
if (symbol.
Kind
!= SymbolKind.Namespace)
828
(!member.IsOverride || !(member.
Kind
== SymbolKind.Method || member.
Kind
== SymbolKind.Property)))
844
(!member.IsOverride || !(member.
Kind
== SymbolKind.Method || member.
Kind
== SymbolKind.Property)))
889
bool isMethodOrProperty = symbol.
Kind
== SymbolKind.Method || symbol.
Kind
== SymbolKind.Property;
893
if (other.Name != symbolName && !(isMethodOrProperty && other.
Kind
== symbol.
Kind
))
910
if (symbol.
Kind
== other.
Kind
&&
962
if (symbol.
Kind
== SymbolKind.Namespace)
1116
System.Diagnostics.Debug.Assert(symbol.
Kind
== SymbolKind.NamedType || !((symbol is TypeSymbol)),
1119
if (symbol.
Kind
== SymbolKind.Namespace)
1124
else if (symbol.
Kind
== SymbolKind.Method)
1136
Debug.Assert(symbol.
Kind
!= SymbolKind.Alias);
1137
Debug.Assert(symbol.
Kind
!= SymbolKind.Label);
1138
Debug.Assert(symbol.
Kind
!= SymbolKind.Namespace);
1139
Debug.Assert(symbol.
Kind
!= SymbolKind.Parameter);
1140
Debug.Assert(symbol.
Kind
!= SymbolKind.RangeVariable);
1154
else if (symbol.
Kind
== SymbolKind.Assembly)
1165
return (symbol.
Kind
== SymbolKind.Assembly || symbol.
Kind
== SymbolKind.NamedType)
1172
System.Diagnostics.Debug.Assert(symbol.
Kind
!= SymbolKind.Assembly);
1246
System.Diagnostics.Debug.Assert(symbol.
Kind
== SymbolKind.ErrorType);
1269
return symbol.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)symbol).IsImplicitClass;
1321
System.Diagnostics.Debug.Assert(x.
Kind
== y.
Kind
);
1329
switch (x.
Kind
)
1350
throw ExceptionUtilities.UnexpectedValue(x.
Kind
);
1420
return arrayType.ElementType.
Kind
== SymbolKind.ArrayType;
Compiler\DocumentationCommentCompiler.cs (10)
142
symbol.
Kind
== SymbolKind.Event ||
143
symbol.
Kind
== SymbolKind.Field ||
144
symbol.
Kind
== SymbolKind.Method ||
145
symbol.
Kind
== SymbolKind.NamedType ||
146
symbol.
Kind
== SymbolKind.Property);
652
switch (symbol.
Kind
)
675
switch (symbol.
Kind
)
1123
if (symbol.
Kind
== SymbolKind.Alias)
1225
Debug.Assert(referencedSymbol.
Kind
== SymbolKind.Parameter);
1239
Debug.Assert(referencedSymbol.
Kind
== SymbolKind.TypeParameter);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
560
switch (memberSymbol.
Kind
)
588
switch (currentSymbol.
Kind
)
Compiler\MethodBodySynthesizer.cs (1)
600
if (member.
Kind
== SymbolKind.Method)
Compiler\MethodCompiler.cs (1)
505
switch (member.
Kind
)
Compiler\SynthesizedMetadataCompiler.cs (1)
93
switch (member.
Kind
)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
154
if (containingSymbol.
Kind
== SymbolKind.Method)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
70
if (member.
Kind
== SymbolKind.Field)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (10)
256
switch (otherContainer.
Kind
)
266
throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
);
327
switch (otherContainer.
Kind
)
362
throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
);
440
var otherTypeParameters = otherContainer.
Kind
switch
444
_ => throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
),
748
if (type.
Kind
!= other.
Kind
)
753
switch (type.
Kind
)
772
throw ExceptionUtilities.UnexpectedValue(type.
Kind
);
Emitter\Model\NamedTypeSymbolAdapter.cs (4)
325
if (member.
Kind
== SymbolKind.Method)
949
if (m.
Kind
== SymbolKind.Event)
1028
if (m.
Kind
== SymbolKind.Method)
1045
if (m.
Kind
== SymbolKind.Property)
Emitter\Model\PEModuleBuilder.cs (11)
347
switch (symbol.
Kind
)
358
switch (member.
Kind
)
366
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
381
switch (member.
Kind
)
426
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
433
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
568
if (member.
Kind
== SymbolKind.Namespace)
583
if (symbol.
Kind
== SymbolKind.NamedType)
1141
switch (typeSymbol.
Kind
)
1163
throw ExceptionUtilities.UnexpectedValue(typeSymbol.
Kind
);
1430
return container.
Kind
== SymbolKind.Method && ((MethodSymbol)container).IsGenericMethod ||
Emitter\Model\SymbolAdapter.cs (5)
68
(this.
Kind
== SymbolKind.Assembly && this is SourceAssemblySymbol) ||
69
(this.
Kind
== SymbolKind.NetModule && this is SourceModuleSymbol));
88
Debug.Assert(this.
Kind
!= SymbolKind.Assembly);
95
Debug.Assert(this.
Kind
!= SymbolKind.Assembly);
151
if (this.
Kind
== SymbolKind.Assembly)
Emitter\Model\TypeParameterSymbolAdapter.cs (4)
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)
Emitter\NoPia\EmbeddedEvent.cs (1)
133
if (m.
Kind
== SymbolKind.Method)
Emitter\NoPia\EmbeddedType.cs (1)
298
switch (s.
Kind
)
Emitter\NoPia\EmbeddedTypesManager.cs (3)
271
if (member.
Kind
!= SymbolKind.NamedType)
511
switch (propertyOrEvent.
Kind
)
520
throw ExceptionUtilities.UnexpectedValue(propertyOrEvent.
Kind
);
FlowAnalysis\AbstractFlowPass.cs (1)
3600
if (node.MemberSymbol?.
Kind
== SymbolKind.Property)
FlowAnalysis\DataFlowsInWalker.cs (1)
110
_dataFlowsIn.Add(symbol.
Kind
== SymbolKind.Field ? GetNonMemberSymbol(slot) : symbol);
FlowAnalysis\DataFlowsOutWalker.cs (1)
258
_dataFlowsOut.Add(symbol.
Kind
== SymbolKind.Field ? GetNonMemberSymbol(slot) : symbol);
FlowAnalysis\DefiniteAssignment.cs (16)
288
Debug.Assert(variableId.Symbol.
Kind
== SymbolKind.Field || variableId.Symbol.
Kind
== SymbolKind.Property || variableId.Symbol.
Kind
== SymbolKind.Event,
494
bool hasAssociatedProperty = associatedPropertyOrEvent?.
Kind
== SymbolKind.Property;
692
Debug.Assert(captured.
Kind
== SymbolKind.Parameter || captured.
Kind
== SymbolKind.Local || captured.
Kind
== SymbolKind.RangeVariable);
728
else if (variable.
Kind
!= SymbolKind.RangeVariable)
772
if ((object)_sourceAssembly != null && variable.
Kind
== SymbolKind.Field)
854
if ((object)_sourceAssembly != null && variable.
Kind
== SymbolKind.Field)
1216
symbol.
Kind
== SymbolKind.Local &&
1229
if (symbol.
Kind
== SymbolKind.Field)
1233
else if (symbol.
Kind
== SymbolKind.Parameter &&
1309
var hasAssociatedProperty = associatedSymbol?.
Kind
== SymbolKind.Property;
1807
while (current?.
Kind
is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property)
2668
if (symbol.
Kind
!= SymbolKind.Field)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
162
if (symbol.
Kind
== SymbolKind.Method &&
FlowAnalysis\DefiniteAssignment.VariableIdentifier.cs (1)
28
Debug.Assert(symbol.
Kind
switch
FlowAnalysis\EmptyStructTypeCache.cs (2)
193
switch (member.
Kind
)
254
for (; symbol != null && symbol.
Kind
!= SymbolKind.Namespace; symbol = symbol.ContainingSymbol)
FlowAnalysis\LocalDataFlowPass.cs (1)
105
if (symbol.
Kind
== SymbolKind.RangeVariable) return -1;
FlowAnalysis\NullableWalker.cs (16)
803
var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.
Kind
.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1143
switch (member.
Kind
)
1194
if (member.
Kind
!= SymbolKind.Field &&
1195
member.
Kind
!= SymbolKind.Property &&
1196
member.
Kind
!= SymbolKind.Event)
2006
switch (symbol.
Kind
)
2033
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
2206
if (container.
Kind
== SymbolKind.NamedType)
4608
if (members.Any(static m => m.
Kind
== SymbolKind.Field))
4614
if (members.Any(static m => m.
Kind
== SymbolKind.Property))
5637
if ((member is PropertySymbol { IsIndexedProperty: false } || member.
Kind
== SymbolKind.Field) &&
7485
switch (member.
Kind
)
7760
return (type.
Kind
== SymbolKind.TypeParameter && !type.IsReferenceType) || type.IsNullableTypeOrTypeParameter();
8472
if (symbol.
Kind
== SymbolKind.Method)
8489
int? memberIndex = symbol.
Kind
== SymbolKind.Property ? symbol.MemberIndexOpt : null;
11163
if (member.
Kind
== SymbolKind.Property)
FlowAnalysis\NullableWalker_Patterns.cs (1)
264
if (member.Symbol.
Kind
is not (SymbolKind.Property or SymbolKind.Field))
FlowAnalysis\ReadWriteWalker.cs (2)
81
while (current?.
Kind
is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property)
133
if (variable.
Kind
!= SymbolKind.Field) (IsInside ? _readInside : _readOutside).Add(variable);
FlowAnalysis\UnassignedVariablesWalker.cs (1)
59
if (symbol.
Kind
!= SymbolKind.Field)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
78
if (p.Variable?.
Kind
== SymbolKind.Local)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
479
if (member.
Kind
!= SymbolKind.Method)
507
if (member.
Kind
!= SymbolKind.Property)
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (1)
212
if (member.
Kind
== SymbolKind.Method)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
576
switch (variable.
Kind
)
597
throw ExceptionUtilities.UnexpectedValue(variable.
Kind
);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (6)
609
symbol.
Kind
== SymbolKind.Local ||
610
symbol.
Kind
== SymbolKind.Parameter ||
611
symbol.
Kind
== SymbolKind.Method);
657
if (symbol.
Kind
== SymbolKind.Method)
683
switch (capturedVariable.
Kind
)
694
Debug.Assert(capturedVariable.
Kind
== SymbolKind.Method);
Lowering\ClosureConversion\ClosureConversion.cs (2)
755
switch (symbol.
Kind
)
785
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (7)
911
switch (symbol.
Kind
)
920
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
926
switch (symbol.
Kind
)
935
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
963
builder.Add(_bound.StaticCall(sym.
Kind
is SymbolKind.Property ?
972
builder.Add(_bound.StaticCall(sym.
Kind
is SymbolKind.Property ?
981
builder.Add(_bound.StaticCall(sym.
Kind
is SymbolKind.Property ?
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
208
Debug.Assert(symbol.
Kind
== SymbolKind.Local || symbol.
Kind
== SymbolKind.Parameter || symbol is LocalFunctionSymbol);
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
206
var enumDelta = (targetSymbol.
Kind
== SymbolKind.Parameter) ?
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2107
if (exprType.
Kind
== SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
693
refKind = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.
Kind
== SymbolKind.TypeParameter ? RefKind.Ref : RefKind.None;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (5)
221
Debug.Assert(propertyOrEvent.
Kind
== SymbolKind.Property || propertyOrEvent.
Kind
== SymbolKind.Event);
261
var variableRepresentsLocation = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.
Kind
== SymbolKind.TypeParameter;
519
Debug.Assert(fieldOrEvent.
Kind
== SymbolKind.Field || fieldOrEvent.
Kind
== SymbolKind.Event);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
44
if (nodeExpressionType.
Kind
== SymbolKind.ArrayType)
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
84
if (argumentType.
Kind
== SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
705
switch (memberSymbol.
Kind
)
745
throw ExceptionUtilities.UnexpectedValue(memberSymbol.
Kind
);
Lowering\MethodToClassRewriter.cs (2)
378
if (member.
Kind
== SymbolKind.Property)
403
switch (member.
Kind
)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
211
var type = (variable.
Kind
== SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
260
switch (symbol.
Kind
)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
177
Debug.Assert(localOrParameter.
Kind
== SymbolKind.Local || localOrParameter.
Kind
== SymbolKind.Parameter);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
153
Debug.Assert(variable.
Kind
== SymbolKind.Local || variable.
Kind
== SymbolKind.Parameter);
155
if (variable.
Kind
== SymbolKind.Local)
Lowering\SynthesizedSubmissionFields.cs (1)
64
if ((object)hostObjectTypeSymbol != null && hostObjectTypeSymbol.
Kind
!= SymbolKind.ErrorType)
Lowering\SyntheticBoundNodeFactory.cs (1)
1791
if (exprType.
Kind
== SymbolKind.TypeParameter)
Operations\CSharpOperationFactory.cs (2)
867
switch (memberSymbol.
Kind
)
902
throw ExceptionUtilities.UnexpectedValue(memberSymbol.
Kind
);
Symbols\AbstractTypeMap.cs (1)
99
switch (previous.
Kind
)
Symbols\AliasSymbol.cs (1)
83
if (previousTarget.
Kind
!= SymbolKind.Namespace)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
784
if (member.
Kind
== SymbolKind.Method)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
117
switch (m.
Kind
)
Symbols\Attributes\AttributeData.cs (13)
290
if (foundMember.
Kind
== SymbolKind.Field || foundMember.
Kind
== SymbolKind.Property)
340
Debug.Assert(targetSymbol.
Kind
== SymbolKind.Assembly || targetSymbol.
Kind
== SymbolKind.NamedType || targetSymbol.
Kind
== SymbolKind.Method);
383
Debug.Assert(targetSymbol.
Kind
== SymbolKind.Assembly || targetSymbol.
Kind
== SymbolKind.NamedType || targetSymbol.
Kind
== SymbolKind.Method);
437
if (targetSymbol.
Kind
== SymbolKind.NamedType || targetSymbol.
Kind
== SymbolKind.Method)
451
if (targetSymbol.
Kind
== SymbolKind.Assembly)
556
if (members.Length == 1 && members[0].
Kind
== SymbolKind.Property)
682
switch (target.
Kind
)
Symbols\Attributes\SourceAttributeData.cs (2)
290
if (parameterType.
Kind
!= SymbolKind.NamedType && parameterType.
Kind
!= SymbolKind.ErrorType)
Symbols\BaseTypeAnalysis.cs (2)
184
switch (member.
Kind
)
195
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
Symbols\Compilation_WellKnownMembers.cs (12)
221
if (type.
Kind
!= SymbolKind.NamedType || type.TypeKind != TypeKind.Class)
295
if (member.
Kind
!= targetSymbolKind || member.IsStatic != isStatic ||
1073
if (type.
Kind
!= SymbolKind.ArrayType)
1097
if (type.
Kind
!= SymbolKind.NamedType)
1115
if (type.
Kind
!= SymbolKind.NamedType)
1148
return type.
Kind
== SymbolKind.PointerType ? ((PointerTypeSymbol)type).PointedAtType : null;
1158
if (type.
Kind
!= SymbolKind.ArrayType)
1187
if (type.
Kind
!= SymbolKind.TypeParameter)
1192
if (typeParam.ContainingSymbol.
Kind
!= SymbolKind.Method)
1201
if (type.
Kind
!= SymbolKind.TypeParameter)
1206
if (typeParam.ContainingSymbol.
Kind
!= SymbolKind.NamedType)
1215
if (type.
Kind
!= SymbolKind.ArrayType)
Symbols\ConstraintsHelper.cs (2)
587
if (type.
Kind
== SymbolKind.NamedType)
591
else if (type.
Kind
== SymbolKind.PointerType)
Symbols\ExtendedErrorTypeSymbol.cs (4)
36
(containingSymbol.
Kind
== SymbolKind.Namespace) ||
37
(containingSymbol.
Kind
== SymbolKind.NamedType) ||
38
(containingSymbol.
Kind
== SymbolKind.ErrorType));
314
switch (symbol.
Kind
)
Symbols\MemberSignatureComparer.cs (7)
426
if (member1 is null || member2 is null || member1.
Kind
!= member2.
Kind
)
537
hash = Hash.Combine((int)member.
Kind
, hash);
553
if (member.
Kind
!= SymbolKind.Field)
866
switch (member.
Kind
)
874
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
880
return member.
Kind
== SymbolKind.Method && ((MethodSymbol)member).IsVararg;
Symbols\MemberSymbolExtensions.cs (36)
37
switch (member.
Kind
)
46
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
55
switch (member.
Kind
)
64
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
70
switch (member.
Kind
)
78
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
85
switch (member.
Kind
)
302
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
319
switch (member.
Kind
)
328
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
334
switch (member.
Kind
)
344
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
365
switch (symbol.
Kind
)
396
return symbol.
Kind
== SymbolKind.Method && IsAccessor((MethodSymbol)symbol);
412
return symbol.
Kind
== SymbolKind.Method && IsOperator((MethodSymbol)symbol);
417
return symbol.
Kind
== SymbolKind.Property && ((PropertySymbol)symbol).IsIndexer;
422
return symbol.
Kind
== SymbolKind.Property && ((PropertySymbol)symbol).IsIndexedProperty;
427
return symbol.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion;
454
switch (m.
Kind
)
470
throw ExceptionUtilities.UnexpectedValue(m.
Kind
);
503
switch (s.
Kind
)
516
throw ExceptionUtilities.UnexpectedValue(s.
Kind
);
525
switch (symbol.
Kind
)
558
switch (symbol.
Kind
)
570
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
576
switch (symbol.
Kind
)
588
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
769
switch (member.
Kind
)
846
switch (member.
Kind
)
857
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
863
switch (member.
Kind
)
878
switch (member.
Kind
)
887
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
893
switch (member.
Kind
)
914
switch (member.
Kind
)
930
if (member.
Kind
== SymbolKind.Method)
Symbols\MergedNamespaceSymbol.cs (1)
142
if (childSymbol.
Kind
== SymbolKind.Namespace)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
151
switch (type.
Kind
)
Symbols\Metadata\PE\MetadataDecoder.cs (5)
216
switch (symbol.
Kind
)
268
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
316
Debug.Assert(ReferenceEquals(newresult, result) || (newresult.
Kind
== SymbolKind.ErrorType));
544
Debug.Assert(scope.
Kind
== SymbolKind.NamedType || scope.
Kind
== SymbolKind.ErrorType);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (11)
550
while (s.
Kind
!= SymbolKind.Namespace)
1160
if (staticIndex < staticFields.Length && staticFields[staticIndex].
Kind
== SymbolKind.Field)
1176
Debug.Assert(staticIndex == staticFields.Length || staticFields[staticIndex].
Kind
!= SymbolKind.Field);
1267
if (members[index].
Kind
!= SymbolKind.Method)
1285
if (index >= members.Length || members[index].
Kind
!= SymbolKind.Method)
1313
if (index == members.Length || members[index].
Kind
!= SymbolKind.Method)
1574
Debug.Assert(field.AssociatedSymbol.
Kind
== SymbolKind.Event);
1609
Debug.Assert(previous.
Kind
.ToSortOrder() <= current.
Kind
.ToSortOrder());
2702
if (members[i].
Kind
== kind)
2725
if (member.
Kind
!= kind)
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
316
var accessSymbol = containingSymbol.
Kind
== SymbolKind.Property ? containingSymbol.ContainingSymbol : containingSymbol;
1201
_ => throw ExceptionUtilities.UnexpectedValue(this.ContainingSymbol.
Kind
)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
106
return this.ContainingSymbol.
Kind
== SymbolKind.Method
253
if (_containingSymbol.
Kind
== SymbolKind.Method)
609
var typeParameters = (_containingSymbol.
Kind
== SymbolKind.Method) ?
670
bool inherited = (_containingSymbol.
Kind
== SymbolKind.Method) && ((MethodSymbol)_containingSymbol).IsOverride;
Symbols\Metadata\PE\SymbolFactory.cs (1)
93
if (arg.Key.
Kind
== SymbolKind.ErrorType &&
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
157
switch (type.
Kind
)
Symbols\MethodSymbolExtensions.cs (2)
105
switch (hidingMember.
Kind
)
116
throw ExceptionUtilities.UnexpectedValue(hidingMember.
Kind
);
Symbols\MissingMetadataTypeSymbol.cs (1)
255
if (symbol.
Kind
== SymbolKind.Namespace) // VB should also check name casing.
Symbols\MissingNamespaceSymbol.cs (1)
68
if (_containingSymbol.
Kind
== SymbolKind.NetModule)
Symbols\NamedTypeSymbol.cs (4)
315
if (candidate.
Kind
== SymbolKind.Property)
350
if (member.
Kind
== SymbolKind.Method)
712
switch (symbol.
Kind
)
1650
ContainingSymbol?.
Kind
== SymbolKind.Namespace &&
Symbols\NamespaceOrTypeSymbol.cs (2)
43
return
Kind
== SymbolKind.Namespace;
262
if (scope.
Kind
== SymbolKind.ErrorType)
Symbols\NamespaceSymbol.cs (1)
271
if (sym.
Kind
== SymbolKind.Namespace)
Symbols\ObsoleteAttributeHelpers.cs (1)
63
if (symbol.
Kind
== SymbolKind.Field)
Symbols\OverriddenOrHiddenMembersHelpers.cs (29)
86
Debug.Assert(member.
Kind
== SymbolKind.Method || member.
Kind
== SymbolKind.Property || member.
Kind
== SymbolKind.Event);
100
if (associatedPropertyOrEvent.
Kind
== SymbolKind.Property)
106
Debug.Assert(associatedPropertyOrEvent.
Kind
== SymbolKind.Event);
255
if (hiddenByProperty.
Kind
== SymbolKind.Property)
347
if (hiddenByEvent.
Kind
== SymbolKind.Event)
559
SymbolKind memberKind = member.
Kind
;
573
else if (otherMember.
Kind
!= memberKind)
678
if (otherMember.
Kind
== currTypeBestMatch.
Kind
&& !ReferenceEquals(otherMember, currTypeBestMatch))
716
bool needToSearchForRelated = representativeMember.
Kind
!= SymbolKind.Field && representativeMember.
Kind
!= SymbolKind.NamedType &&
756
if (hiddenMember.
Kind
!= SymbolKind.Method || ((MethodSymbol)hiddenMember).CanBeHiddenByMember(hidingMember))
792
Debug.Assert(representativeMember.
Kind
== SymbolKind.Property || !representativeMember.ContainingType.IsDefinition);
798
if (otherMember.
Kind
== representativeMember.
Kind
)
854
Debug.Assert(representativeMember.
Kind
!= SymbolKind.Field);
855
Debug.Assert(representativeMember.
Kind
!= SymbolKind.NamedType);
856
Debug.Assert(representativeMember.
Kind
== SymbolKind.Property || !representativeMember.ContainingType.IsDefinition);
861
if (otherMember.
Kind
== representativeMember.
Kind
)
873
switch (member.
Kind
)
883
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
889
switch (member.
Kind
)
905
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
911
switch (member.
Kind
)
923
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
1034
if (otherMember.
Kind
== SymbolKind.Method &&
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (2)
38
bool INamespaceOrTypeSymbol.IsNamespace => UnderlyingSymbol.
Kind
== SymbolKind.Namespace;
40
bool INamespaceOrTypeSymbol.IsType => UnderlyingSymbol.
Kind
!= SymbolKind.Namespace;
Symbols\PublicModel\Symbol.cs (1)
195
SymbolKind ISymbol.Kind => UnderlyingSymbol.
Kind
;
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
85
if (s.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)s).IsExplicitDefinitionOfNoPiaLocalType)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (7)
164
Debug.Assert(symbol.
Kind
!= SymbolKind.NamedType || ((NamedTypeSymbol)symbol).PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive);
322
if (type.ContainingSymbol.
Kind
!= SymbolKind.NamedType &&
645
switch (symbol.
Kind
)
686
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
1031
if (retargetedMember.
Kind
== SymbolKind.Method)
1097
if (retargetedMember.
Kind
== SymbolKind.Property)
1116
if (retargetedMember.
Kind
== SymbolKind.Event)
Symbols\Source\ExplicitInterfaceHelpers.cs (5)
257
if (interfaceMember.
Kind
!= implementingMember.
Kind
|| !interfaceMember.IsImplementableInterfaceMember())
314
switch (implementedMember.
Kind
)
390
if (collisionCandidateMember.
Kind
== implementingMember.
Kind
&& implementedMember != collisionCandidateMember)
Symbols\Source\LocalFunctionSymbol.cs (2)
446
if (tpEnclosing.ContainingSymbol.
Kind
== SymbolKind.Method)
453
Debug.Assert(tpEnclosing.ContainingSymbol.
Kind
== SymbolKind.NamedType);
Symbols\Source\ModifierUtils.cs (1)
496
(symbol.
Kind
!= SymbolKind.Method || (modifiers & DeclarationModifiers.Partial) == 0) &&
Symbols\Source\ParameterHelpers.cs (1)
1039
if (current.
Kind
== SymbolKind.Method)
Symbols\Source\SourceAssemblySymbol.cs (5)
1113
if (member.
Kind
== SymbolKind.Namespace)
2073
switch (member.
Kind
)
2088
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
2237
if (forwardedType.
Kind
!= SymbolKind.NamedType)
2732
if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.
Kind
== SymbolKind.Event)
Symbols\Source\SourceEventSymbol.cs (1)
776
if (interfaceMember.
Kind
== SymbolKind.Event && //quick check (necessary, not sufficient)
Symbols\Source\SourceMemberContainerSymbol.cs (9)
273
if (ContainingSymbol.
Kind
== SymbolKind.Namespace &&
304
if (containingSymbol.
Kind
== SymbolKind.Namespace)
452
switch (this.ContainingSymbol.
Kind
)
1531
switch (m.
Kind
)
2025
if (symbol.
Kind
== SymbolKind.NamedType ||
2069
if (symbol.
Kind
!= SymbolKind.Method || lastSym.
Kind
!= SymbolKind.Method)
2071
if (symbol.
Kind
!= SymbolKind.Field || !symbol.IsImplicitlyDeclared)
2080
if (lastSym.
Kind
== SymbolKind.Method)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (23)
103
if (abstractMember.
Kind
== SymbolKind.Method && abstractMember is not SynthesizedRecordOrdinaryMethod)
139
SymbolKind interfaceMemberKind = interfaceMember.
Kind
;
426
if (interfacePropertyOrEvent.
Kind
== SymbolKind.Event && implementingPropertyOrEvent.
Kind
== SymbolKind.Event &&
533
switch (member.
Kind
)
659
sourceField.AssociatedSymbol.
Kind
!= SymbolKind.Event);
672
Debug.Assert(symbol.
Kind
== SymbolKind.Field || symbol.
Kind
== SymbolKind.NamedType);
704
if (hiddenMember.
Kind
== SymbolKind.Method && !((MethodSymbol)hiddenMember).CanBeHiddenByMember(symbol))
752
var overridingMemberIsMethod = overridingMember.
Kind
== SymbolKind.Method;
753
var overridingMemberIsProperty = overridingMember.
Kind
== SymbolKind.Property;
754
var overridingMemberIsEvent = overridingMember.
Kind
== SymbolKind.Event;
809
else if (associatedPropertyOrEvent.
Kind
== SymbolKind.Property) //no specific errors for event accessors
871
var overridingMemberIsMethod = overridingMember.
Kind
== SymbolKind.Method;
872
var overridingMemberIsProperty = overridingMember.
Kind
== SymbolKind.Property;
873
var overridingMemberIsEvent = overridingMember.
Kind
== SymbolKind.Event;
884
Debug.Assert(overriddenMember.
Kind
== overridingMember.
Kind
);
1603
if (!hidingMemberIsNew && hiddenMember.
Kind
== hidingMember.
Kind
&&
1659
switch (hiddenMember.
Kind
)
1689
switch (hidingMember.
Kind
)
1824
if ((object)implementingMember == null || implementingMember.
Kind
!= SymbolKind.Method)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
473
if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.
Kind
== SymbolKind.Event)
Symbols\Source\SourceModuleSymbol.cs (2)
169
switch (s.
Kind
)
608
switch (member.
Kind
)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
93
if (containingSymbol.
Kind
== SymbolKind.NamedType)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (4)
769
if (imported.
Kind
== SymbolKind.Namespace)
789
else if (imported.
Kind
== SymbolKind.NamedType)
818
else if (imported.
Kind
is SymbolKind.ArrayType or SymbolKind.PointerType or SymbolKind.FunctionPointerType or SymbolKind.DynamicType)
827
else if (imported.
Kind
!= SymbolKind.ErrorType)
Symbols\Source\SourceParameterSymbol.cs (2)
111
Debug.Assert((owner.
Kind
== SymbolKind.Method) || (owner.
Kind
== SymbolKind.Property) || owner is TypeSymbol { IsExtension: true });
Symbols\SubstitutedNamedTypeSymbol.cs (2)
250
if (t.
Kind
== SymbolKind.NamedType)
300
if (t.
Kind
== SymbolKind.NamedType)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
65
if (_container.
Kind
== SymbolKind.Method)
Symbols\Symbol.cs (11)
198
switch (this.
Kind
)
632
switch (this.
Kind
)
703
throw ExceptionUtilities.UnexpectedValue(this.
Kind
);
726
if (this.
Kind
== SymbolKind.Method)
903
Debug.Assert(this.
Kind
== SymbolKind.NamedType || this.
Kind
== SymbolKind.Method);
1018
return $"{this.
Kind
} {this.ToDisplayString(s_debuggerDisplayFormat)}";
1211
switch (this.
Kind
)
1629
switch (this.
Kind
)
1705
switch (variable.
Kind
)
1741
throw ExceptionUtilities.UnexpectedValue(variable.
Kind
);
Symbols\Symbol_Attributes.cs (3)
45
switch (this.
Kind
)
910
Debug.Assert(this.
Kind
== SymbolKind.Method);
927
switch (this.
Kind
)
Symbols\SymbolDistinguisher.cs (6)
57
switch (symbol.
Kind
)
83
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
144
switch (symbol.
Kind
)
196
Debug.Assert(unwrappedSymbol.
Kind
== SymbolKind.DynamicType || unwrappedSymbol.
Kind
== SymbolKind.ErrorType || unwrappedSymbol.
Kind
== SymbolKind.FunctionPointerType);
Symbols\SymbolExtensions.cs (13)
122
return symbol.
Kind
.Localize();
134
switch (containingSymbol.
Kind
)
147
while (containingMember is object && containingMember.
Kind
== SymbolKind.Method)
164
switch (symbol.
Kind
)
201
switch (symbol.
Kind
)
241
for (; ((object?)containingSymbol != null) && (containingSymbol.
Kind
!= SymbolKind.Namespace); containingSymbol = containingSymbol.ContainingSymbol)
255
switch (symbol.
Kind
)
303
var upperLevelType = symbol.
Kind
== SymbolKind.NamedType ? (NamedTypeSymbol)symbol : symbol.ContainingType;
319
switch (symbol.
Kind
)
334
switch (symbol.
Kind
)
477
switch (symbol.
Kind
)
521
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
532
return symbol.
Kind
switch
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
104
if (m.
Kind
is SymbolKind.Property)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (5)
199
var value = member.
Kind
switch
203
_ => throw ExceptionUtilities.UnexpectedValue(member.
Kind
)
248
if (m.
Kind
is SymbolKind.Field && m is not TupleErrorFieldSymbol)
253
if (m.
Kind
is SymbolKind.Property)
303
if (member.
Kind
!= SymbolKind.Property)
Symbols\Synthesized\SynthesizedContainer.cs (2)
55
if (ContainingSymbol.
Kind
== SymbolKind.NamedType && ContainingSymbol.IsImplicitlyDeclared)
126
switch (m.
Kind
)
Symbols\Synthesized\SynthesizedSubstitutedTypeParameterSymbol.cs (2)
25
$"Container is {ContainingSymbol?.
Kind
}, TypeParameterKind is {this.TypeParameterKind}");
37
if (ContainingSymbol.
Kind
== SymbolKind.NamedType &&
Symbols\Tuples\TupleTypeSymbol.cs (5)
592
switch (member.
Kind
)
699
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
1015
if (member.
Kind
!= SymbolKind.Field)
1060
switch (member.
Kind
)
1090
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
Symbols\TypeSymbol.cs (20)
746
switch (interfaceMember.
Kind
)
816
Debug.Assert(interfaceMember.
Kind
== SymbolKind.Method || interfaceMember.
Kind
== SymbolKind.Property || interfaceMember.
Kind
== SymbolKind.Event);
1018
if (!canBeImplementedImplicitlyInCSharp9 && interfaceMember.
Kind
== SymbolKind.Method &&
1417
switch (interfaceMember.
Kind
)
1520
associated = implementation.
Kind
== SymbolKind.Method
1639
if (interfaceMember.
Kind
== SymbolKind.Method)
1689
if (interfaceMember.
Kind
== SymbolKind.Method)
1784
if (interfaceMember.
Kind
== SymbolKind.Event)
1925
switch (interfaceMember.
Kind
)
1973
throw ExceptionUtilities.UnexpectedValue(interfaceMember.
Kind
);
2020
switch (interfaceMember.
Kind
)
2036
throw ExceptionUtilities.UnexpectedValue(interfaceMember.
Kind
);
2040
switch (closestMismatch.
Kind
)
2199
if (member.
Kind
== interfaceMember.
Kind
)
2306
Debug.Assert(interfaceMember.
Kind
!= SymbolKind.Method || (object)interfaceMember == ((MethodSymbol)interfaceMember).ConstructedFrom);
2413
if (this.IsAbstract && member.IsAbstract && member.
Kind
!= SymbolKind.NamedType)
2419
switch (member.
Kind
)
Symbols\TypeSymbolExtensions.cs (10)
267
if (type.
Kind
== SymbolKind.ArrayType)
329
return type.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)type).IsInterface;
347
return type.
Kind
== SymbolKind.ErrorType;
352
return p.ContainingSymbol.
Kind
== SymbolKind.Method;
553
if (symbol.
Kind
!= SymbolKind.Namespace)
1011
for (Symbol s2 = sym2; s2.
Kind
!= SymbolKind.Namespace; s2 = s2.ContainingSymbol)
1744
switch (methodOrType.
Kind
)
1778
if (container.
Kind
!= SymbolKind.Namespace)
1917
switch (type.
Kind
)
2276
if (type.
Kind
== SymbolKind.NamedType)
Symbols\TypeUnification.cs (2)
109
switch (t1.Type.
Kind
)
267
switch (type.
Kind
)
Symbols\VarianceSafety.cs (2)
47
switch (member.
Kind
)
304
switch (type.
Kind
)
Utilities\TypeSymbolExtensions.cs (2)
29
switch (type.
Kind
)
95
switch (type.
Kind
)