Implemented interface member:
property
Kind
Microsoft.CodeAnalysis.Symbols.ISymbolInternal.Kind
20 overrides of Kind
Microsoft.CodeAnalysis.CSharp (20)
Symbols\AliasSymbol.cs (1)
102
public override SymbolKind
Kind
Symbols\ArrayTypeSymbol.cs (1)
287
public override SymbolKind
Kind
Symbols\AssemblySymbol.cs (1)
201
public sealed override SymbolKind
Kind
Symbols\DiscardSymbol.cs (1)
31
public override SymbolKind
Kind
=> SymbolKind.Discard;
Symbols\DynamicTypeSymbol.cs (1)
55
public override SymbolKind
Kind
Symbols\EventSymbol.cs (1)
239
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)
108
public override SymbolKind
Kind
=> SymbolKindInternal.FunctionType;
Symbols\LabelSymbol.cs (1)
166
public override SymbolKind
Kind
Symbols\LocalSymbol.cs (1)
199
public sealed override SymbolKind
Kind
Symbols\MethodSymbol.cs (1)
653
public sealed override SymbolKind
Kind
Symbols\ModuleSymbol.cs (1)
58
public sealed override SymbolKind
Kind
Symbols\NamedTypeSymbol.cs (1)
998
public override SymbolKind
Kind
// Cannot seal this method because of the ErrorSymbol.
Symbols\NamespaceSymbol.cs (1)
121
public sealed override SymbolKind
Kind
Symbols\ParameterSymbol.cs (1)
267
public sealed override SymbolKind
Kind
Symbols\PointerTypeSymbol.cs (1)
158
public override SymbolKind
Kind
Symbols\PropertySymbol.cs (1)
334
public sealed override SymbolKind
Kind
Symbols\RangeVariableSymbol.cs (1)
40
public override SymbolKind
Kind
Symbols\TypeParameterSymbol.cs (1)
188
public sealed override SymbolKind
Kind
761 references to Kind
Microsoft.CodeAnalysis.CSharp (761)
Binder\Binder.cs (9)
458
RoslynDebug.Assert(member is null || member.
Kind
!= SymbolKind.ErrorType);
476
switch (containingMember?.
Kind
)
637
switch (symbol.
Kind
)
676
RoslynDebug.Assert(symbol.
Kind
== SymbolKind.NamedType ||
677
symbol.
Kind
== SymbolKind.Field ||
678
symbol.
Kind
== SymbolKind.Method ||
679
symbol.
Kind
== SymbolKind.Event ||
680
symbol.
Kind
== SymbolKind.Property);
684
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)
1729
if (containing.
Kind
== SymbolKind.Method)
1736
else if (containing.
Kind
== SymbolKind.Field)
1940
&& symbol.
Kind
!= SymbolKind.Event
2217
Debug.Assert(member.
Kind
!= SymbolKind.Property);
2218
Debug.Assert(member.
Kind
!= SymbolKind.Event);
3670
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)
534
if (namedArgumentNameSymbol.
Kind
== SymbolKind.Property)
617
if (namedArgumentNameSymbol.
Kind
== SymbolKind.ErrorType)
634
switch (namedArgumentNameSymbol.
Kind
)
955
switch (typeOfArgument.
Kind
)
Binder\Binder_Await.cs (1)
158
switch (containingMemberOrLambda.
Kind
)
Binder\Binder_Constraints.cs (2)
35
Debug.Assert((containingSymbol.
Kind
== SymbolKind.NamedType) || (containingSymbol.
Kind
== SymbolKind.Method));
Binder\Binder_Crefs.cs (10)
53
if (result.
Kind
== SymbolKind.ErrorType)
103
if ((object?)containerOpt != null && containerOpt.
Kind
== SymbolKind.TypeParameter)
502
symbol.
Kind
!= SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType);
843
if (s.
Kind
!= SymbolKind.Method)
866
s.
Kind
!= SymbolKind.Method || ((MethodSymbol)s).Arity == 0);
902
if (symbol.
Kind
== SymbolKind.TypeParameter)
919
else if (symbol.
Kind
== SymbolKind.TypeParameter)
972
switch (candidate.
Kind
)
1022
throw ExceptionUtilities.UnexpectedValue(candidate.
Kind
);
1116
if (symbol.
Kind
== SymbolKind.Method)
Binder\Binder_Expressions.cs (41)
47
inStaticContext = memberOpt.
Kind
== SymbolKind.Field || memberOpt.
Kind
== SymbolKind.Method || memberOpt.
Kind
== SymbolKind.Property;
537
Debug.Assert(this.ContainingMemberOrLambda.
Kind
== SymbolKind.Method
538
|| this.ContainingMemberOrLambda.
Kind
== SymbolKind.Property
1451
if (type.IsUnboundGenericType() || type.
Kind
== SymbolKind.TypeParameter)
1726
bool isNamedType = (symbol.
Kind
== SymbolKind.NamedType) || (symbol.
Kind
== SymbolKind.ErrorType);
1838
this.ContainingMember() is {
Kind
: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member
2058
if (symbol.
Kind
is not (SymbolKind.Event or SymbolKind.Property))
2064
switch (symbol.
Kind
)
2094
this.ContainingMember() is null or {
Kind
: SymbolKind.NamedType } or { IsStatic: true } || // We are not in an instance member
2217
_ => throw ExceptionUtilities.UnexpectedValue(alias.Target.
Kind
),
2226
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
2345
this.ContainingMember() is not {
Kind
: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member
2404
(containingMember.
Kind
!= SymbolKind.NamedType || currentType.IsScriptClass);
2474
if (containingMember.
Kind
== SymbolKind.NamedType)
3294
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.
Kind
== SymbolKind.NamedType)
3370
if (containingSymbol.
Kind
== SymbolKind.Method
3388
if (member.
Kind
== SymbolKind.Field &&
7716
switch (leftSymbol.
Kind
)
8054
else if (sym.
Kind
== SymbolKind.Namespace)
8060
Debug.Assert(sym.
Kind
== SymbolKind.NamedType);
8077
Debug.Assert(symbols[0].
Kind
== SymbolKind.NamedType);
8278
throw ExceptionUtilities.UnexpectedValue(extensionMember.
Kind
);
8367
lookupResult.Symbols.All(s => s.
Kind
== SymbolKind.Method) ? lookupResult.Symbols.SelectAsArray(s_toMethodSymbolFunc) : ImmutableArray<MethodSymbol>.Empty,
8508
if (symbols.Length > 0 && symbols[0].
Kind
== SymbolKind.Method)
8551
switch (symbolOpt.
Kind
)
8671
Debug.Assert(symbol.
Kind
!= SymbolKind.Method);
8672
left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.
Kind
== SymbolKind.NamedType, diagnostics);
8676
if (symbol.
Kind
is not (SymbolKind.Event or SymbolKind.Property))
8682
switch (symbol.
Kind
)
8732
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
8870
Debug.Assert(arity == 0 || lookupResult.Symbols.All(s => s.
Kind
!= SymbolKind.Property));
9507
var kind = symbol.
Kind
;
9510
var existingKind = methodOrPropertyGroup[0].
Kind
;
9552
if ((methodOrPropertyGroup[0].
Kind
== SymbolKind.Method) || ((object)other == null))
9579
Debug.Assert(members.All(m => m.
Kind
== member.
Kind
));
9581
switch (member.
Kind
)
9605
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
Binder\Binder_Invocation.cs (2)
378
else if (boundExpression.Type?.
Kind
== SymbolKind.FunctionPointerType)
2191
if (parameterType?.
Kind
== SymbolKind.NamedType &&
Binder\Binder_Lookup.cs (23)
348
if (existingDefinition.
Kind
!= SymbolKind.NamedType || arity == 0)
389
lookingForOverloadsOfKind = firstSymbol.
Kind
;
394
if (submissionSymbols.Symbols.Count > 0 && submissionSymbols.Symbols.First().
Kind
!= lookingForOverloadsOfKind.Value)
722
if (symbol.
Kind
== SymbolKind.NamedType)
949
if (sym.
Kind
== SymbolKind.Method || sym.
Kind
== SymbolKind.Property)
986
if (sym.
Kind
== SymbolKind.Method || sym.
Kind
== SymbolKind.Property)
1336
return symbol.
Kind
== SymbolKind.Method || symbol.IsIndexer();
1345
else if (nsOrType.
Kind
== SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder)
1369
else if (nsOrType.
Kind
== SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder)
1440
var unwrappedSymbol = symbol.
Kind
== SymbolKind.Alias
1536
else if ((options & LookupOptions.MustNotBeNamespace) != 0 && unwrappedSymbol.
Kind
== SymbolKind.Namespace)
1541
else if ((options & LookupOptions.LabelsOnly) != 0 && unwrappedSymbol.
Kind
!= SymbolKind.Label)
1597
switch (symbol.
Kind
)
1614
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
1631
Debug.Assert(symbol.
Kind
!= SymbolKind.Alias, "It is the caller's responsibility to unwrap aliased symbols.");
1668
else if ((options & LookupOptions.MustNotBeNamespace) != 0 && (symbol.
Kind
== SymbolKind.Namespace))
1759
switch (symbol.
Kind
)
1780
switch (symbol.
Kind
)
1800
switch (symbol.
Kind
)
1817
switch (symbol.
Kind
)
1866
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_Patterns.cs (4)
1060
if (strippedInputType.
Kind
is not SymbolKind.ErrorType and not SymbolKind.DynamicType and not SymbolKind.TypeParameter &&
1494
if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.
Kind
== SymbolKind.NamedType)
1560
type.ContainingSymbol is var declContainer && declContainer.
Kind
== SymbolKind.Namespace && declContainer.Name == "System" &&
2155
member.Symbol is { Name: WellKnownMemberNames.LengthPropertyName or WellKnownMemberNames.CountPropertyName,
Kind
: SymbolKind.Property } memberSymbol)
Binder\Binder_Statements.cs (4)
1879
if (destinationType.
Kind
== SymbolKind.ArrayType)
2994
return symbol?.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningTask(this.Compilation);
3000
return symbol?.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningGenericTask(this.Compilation);
3006
if (symbol?.
Kind
== SymbolKind.Method)
Binder\Binder_Symbols.cs (40)
268
if (symbol.
Kind
!= SymbolKind.Alias)
594
if (left.
Kind
== SymbolKind.NamedType)
920
if (bindingResult.
Kind
== SymbolKind.Alias)
970
switch (s.
Kind
)
973
if (((AliasSymbol)s).Target.
Kind
== SymbolKind.NamedType) return true;
991
if (s.
Kind
== SymbolKind.Namespace)
1098
if (symbol.
Kind
== SymbolKind.Alias)
1139
if (symbol.
Kind
== SymbolKind.Alias)
1340
if (((object)qualifierOpt != null) && (qualifierOpt.
Kind
== SymbolKind.TypeParameter))
1460
switch (members[0].
Kind
)
1483
throw ExceptionUtilities.UnexpectedValue(members[0].
Kind
);
1675
bool isLeftUnboundGenericType = left.
Kind
== SymbolKind.NamedType &&
1971
if (snd.
Kind
!= fst.
Kind
) return (int)fst.
Kind
- (int)snd.
Kind
;
2000
if (symbol.
Kind
== SymbolKind.NamedType)
2073
if (srcSymbol.
Kind
== SymbolKind.Namespace && mdSymbol.
Kind
== SymbolKind.NamedType)
2084
else if (srcSymbol.
Kind
== SymbolKind.NamedType && mdSymbol.
Kind
== SymbolKind.Namespace)
2095
else if (srcSymbol.
Kind
== SymbolKind.NamedType && mdSymbol.
Kind
== SymbolKind.NamedType)
2109
Debug.Assert(!(srcSymbol.
Kind
== SymbolKind.Namespace && mdSymbol.
Kind
== SymbolKind.Namespace));
2144
if (first.
Kind
== SymbolKind.NamedType && second.
Kind
== SymbolKind.NamedType)
2186
else if (first.
Kind
== SymbolKind.Namespace && second.
Kind
== SymbolKind.NamedType)
2199
else if (first.
Kind
== SymbolKind.NamedType && second.
Kind
== SymbolKind.Namespace)
2250
else if (first.
Kind
== SymbolKind.RangeVariable && second.
Kind
== SymbolKind.RangeVariable)
2284
first.
Kind
== SymbolKind.NamedType &&
2285
second.
Kind
== SymbolKind.NamedType &&
2345
if (singleResult.
Kind
== SymbolKind.NamedType &&
2359
else if (singleResult.
Kind
== SymbolKind.ErrorType)
2418
((object)qualifierOpt == null || qualifierOpt.
Kind
!= SymbolKind.ErrorType)) // Suppress cascading.
2570
if (symbol.
Kind
== SymbolKind.Namespace)
2794
if (contextualAttributeBinder is { AttributeTarget: {
Kind
: SymbolKind.Assembly } })
Binder\Binder_Unsafe.cs (3)
144
if (symbol.
Kind
is SymbolKind.Method or SymbolKind.Property or SymbolKind.Event)
146
Debug.Fail($"Symbol {symbol} has {nameof(symbol.
Kind
)}={symbol.
Kind
}.");
Binder\Binder_XmlNameAttribute.cs (4)
45
Debug.Assert(lookupSymbols[0].
Kind
== SymbolKind.TypeParameter || lookupSymbols[0].
Kind
== SymbolKind.Parameter);
46
Debug.Assert(lookupSymbols.All(sym => sym.
Kind
== lookupSymbols[0].
Kind
));
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)
968
if (collectionExprType.
Kind
== SymbolKind.DynamicType && isAsync)
975
if (collectionExprType.
Kind
== SymbolKind.ArrayType || collectionExprType.
Kind
== SymbolKind.DynamicType)
1402
if (member.
Kind
!= SymbolKind.Method)
1698
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 (1)
54
get { return (_container.
Kind
== SymbolKind.NamedType) && ((NamedTypeSymbol)_container).IsScriptClass; }
Binder\InMethodBinder.cs (4)
149
if (refKind == RefKind.None && returnType.
Kind
== SymbolKind.NamedType)
180
if (refKind == RefKind.None && returnType.
Kind
== SymbolKind.NamedType)
252
SymbolKind parameterKind = parameter.
Kind
;
255
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)
844
return (source.
Kind
== SymbolKind.DynamicType) ? Conversion.ExplicitDynamic : Conversion.ExplicitReference;
1296
if (destination.
Kind
== SymbolKind.NamedType)
1348
if (destination.
Kind
== SymbolKind.NamedType)
2549
return expressionType?.
Kind
== SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer();
2559
return source.
Kind
== SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer();
2665
if (destination.SpecialType == SpecialType.System_Object || destination.
Kind
== SymbolKind.DynamicType)
3263
ContainingSymbol: {
Kind
: SymbolKind.Namespace },
3316
if (destination.
Kind
== SymbolKind.DynamicType)
3367
if (destination.
Kind
== SymbolKind.DynamicType)
3491
else if (source.
Kind
== SymbolKind.DynamicType && destination.IsReferenceType)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
727
if (target.Type.
Kind
!= SymbolKind.NamedType)
923
if (formalType.Type.
Kind
!= SymbolKind.NamedType)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (5)
1468
switch (member.
Kind
)
1475
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
3385
if (targetType.
Kind
!= SymbolKind.NamedType)
4785
switch (member.
Kind
)
4792
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
800
if (inferenceFailed.Member.
Kind
== SymbolKind.Method)
938
Debug.Assert(badMember.
Kind
== SymbolKind.Method);
Binder\WithLambdaParametersBinder.cs (1)
126
SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.
Kind
;
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
151
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)
426
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)
2509
within0.
Kind
== SymbolKind.Assembly ?
3188
if (symbol.
Kind
== SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor)
3819
Debug.Assert(symbol.ContainingSymbol.
Kind
== SymbolKind.Namespace); // avoid unnecessary traversal of nested types
4950
switch (symbol.
Kind
)
Compilation\CSharpSemanticModel.cs (13)
389
SymbolKind firstCandidateKind = symbols[0].
Kind
;
390
if (hasParameterList && symbols.All(s => s.
Kind
== firstCandidateKind))
1593
if ((object)container == null || container.
Kind
== SymbolKind.Namespace)
1611
if ((object)containingType != null && containingType.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)containingType).IsScriptClass)
1775
if (lookupResult.Symbols.Any(t => t.
Kind
== SymbolKind.NamedType || t.
Kind
== SymbolKind.Namespace || t.
Kind
== SymbolKind.ErrorType))
2380
if (symbol.
Kind
== SymbolKind.Alias)
3761
switch (containingMember.
Kind
)
3787
switch (containingMember.
Kind
)
3803
throw ExceptionUtilities.UnexpectedValue(containingMember.
Kind
);
4010
if (unwrappedSymbols.Count == 1 && unwrappedSymbols[0].
Kind
== SymbolKind.NamedType)
4617
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)
141
symbol.
Kind
== SymbolKind.Event ||
142
symbol.
Kind
== SymbolKind.Field ||
143
symbol.
Kind
== SymbolKind.Method ||
144
symbol.
Kind
== SymbolKind.NamedType ||
145
symbol.
Kind
== SymbolKind.Property);
755
switch (symbol.
Kind
)
778
switch (symbol.
Kind
)
1230
if (symbol.
Kind
== SymbolKind.Alias)
1332
Debug.Assert(referencedSymbol.
Kind
== SymbolKind.Parameter);
1346
Debug.Assert(referencedSymbol.
Kind
== SymbolKind.TypeParameter);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
560
switch (memberSymbol.
Kind
)
588
switch (currentSymbol.
Kind
)
Compiler\MethodBodySynthesizer.cs (1)
602
if (member.
Kind
== SymbolKind.Method)
Compiler\MethodCompiler.cs (1)
519
switch (member.
Kind
)
Compiler\SynthesizedMetadataCompiler.cs (1)
93
switch (member.
Kind
)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
153
if (containingSymbol.
Kind
== SymbolKind.Method)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
70
if (member.
Kind
== SymbolKind.Field)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (10)
272
switch (otherContainer.
Kind
)
282
throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
);
343
switch (otherContainer.
Kind
)
378
throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
);
456
var otherTypeParameters = otherContainer.
Kind
switch
460
_ => throw ExceptionUtilities.UnexpectedValue(otherContainer.
Kind
),
763
if (type.
Kind
!= other.
Kind
)
768
switch (type.
Kind
)
787
throw ExceptionUtilities.UnexpectedValue(type.
Kind
);
Emitter\Model\NamedTypeSymbolAdapter.cs (4)
328
if (member.
Kind
== SymbolKind.Method)
965
if (m.
Kind
== SymbolKind.Event)
1044
if (m.
Kind
== SymbolKind.Method)
1061
if (m.
Kind
== SymbolKind.Property)
Emitter\Model\PEAssemblyBuilder.cs (1)
721
var subnamespace = (NamespaceSymbol)result.GetMembers(partName).FirstOrDefault(m => m.
Kind
== SymbolKind.Namespace);
Emitter\Model\PEModuleBuilder.cs (15)
232
switch (symbol.
Kind
)
243
switch (member.
Kind
)
250
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
292
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
352
switch (symbol.
Kind
)
363
switch (member.
Kind
)
371
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
386
switch (member.
Kind
)
437
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
444
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
569
if (member.
Kind
== SymbolKind.Namespace)
584
if (symbol.
Kind
== SymbolKind.NamedType)
1294
switch (typeSymbol.
Kind
)
1316
throw ExceptionUtilities.UnexpectedValue(typeSymbol.
Kind
);
1583
return container.
Kind
== SymbolKind.Method && ((MethodSymbol)container).IsGenericMethod ||
Emitter\Model\SymbolAdapter.cs (5)
69
(this.
Kind
== SymbolKind.Assembly && this is SourceAssemblySymbol) ||
70
(this.
Kind
== SymbolKind.NetModule && this is SourceModuleSymbol));
89
Debug.Assert(this.
Kind
!= SymbolKind.Assembly);
96
Debug.Assert(this.
Kind
!= SymbolKind.Assembly);
157
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)
324
if (member.
Kind
!= SymbolKind.NamedType)
564
switch (propertyOrEvent.
Kind
)
573
throw ExceptionUtilities.UnexpectedValue(propertyOrEvent.
Kind
);
FlowAnalysis\AbstractFlowPass.cs (1)
3623
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)
289
Debug.Assert(variableId.Symbol.
Kind
== SymbolKind.Field || variableId.Symbol.
Kind
== SymbolKind.Property || variableId.Symbol.
Kind
== SymbolKind.Event,
446
bool hasAssociatedProperty = associatedPropertyOrEvent?.
Kind
== SymbolKind.Property;
644
Debug.Assert(captured.
Kind
== SymbolKind.Parameter || captured.
Kind
== SymbolKind.Local || captured.
Kind
== SymbolKind.RangeVariable);
680
else if (variable.
Kind
!= SymbolKind.RangeVariable)
724
if ((object)_sourceAssembly != null && variable.
Kind
== SymbolKind.Field)
806
if ((object)_sourceAssembly != null && variable.
Kind
== SymbolKind.Field)
1169
symbol.
Kind
== SymbolKind.Local &&
1182
if (symbol.
Kind
== SymbolKind.Field)
1186
else if (symbol.
Kind
== SymbolKind.Parameter &&
1262
var hasAssociatedProperty = associatedSymbol?.
Kind
== SymbolKind.Property;
1760
while (current?.
Kind
is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property)
2615
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\DefinitelyAssignedWalker.cs (1)
96
symbol.
Kind
!= SymbolKind.Field)
FlowAnalysis\EmptyStructTypeCache.cs (2)
194
switch (member.
Kind
)
255
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 (19)
845
var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.
Kind
.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1185
switch (member.
Kind
)
1236
if (member.
Kind
!= SymbolKind.Field &&
1237
member.
Kind
!= SymbolKind.Property &&
1238
member.
Kind
!= SymbolKind.Event)
2091
case {
Kind
: SymbolKind.ErrorType }:
2094
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
2267
if (container.
Kind
== SymbolKind.NamedType)
2971
Debug.Assert(member.
Kind
== SymbolKind.Field || member.
Kind
== SymbolKind.Property || member.
Kind
== SymbolKind.Event);
4990
if (members.Any(static m => m.
Kind
== SymbolKind.Field))
4996
if (members.Any(static m => m.
Kind
== SymbolKind.Property))
6081
if ((member is PropertySymbol { IsIndexedProperty: false } || member.
Kind
== SymbolKind.Field) &&
8040
switch (member.
Kind
)
8322
return (type.
Kind
== SymbolKind.TypeParameter && !type.IsReferenceType) || type.IsNullableTypeOrTypeParameter();
9143
if (symbol.
Kind
== SymbolKind.Method)
9160
int? memberIndex = symbol.
Kind
== SymbolKind.Property ? symbol.MemberIndexOpt : null;
12313
if (member.
Kind
== SymbolKind.Property)
FlowAnalysis\NullableWalker_Patterns.cs (1)
266
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)
164
if (IsInside && symbol?.
Kind
== SymbolKind.Local)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
479
if (member.
Kind
!= SymbolKind.Method)
507
if (member.
Kind
!= SymbolKind.Property)
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (2)
214
if (member.
Kind
== SymbolKind.Property)
269
if (member.
Kind
== SymbolKind.Method)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
577
switch (variable.
Kind
)
598
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)
765
switch (symbol.
Kind
)
795
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (7)
933
switch (symbol.
Kind
)
954
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
960
switch (symbol.
Kind
)
981
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
1009
builder.Add(_bound.StaticCall(sym.
Kind
is SymbolKind.Property ?
1018
builder.Add(_bound.StaticCall(sym.
Kind
is SymbolKind.Property ?
1027
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)
2120
if (exprType.
Kind
== SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
710
refKind = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.
Kind
== SymbolKind.TypeParameter ? RefKind.Ref : RefKind.None;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (5)
263
Debug.Assert(propertyOrEvent.
Kind
== SymbolKind.Property || propertyOrEvent.
Kind
== SymbolKind.Event);
312
var variableRepresentsLocation = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.
Kind
== SymbolKind.TypeParameter;
592
Debug.Assert(fieldOrEvent.
Kind
== SymbolKind.Field || fieldOrEvent.
Kind
== SymbolKind.Event);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
45
if (nodeExpressionType.
Kind
== SymbolKind.ArrayType)
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
84
if (argumentType.
Kind
== SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
708
switch (memberSymbol.
Kind
)
748
throw ExceptionUtilities.UnexpectedValue(memberSymbol.
Kind
);
Lowering\MethodToClassRewriter.cs (1)
364
switch (member.
Kind
)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (4)
166
switch (symbol.
Kind
)
187
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
230
var type = (variable.
Kind
== SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type;
279
switch (symbol.
Kind
)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
181
Debug.Assert(localOrParameter.
Kind
== SymbolKind.Local || localOrParameter.
Kind
== SymbolKind.Parameter);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
157
Debug.Assert(variable.
Kind
== SymbolKind.Local || variable.
Kind
== SymbolKind.Parameter);
159
if (variable.
Kind
== SymbolKind.Local)
Lowering\SynthesizedSubmissionFields.cs (1)
64
if ((object)hostObjectTypeSymbol != null && hostObjectTypeSymbol.
Kind
!= SymbolKind.ErrorType)
Lowering\SyntheticBoundNodeFactory.cs (1)
1792
if (exprType.
Kind
== SymbolKind.TypeParameter)
Operations\CSharpOperationFactory.cs (2)
882
switch (memberSymbol.
Kind
)
917
throw ExceptionUtilities.UnexpectedValue(memberSymbol.
Kind
);
Symbols\AbstractTypeMap.cs (1)
99
switch (previous.
Kind
)
Symbols\AliasSymbol.cs (1)
84
if (previousTarget.
Kind
!= SymbolKind.Namespace)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
737
if (member.
Kind
== SymbolKind.Method)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
121
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)
227
if (type.
Kind
!= SymbolKind.NamedType || type.TypeKind != TypeKind.Class)
301
if (member.
Kind
!= targetSymbolKind || member.IsStatic != isStatic ||
1115
if (type.
Kind
!= SymbolKind.ArrayType)
1139
if (type.
Kind
!= SymbolKind.NamedType)
1157
if (type.
Kind
!= SymbolKind.NamedType)
1190
return type.
Kind
== SymbolKind.PointerType ? ((PointerTypeSymbol)type).PointedAtType : null;
1200
if (type.
Kind
!= SymbolKind.ArrayType)
1229
if (type.
Kind
!= SymbolKind.TypeParameter)
1234
if (typeParam.ContainingSymbol.
Kind
!= SymbolKind.Method)
1243
if (type.
Kind
!= SymbolKind.TypeParameter)
1248
if (typeParam.ContainingSymbol.
Kind
!= SymbolKind.NamedType)
1257
if (type.
Kind
!= SymbolKind.ArrayType)
Symbols\ConstraintsHelper.cs (2)
589
if (type.
Kind
== SymbolKind.NamedType)
593
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)
409
if (member1 is null || member2 is null || member1.
Kind
!= member2.
Kind
)
520
hash = Hash.Combine((int)member.
Kind
, hash);
536
if (member.
Kind
!= SymbolKind.Field)
842
switch (member.
Kind
)
850
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
856
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
)
308
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
325
switch (member.
Kind
)
334
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
340
switch (member.
Kind
)
350
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
377
switch (symbol.
Kind
)
408
return symbol.
Kind
== SymbolKind.Method && IsAccessor((MethodSymbol)symbol);
424
return symbol.
Kind
== SymbolKind.Method && IsOperator((MethodSymbol)symbol);
429
return symbol.
Kind
== SymbolKind.Property && ((PropertySymbol)symbol).IsIndexer;
434
return symbol.
Kind
== SymbolKind.Property && ((PropertySymbol)symbol).IsIndexedProperty;
439
return symbol.
Kind
== SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion;
466
switch (m.
Kind
)
482
throw ExceptionUtilities.UnexpectedValue(m.
Kind
);
515
switch (s.
Kind
)
528
throw ExceptionUtilities.UnexpectedValue(s.
Kind
);
537
switch (symbol.
Kind
)
570
switch (symbol.
Kind
)
582
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
588
switch (symbol.
Kind
)
600
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
781
switch (member.
Kind
)
858
switch (member.
Kind
)
869
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
875
switch (member.
Kind
)
890
switch (member.
Kind
)
899
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
905
switch (member.
Kind
)
926
switch (member.
Kind
)
942
if (member.
Kind
== SymbolKind.Method)
Symbols\MergedNamespaceSymbol.cs (1)
143
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 (12)
587
while (s.
Kind
!= SymbolKind.Namespace)
1414
if (staticIndex < staticFields.Length && staticFields[staticIndex].
Kind
== SymbolKind.Field)
1430
Debug.Assert(staticIndex == staticFields.Length || staticFields[staticIndex].
Kind
!= SymbolKind.Field);
1521
if (members[index].
Kind
!= SymbolKind.Method)
1539
if (index >= members.Length || members[index].
Kind
!= SymbolKind.Method)
1567
if (index == members.Length || members[index].
Kind
!= SymbolKind.Method)
1828
Debug.Assert(field.AssociatedSymbol.
Kind
== SymbolKind.Event);
1863
Debug.Assert(previous.
Kind
.ToSortOrder() <= current.
Kind
.ToSortOrder());
1900
if (member.
Kind
== SymbolKind.NamedType)
3074
if (members[i].
Kind
== kind)
3097
if (member.
Kind
!= kind)
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
317
var accessSymbol = containingSymbol.
Kind
== SymbolKind.Property ? containingSymbol.ContainingSymbol : containingSymbol;
1268
_ => 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) ?
681
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)
331
if (candidate.
Kind
== SymbolKind.Property)
360
if (member.
Kind
== SymbolKind.Method)
941
switch (symbol.
Kind
)
2017
ContainingSymbol?.
Kind
== SymbolKind.Namespace &&
Symbols\NamespaceOrTypeSymbol.cs (2)
44
return
Kind
== SymbolKind.Namespace;
263
if (scope.
Kind
== SymbolKind.ErrorType)
Symbols\NamespaceSymbol.cs (1)
274
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
);
1032
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)
90
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 (6)
264
if (interfaceMember.
Kind
!= implementingMember.
Kind
|| !interfaceMember.IsImplementableInterfaceMember())
327
var errorType = implementingMember.
Kind
is SymbolKind.Method
350
switch (implementedMember.
Kind
)
426
if (collisionCandidateMember.
Kind
== implementingMember.
Kind
&& implementedMember != collisionCandidateMember)
Symbols\Source\LocalFunctionSymbol.cs (2)
491
if (tpEnclosing.ContainingSymbol.
Kind
== SymbolKind.Method)
498
Debug.Assert(tpEnclosing.ContainingSymbol.
Kind
== SymbolKind.NamedType);
Symbols\Source\ModifierUtils.cs (1)
529
(symbol.
Kind
!= SymbolKind.Method || (modifiers & DeclarationModifiers.Partial) == 0) &&
Symbols\Source\ParameterHelpers.cs (1)
1121
if (current.
Kind
== SymbolKind.Method)
Symbols\Source\SourceAssemblySymbol.cs (5)
1114
if (member.
Kind
== SymbolKind.Namespace)
2076
switch (member.
Kind
)
2091
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
2240
if (forwardedType.
Kind
!= SymbolKind.NamedType)
2754
if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.
Kind
== SymbolKind.Event)
Symbols\Source\SourceEventSymbol.cs (1)
827
if (interfaceMember.
Kind
== SymbolKind.Event && //quick check (necessary, not sufficient)
Symbols\Source\SourceMemberContainerSymbol.cs (23)
278
if (ContainingSymbol.
Kind
== SymbolKind.Namespace &&
309
if (containingSymbol.
Kind
== SymbolKind.Namespace)
479
switch (this.ContainingSymbol.
Kind
)
1513
if (member.
Kind
!= SymbolKind.Method && this.ContainingType is { } containingType)
1666
switch (m.
Kind
)
2203
if (symbol.
Kind
== SymbolKind.NamedType ||
2246
if (symbol.
Kind
!= SymbolKind.Method || lastSym.
Kind
!= SymbolKind.Method)
2248
if (symbol.
Kind
!= SymbolKind.Field || !symbol.IsImplicitlyDeclared)
2257
if (lastSym.
Kind
== SymbolKind.Method)
2716
switch (symbol.
Kind
)
2782
switch (member.
Kind
)
2844
if (member.
Kind
!= SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor)
3119
switch (m.
Kind
)
4186
Debug.Assert(symbol.
Kind
!= prev.
Kind
);
4545
if (symbol.
Kind
!= SymbolKind.Method)
4584
if (symbol.
Kind
!= SymbolKind.Method)
4740
switch (member.
Kind
)
4781
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
4805
switch (member.
Kind
)
4842
throw ExceptionUtilities.UnexpectedValue(member.
Kind
);
5654
if (member.
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 &&
548
switch (member.
Kind
)
674
sourceField.AssociatedSymbol.
Kind
!= SymbolKind.Event);
687
Debug.Assert(symbol.
Kind
== SymbolKind.Field || symbol.
Kind
== SymbolKind.NamedType);
719
if (hiddenMember.
Kind
== SymbolKind.Method && !((MethodSymbol)hiddenMember).CanBeHiddenByMember(symbol))
767
var overridingMemberIsMethod = overridingMember.
Kind
== SymbolKind.Method;
768
var overridingMemberIsProperty = overridingMember.
Kind
== SymbolKind.Property;
769
var overridingMemberIsEvent = overridingMember.
Kind
== SymbolKind.Event;
824
else if (associatedPropertyOrEvent.
Kind
== SymbolKind.Property) //no specific errors for event accessors
886
var overridingMemberIsMethod = overridingMember.
Kind
== SymbolKind.Method;
887
var overridingMemberIsProperty = overridingMember.
Kind
== SymbolKind.Property;
888
var overridingMemberIsEvent = overridingMember.
Kind
== SymbolKind.Event;
899
Debug.Assert(overriddenMember.
Kind
== overridingMember.
Kind
);
1657
if (!hidingMemberIsNew && hiddenMember.
Kind
== hidingMember.
Kind
&&
1713
switch (hiddenMember.
Kind
)
1743
switch (hidingMember.
Kind
)
1878
if ((object)implementingMember == null || implementingMember.
Kind
!= SymbolKind.Method)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
509
if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.
Kind
== SymbolKind.Event)
Symbols\Source\SourceModuleSymbol.cs (2)
170
switch (s.
Kind
)
647
switch (member.
Kind
)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
96
if (containingSymbol.
Kind
== SymbolKind.NamedType)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (4)
782
if (imported.
Kind
== SymbolKind.Namespace)
802
else if (imported.
Kind
== SymbolKind.NamedType)
832
else if (imported.
Kind
is SymbolKind.ArrayType or SymbolKind.PointerType or SymbolKind.FunctionPointerType or SymbolKind.DynamicType)
841
else if (imported.
Kind
!= SymbolKind.ErrorType)
Symbols\Source\SourceParameterSymbol.cs (2)
111
Debug.Assert((owner.
Kind
== SymbolKind.Method) || (owner.
Kind
== SymbolKind.Property) || owner is NamedTypeSymbol { IsExtension: true });
Symbols\SubstitutedNamedTypeSymbol.cs (2)
254
if (t.
Kind
== SymbolKind.NamedType)
304
if (t.
Kind
== SymbolKind.NamedType)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
72
if (_container.
Kind
== SymbolKind.Method)
Symbols\Symbol.cs (11)
197
switch (this.
Kind
)
638
switch (this.
Kind
)
709
throw ExceptionUtilities.UnexpectedValue(this.
Kind
);
732
if (this.
Kind
== SymbolKind.Method)
909
Debug.Assert(this.
Kind
== SymbolKind.NamedType || this.
Kind
== SymbolKind.Method);
1034
return $"{this.
Kind
} {this.ToDisplayString(s_debuggerDisplayFormat)}";
1227
switch (this.
Kind
)
1666
switch (this.
Kind
)
1740
switch (variable.
Kind
)
1776
throw ExceptionUtilities.UnexpectedValue(variable.
Kind
);
Symbols\Symbol_Attributes.cs (3)
46
switch (this.
Kind
)
929
Debug.Assert(this.
Kind
== SymbolKind.Method);
946
switch (this.
Kind
)
Symbols\SymbolDistinguisher.cs (6)
55
switch (symbol.
Kind
)
81
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
142
switch (symbol.
Kind
)
194
Debug.Assert(unwrappedSymbol.
Kind
== SymbolKind.DynamicType || unwrappedSymbol.
Kind
== SymbolKind.ErrorType || unwrappedSymbol.
Kind
== SymbolKind.FunctionPointerType);
Symbols\SymbolExtensions.cs (13)
123
return symbol.
Kind
.Localize();
135
switch (containingSymbol.
Kind
)
148
while (containingMember is object && containingMember.
Kind
== SymbolKind.Method)
165
switch (symbol.
Kind
)
202
switch (symbol.
Kind
)
242
for (; ((object?)containingSymbol != null) && (containingSymbol.
Kind
!= SymbolKind.Namespace); containingSymbol = containingSymbol.ContainingSymbol)
256
switch (symbol.
Kind
)
304
var upperLevelType = symbol.
Kind
== SymbolKind.NamedType ? (NamedTypeSymbol)symbol : symbol.ContainingType;
320
switch (symbol.
Kind
)
335
switch (symbol.
Kind
)
478
switch (symbol.
Kind
)
522
throw ExceptionUtilities.UnexpectedValue(symbol.
Kind
);
533
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
)
252
if (m.
Kind
is SymbolKind.Field && m is not TupleErrorFieldSymbol)
257
if (m.
Kind
is SymbolKind.Property)
314
if (member.
Kind
!= SymbolKind.Property)
Symbols\Synthesized\SynthesizedContainer.cs (2)
60
if (ContainingSymbol.
Kind
== SymbolKind.NamedType && ContainingSymbol.IsImplicitlyDeclared)
137
switch (m.
Kind
)
Symbols\Synthesized\SynthesizedTypeParameterSymbol.cs (2)
33
$"Container is {ContainingSymbol?.
Kind
}, TypeParameterKind is {this.TypeParameterKind}");
49
if (ContainingSymbol.
Kind
== SymbolKind.NamedType && !PropagateAttributes)
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)
740
switch (interfaceMember.
Kind
)
810
Debug.Assert(interfaceMember.
Kind
== SymbolKind.Method || interfaceMember.
Kind
== SymbolKind.Property || interfaceMember.
Kind
== SymbolKind.Event);
1012
if (!canBeImplementedImplicitlyInCSharp9 && interfaceMember.
Kind
== SymbolKind.Method &&
1411
switch (interfaceMember.
Kind
)
1514
associated = implementation.
Kind
== SymbolKind.Method
1633
if (interfaceMember.
Kind
== SymbolKind.Method)
1683
if (interfaceMember.
Kind
== SymbolKind.Method)
1778
if (interfaceMember.
Kind
== SymbolKind.Event)
1936
switch (interfaceMember.
Kind
)
1984
throw ExceptionUtilities.UnexpectedValue(interfaceMember.
Kind
);
2031
switch (interfaceMember.
Kind
)
2047
throw ExceptionUtilities.UnexpectedValue(interfaceMember.
Kind
);
2051
switch (closestMismatch.
Kind
)
2211
if (member.
Kind
== interfaceMember.
Kind
)
2318
Debug.Assert(interfaceMember.
Kind
!= SymbolKind.Method || (object)interfaceMember == ((MethodSymbol)interfaceMember).ConstructedFrom);
2425
if (this.IsAbstract && member.IsAbstract && member.
Kind
!= SymbolKind.NamedType)
2431
switch (member.
Kind
)
Symbols\TypeSymbolExtensions.cs (10)
285
if (type.
Kind
== SymbolKind.ArrayType)
352
return type.
Kind
== SymbolKind.NamedType && ((NamedTypeSymbol)type).IsInterface;
370
return type.
Kind
== SymbolKind.ErrorType;
375
return p.ContainingSymbol.
Kind
== SymbolKind.Method;
594
if (symbol.
Kind
!= SymbolKind.Namespace)
1057
for (Symbol s2 = sym2; s2.
Kind
!= SymbolKind.Namespace; s2 = s2.ContainingSymbol)
1828
switch (methodOrType.
Kind
)
1862
if (container.
Kind
!= SymbolKind.Namespace)
2001
switch (type.
Kind
)
2360
if (type.
Kind
== SymbolKind.NamedType)
Symbols\TypeUnification.cs (2)
128
switch (t1.Type.
Kind
)
286
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
)