20 overrides of Kind
Microsoft.CodeAnalysis.CSharp (20)
Symbols\AliasSymbol.cs (1)
101public override SymbolKind Kind
Symbols\ArrayTypeSymbol.cs (1)
286public override SymbolKind Kind
Symbols\AssemblySymbol.cs (1)
196public sealed override SymbolKind Kind
Symbols\DiscardSymbol.cs (1)
31public override SymbolKind Kind => SymbolKind.Discard;
Symbols\DynamicTypeSymbol.cs (1)
54public override SymbolKind Kind
Symbols\EventSymbol.cs (1)
234public sealed override SymbolKind Kind
Symbols\FieldSymbol.cs (1)
186public sealed override SymbolKind Kind
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
78public override SymbolKind Kind => SymbolKind.FunctionPointerType;
Symbols\FunctionTypeSymbol.cs (1)
108public override SymbolKind Kind => SymbolKindInternal.FunctionType;
Symbols\LabelSymbol.cs (1)
164public override SymbolKind Kind
Symbols\LocalSymbol.cs (1)
189public sealed override SymbolKind Kind
Symbols\MethodSymbol.cs (1)
640public sealed override SymbolKind Kind
Symbols\ModuleSymbol.cs (1)
58public sealed override SymbolKind Kind
Symbols\NamedTypeSymbol.cs (1)
755public override SymbolKind Kind // Cannot seal this method because of the ErrorSymbol.
Symbols\NamespaceSymbol.cs (1)
120public sealed override SymbolKind Kind
Symbols\ParameterSymbol.cs (1)
255public sealed override SymbolKind Kind
Symbols\PointerTypeSymbol.cs (1)
157public override SymbolKind Kind
Symbols\PropertySymbol.cs (1)
336public sealed override SymbolKind Kind
Symbols\RangeVariableSymbol.cs (1)
40public override SymbolKind Kind
Symbols\TypeParameterSymbol.cs (1)
187public sealed override SymbolKind Kind
685 references to Kind
Microsoft.CodeAnalysis.CSharp (685)
Binder\Binder.cs (9)
427RoslynDebug.Assert(member is null || member.Kind != SymbolKind.ErrorType); 445switch (containingMember?.Kind) 604switch (symbol.Kind) 643RoslynDebug.Assert(symbol.Kind == SymbolKind.NamedType || 644symbol.Kind == SymbolKind.Field || 645symbol.Kind == SymbolKind.Method || 646symbol.Kind == SymbolKind.Event || 647symbol.Kind == SymbolKind.Property); 651if (symbol.Kind == SymbolKind.Method)
Binder\Binder.IdentifierUsedAsValueFinder.cs (2)
290Debug.Assert(symbol.Kind != SymbolKind.Method); 291treatAsInstanceMemberAccess = !(symbol.IsStatic || symbol.Kind == SymbolKind.NamedType);
Binder\Binder.NamespaceOrTypeOrAliasSymbolWithAnnotations.cs (2)
39internal bool IsAlias => _symbol?.Kind == SymbolKind.Alias; 47Debug.Assert(_symbol?.Kind == SymbolKind.Alias); // Not meaningful to use this property otherwise
Binder\Binder.ValueChecks.cs (6)
1424if (containing.Kind == SymbolKind.Method) 1431else if (containing.Kind == SymbolKind.Field) 1627&& symbol.Kind != SymbolKind.Event 1902Debug.Assert(member.Kind != SymbolKind.Property); 1903Debug.Assert(member.Kind != SymbolKind.Event); 3272var symbolKind = symbol.Kind.Localize();
Binder\Binder_AnonymousTypes.cs (2)
124if (symbol.Kind == SymbolKind.Property) 191switch (member.Kind)
Binder\Binder_Attributes.cs (4)
531if (namedArgumentNameSymbol.Kind == SymbolKind.Property) 609if (namedArgumentNameSymbol.Kind == SymbolKind.ErrorType) 626switch (namedArgumentNameSymbol.Kind) 947switch (typeOfArgument.Kind)
Binder\Binder_Await.cs (1)
154switch (containingMemberOrLambda.Kind)
Binder\Binder_Constraints.cs (2)
34Debug.Assert((containingSymbol.Kind == SymbolKind.NamedType) || (containingSymbol.Kind == SymbolKind.Method));
Binder\Binder_Crefs.cs (8)
51if (result.Kind == SymbolKind.ErrorType) 101if ((object?)containerOpt != null && containerOpt.Kind == SymbolKind.TypeParameter) 644if (s.Kind != SymbolKind.Method) 703if (symbol.Kind == SymbolKind.TypeParameter) 718else if (symbol.Kind == SymbolKind.TypeParameter) 771switch (candidate.Kind) 821throw ExceptionUtilities.UnexpectedValue(candidate.Kind); 915if (symbol.Kind == SymbolKind.Method)
Binder\Binder_Expressions.cs (29)
40inStaticContext = memberOpt.Kind == SymbolKind.Field || memberOpt.Kind == SymbolKind.Method || memberOpt.Kind == SymbolKind.Property; 500Debug.Assert(this.ContainingMemberOrLambda.Kind == SymbolKind.Method || this.ContainingMemberOrLambda.Kind == SymbolKind.Property); 1412if (type.IsUnboundGenericType() || type.Kind == SymbolKind.TypeParameter) 1628bool isNamedType = (symbol.Kind == SymbolKind.NamedType) || (symbol.Kind == SymbolKind.ErrorType); 1732this.ContainingMember() is { Kind: not SymbolKind.NamedType, IsStatic: false } && // We are in an instance member 1953if (symbol.Kind is not (SymbolKind.Event or SymbolKind.Property)) 1958switch (symbol.Kind) 2193_ => throw ExceptionUtilities.UnexpectedValue(alias.Target.Kind), 2201throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 2224this.ContainingMember() is not { Kind: not SymbolKind.NamedType, IsStatic: false } containingMember || // We are not in an instance member 2283(containingMember.Kind != SymbolKind.NamedType || currentType.IsScriptClass); 2353if (containingMember.Kind == SymbolKind.NamedType) 3171if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.Kind == SymbolKind.NamedType) 3247if (containingSymbol.Kind == SymbolKind.Method 3265if (member.Kind == SymbolKind.Field && 7462switch (leftSymbol.Kind) 7779else if (sym.Kind == SymbolKind.Namespace) 7785Debug.Assert(sym.Kind == SymbolKind.NamedType); 8127if (symbols.Length > 0 && symbols[0].Kind == SymbolKind.Method) 8170switch (symbolOpt.Kind) 8269Debug.Assert(symbol.Kind != SymbolKind.Method); 8270left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.Kind == SymbolKind.NamedType, diagnostics); 8274if (symbol.Kind is not (SymbolKind.Event or SymbolKind.Property)) 8279switch (symbol.Kind) 8329throw ExceptionUtilities.UnexpectedValue(symbol.Kind);
Binder\Binder_Invocation.cs (2)
369else if (boundExpression.Type?.Kind == SymbolKind.FunctionPointerType) 2038if (parameterType?.Kind == SymbolKind.NamedType &&
Binder\Binder_Lookup.cs (16)
303if (existingDefinition.Kind != SymbolKind.NamedType || arity == 0) 344lookingForOverloadsOfKind = firstSymbol.Kind; 698if (symbol.Kind == SymbolKind.NamedType) 1290return symbol.Kind == SymbolKind.Method || symbol.IsIndexer(); 1299else if (nsOrType.Kind == SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder) 1323else if (nsOrType.Kind == SymbolKind.NamedType && originalBinder.IsEarlyAttributeBinder) 1394var unwrappedSymbol = symbol.Kind == SymbolKind.Alias 1547switch (symbol.Kind) 1564throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 1581Debug.Assert(symbol.Kind != SymbolKind.Alias, "It is the caller's responsibility to unwrap aliased symbols."); 1618else if ((options & LookupOptions.MustNotBeNamespace) != 0 && (symbol.Kind == SymbolKind.Namespace)) 1709switch (symbol.Kind) 1730switch (symbol.Kind) 1750switch (symbol.Kind) 1767switch (symbol.Kind) 1816diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_TypeArgsNotAllowed, symbol, symbol.Kind.Localize()) : null;
Binder\Binder_NameConflicts.cs (2)
136switch (containingMemberOrLambda?.Kind) 143return containingMemberOrLambda.ContainingSymbol?.Kind == SymbolKind.NamedType &&
Binder\Binder_Operators.cs (1)
1086if (type.Kind != SymbolKind.NamedType)
Binder\Binder_Patterns.cs (4)
561if (strippedInputType.Kind is not SymbolKind.ErrorType and not SymbolKind.DynamicType and not SymbolKind.TypeParameter && 887if ((InConstructorInitializer || InFieldInitializer) && ContainingMemberOrLambda.ContainingSymbol.Kind == SymbolKind.NamedType) 952type.ContainingSymbol is var declContainer && declContainer.Kind == SymbolKind.Namespace && declContainer.Name == "System" && 1491member.Symbol is { Name: WellKnownMemberNames.LengthPropertyName or WellKnownMemberNames.CountPropertyName, Kind: SymbolKind.Property } memberSymbol)
Binder\Binder_Statements.cs (4)
1837if (destinationType.Kind == SymbolKind.ArrayType) 2945return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningTask(this.Compilation); 2951return symbol?.Kind == SymbolKind.Method && ((MethodSymbol)symbol).IsAsyncEffectivelyReturningGenericTask(this.Compilation); 2957if (symbol?.Kind == SymbolKind.Method)
Binder\Binder_Symbols.cs (15)
266if (symbol.Kind != SymbolKind.Alias) 582if (left.Kind == SymbolKind.NamedType) 908if (bindingResult.Kind == SymbolKind.Alias) 961if (((AliasSymbol)s).Target.Kind == SymbolKind.NamedType) return true; 1086if (symbol.Kind == SymbolKind.Alias) 1127if (symbol.Kind == SymbolKind.Alias) 1327if (((object)qualifierOpt != null) && (qualifierOpt.Kind == SymbolKind.TypeParameter)) 1611bool isLeftUnboundGenericType = left.Kind == SymbolKind.NamedType && 1886if (snd.Kind != fst.Kind) return (int)fst.Kind - (int)snd.Kind; 1915if (symbol.Kind == SymbolKind.NamedType) 2333((object)qualifierOpt == null || qualifierOpt.Kind != SymbolKind.ErrorType)) // Suppress cascading. 2709if (contextualAttributeBinder is { AttributeTarget: { Kind: SymbolKind.Assembly } })
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
596if (sym.Kind != kind)
Binder\ContextualAttributeBinder.cs (1)
56switch (symbol.Kind)
Binder\ExecutableCodeBinder.cs (3)
42(memberSymbol.Kind != SymbolKind.Local && memberSymbol.Kind != SymbolKind.RangeVariable && memberSymbol.Kind != SymbolKind.Parameter));
Binder\ForEachLoopBinder.cs (5)
941if (collectionExprType.Kind == SymbolKind.DynamicType && isAsync) 948if (collectionExprType.Kind == SymbolKind.ArrayType || collectionExprType.Kind == SymbolKind.DynamicType) 1382if (member.Kind != SymbolKind.Method) 1649if (lookupSymbol.IsStatic || lookupSymbol.DeclaredAccessibility != Accessibility.Public || lookupSymbol.Kind != SymbolKind.Property)
Binder\HostObjectModeBinder.cs (2)
36if (hostObjectType.Kind == SymbolKind.ErrorType) 55if (hostObjectType.Kind != SymbolKind.ErrorType)
Binder\ImportChain.cs (1)
110if (target.Kind == SymbolKind.Namespace)
Binder\InContainerBinder.cs (2)
54get { return (_container.Kind == SymbolKind.NamedType) && ((NamedTypeSymbol)_container).IsScriptClass; } 82if (_container.Kind == SymbolKind.Namespace)
Binder\InMethodBinder.cs (4)
148if (refKind == RefKind.None && returnType.Kind == SymbolKind.NamedType) 179if (refKind == RefKind.None && returnType.Kind == SymbolKind.NamedType) 251SymbolKind parameterKind = parameter.Kind; 254SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.Kind;
Binder\LocalBinderFactory.cs (4)
138Debug.Assert(containingMemberOrLambda.Kind != SymbolKind.Local && containingMemberOrLambda.Kind != SymbolKind.RangeVariable && containingMemberOrLambda.Kind != SymbolKind.Parameter); 297=> target.Kind == SymbolKind.Method ? new WithMethodTypeParametersBinder((MethodSymbol)target, enclosing) : null;
Binder\LocalScopeBinder.cs (1)
504SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.Kind;
Binder\MethodGroupResolution.cs (1)
48Debug.Assert(((object)otherSymbol == null) || (otherSymbol.Kind != SymbolKind.Method));
Binder\Semantics\AccessCheck.cs (5)
71switch (symbol.Kind) 83throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 149switch (symbol.Kind) 215throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 239if (typeArg.Type.Kind != SymbolKind.TypeParameter && !IsSymbolAccessibleCore(typeArg.Type, within, null, out unused, compilation, ref useSiteInfo, basesBeingResolved))
Binder\Semantics\Conversions\ConversionsBase.cs (10)
830return (source.Kind == SymbolKind.DynamicType) ? Conversion.ExplicitDynamic : Conversion.ExplicitReference; 1281if (destination.Kind == SymbolKind.NamedType) 1333if (destination.Kind == SymbolKind.NamedType) 2529return expressionType?.Kind == SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer(); 2539return source.Kind == SymbolKind.DynamicType && !destination.IsPointerOrFunctionPointer(); 2645if (destination.SpecialType == SpecialType.System_Object || destination.Kind == SymbolKind.DynamicType) 3243ContainingSymbol: { Kind: SymbolKind.Namespace }, 3296if (destination.Kind == SymbolKind.DynamicType) 3347if (destination.Kind == SymbolKind.DynamicType) 3471else if (source.Kind == SymbolKind.DynamicType && destination.IsReferenceType)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (2)
699if (target.Type.Kind != SymbolKind.NamedType) 895if (formalType.Type.Kind != SymbolKind.NamedType)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
1448switch (member.Kind) 1455throw ExceptionUtilities.UnexpectedValue(member.Kind); 3344if (targetType.Kind != SymbolKind.NamedType) 4188member.Kind == SymbolKind.Method && (method = (MethodSymbol)(Symbol)member).Arity > 0) 4637switch (member.Kind) 4644throw ExceptionUtilities.UnexpectedValue(member.Kind);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
903Debug.Assert(badMember.Kind == SymbolKind.Method);
Binder\WithLambdaParametersBinder.cs (1)
126SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.Kind;
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
92switch (nsOrType.NamespaceOrType.Kind) 165switch (symbol.Kind)
BoundTree\BoundExpressionExtensions.cs (1)
73var s => throw ExceptionUtilities.UnexpectedValue(s?.Kind)
BoundTree\UnboundLambda.cs (1)
409bool hasErrors = !types.IsDefault && types.Any(static t => t.Type?.Kind == SymbolKind.ErrorType);
BoundTree\VariablePendingInference.cs (2)
48switch (this.VariableSymbol.Kind) 110throw ExceptionUtilities.UnexpectedValue(this.VariableSymbol.Kind);
Compilation\CSharpCompilation.cs (4)
2406within0.Kind == SymbolKind.Assembly ? 3078if (symbol.Kind == SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor) 3609Debug.Assert(symbol.ContainingSymbol.Kind == SymbolKind.Namespace); // avoid unnecessary traversal of nested types 4738switch (symbol.Kind)
Compilation\CSharpSemanticModel.cs (8)
1577if ((object)container == null || container.Kind == SymbolKind.Namespace) 1595if ((object)containingType != null && containingType.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)containingType).IsScriptClass) 2369if (symbol.Kind == SymbolKind.Alias) 3741switch (containingMember.Kind) 3762switch (containingMember.Kind) 3778throw ExceptionUtilities.UnexpectedValue(containingMember.Kind); 4592if (((object)otherSymbol != null) && (otherSymbol.Kind == SymbolKind.Method)) 4715Debug.Assert(singleResult.Symbol.Kind == SymbolKind.Method);
Compilation\InitializerSemanticModel.cs (4)
148switch (this.MemberSymbol.Kind) 182throw ExceptionUtilities.UnexpectedValue(this.MemberSymbol.Kind); 275switch (MemberSymbol.Kind) 286throw ExceptionUtilities.UnexpectedValue(MemberSymbol.Kind);
Compilation\LexicalOrderSymbolComparer.cs (2)
44comparison = x.Kind.ToSortOrder() - y.Kind.ToSortOrder();
Compilation\SyntaxTreeSemanticModel.cs (3)
259Debug.Assert(symbols.All(s => s.Kind == SymbolKind.TypeParameter || s.Kind == SymbolKind.Parameter)); 366if ((object)result == null || result.Kind == SymbolKind.ErrorType)
Compiler\ClsComplianceChecker.cs (39)
422SymbolKind symbolKind = symbol.Kind; 448if (symbol.Kind == SymbolKind.NamedType) 506else if (symbol.IsAbstract && symbol.Kind != SymbolKind.NamedType) 589if (symbol.Kind == SymbolKind.Method) 681if (container.Kind == SymbolKind.Method) 684if ((object)associated != null && associated.Kind == SymbolKind.Property) 717switch (symbol.Kind) 757throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 810if (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))) 889bool isMethodOrProperty = symbol.Kind == SymbolKind.Method || symbol.Kind == SymbolKind.Property; 893if (other.Name != symbolName && !(isMethodOrProperty && other.Kind == symbol.Kind)) 910if (symbol.Kind == other.Kind && 962if (symbol.Kind == SymbolKind.Namespace) 1116System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.NamedType || !((symbol is TypeSymbol)), 1119if (symbol.Kind == SymbolKind.Namespace) 1124else if (symbol.Kind == SymbolKind.Method) 1136Debug.Assert(symbol.Kind != SymbolKind.Alias); 1137Debug.Assert(symbol.Kind != SymbolKind.Label); 1138Debug.Assert(symbol.Kind != SymbolKind.Namespace); 1139Debug.Assert(symbol.Kind != SymbolKind.Parameter); 1140Debug.Assert(symbol.Kind != SymbolKind.RangeVariable); 1154else if (symbol.Kind == SymbolKind.Assembly) 1165return (symbol.Kind == SymbolKind.Assembly || symbol.Kind == SymbolKind.NamedType) 1172System.Diagnostics.Debug.Assert(symbol.Kind != SymbolKind.Assembly); 1246System.Diagnostics.Debug.Assert(symbol.Kind == SymbolKind.ErrorType); 1269return symbol.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)symbol).IsImplicitClass; 1321System.Diagnostics.Debug.Assert(x.Kind == y.Kind); 1329switch (x.Kind) 1350throw ExceptionUtilities.UnexpectedValue(x.Kind); 1420return arrayType.ElementType.Kind == SymbolKind.ArrayType;
Compiler\DocumentationCommentCompiler.cs (10)
142symbol.Kind == SymbolKind.Event || 143symbol.Kind == SymbolKind.Field || 144symbol.Kind == SymbolKind.Method || 145symbol.Kind == SymbolKind.NamedType || 146symbol.Kind == SymbolKind.Property); 617switch (symbol.Kind) 640switch (symbol.Kind) 1088if (symbol.Kind == SymbolKind.Alias) 1190Debug.Assert(referencedSymbol.Kind == SymbolKind.Parameter); 1204Debug.Assert(referencedSymbol.Kind == SymbolKind.TypeParameter);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
560switch (memberSymbol.Kind) 588switch (currentSymbol.Kind)
Compiler\MethodBodySynthesizer.cs (1)
600if (member.Kind == SymbolKind.Method)
Compiler\MethodCompiler.cs (1)
504switch (member.Kind)
Compiler\SynthesizedMetadataCompiler.cs (1)
93switch (member.Kind)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
154if (containingSymbol.Kind == SymbolKind.Method)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
70if (member.Kind == SymbolKind.Field)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (10)
257switch (otherContainer.Kind) 267throw ExceptionUtilities.UnexpectedValue(otherContainer.Kind); 328switch (otherContainer.Kind) 363throw ExceptionUtilities.UnexpectedValue(otherContainer.Kind); 441var otherTypeParameters = otherContainer.Kind switch 445_ => throw ExceptionUtilities.UnexpectedValue(otherContainer.Kind), 749if (type.Kind != other.Kind) 754switch (type.Kind) 773throw ExceptionUtilities.UnexpectedValue(type.Kind);
Emitter\Model\NamedTypeSymbolAdapter.cs (4)
325if (member.Kind == SymbolKind.Method) 944if (m.Kind == SymbolKind.Event) 1023if (m.Kind == SymbolKind.Method) 1040if (m.Kind == SymbolKind.Property)
Emitter\Model\PEModuleBuilder.cs (11)
348switch (symbol.Kind) 359switch (member.Kind) 367throw ExceptionUtilities.UnexpectedValue(member.Kind); 382switch (member.Kind) 427throw ExceptionUtilities.UnexpectedValue(member.Kind); 434throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 569if (member.Kind == SymbolKind.Namespace) 584if (symbol.Kind == SymbolKind.NamedType) 1142switch (typeSymbol.Kind) 1164throw ExceptionUtilities.UnexpectedValue(typeSymbol.Kind); 1431return 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)); 88Debug.Assert(this.Kind != SymbolKind.Assembly); 95Debug.Assert(this.Kind != SymbolKind.Assembly); 151if (this.Kind == SymbolKind.Assembly)
Emitter\Model\TypeParameterSymbolAdapter.cs (4)
65if (AdaptedTypeParameterSymbol.ContainingSymbol.Kind == SymbolKind.Method) 80if (AdaptedTypeParameterSymbol.ContainingSymbol.Kind == SymbolKind.Method) 100if (AdaptedTypeParameterSymbol.ContainingSymbol.Kind == SymbolKind.NamedType) 115if (AdaptedTypeParameterSymbol.ContainingSymbol.Kind == SymbolKind.NamedType)
Emitter\NoPia\EmbeddedEvent.cs (1)
133if (m.Kind == SymbolKind.Method)
Emitter\NoPia\EmbeddedType.cs (1)
299switch (s.Kind)
Emitter\NoPia\EmbeddedTypesManager.cs (3)
272if (member.Kind != SymbolKind.NamedType) 512switch (propertyOrEvent.Kind) 521throw ExceptionUtilities.UnexpectedValue(propertyOrEvent.Kind);
FlowAnalysis\AbstractFlowPass.cs (1)
3589if (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)
288Debug.Assert(variableId.Symbol.Kind == SymbolKind.Field || variableId.Symbol.Kind == SymbolKind.Property || variableId.Symbol.Kind == SymbolKind.Event, 486bool hasAssociatedProperty = associatedPropertyOrEvent?.Kind == SymbolKind.Property; 692Debug.Assert(captured.Kind == SymbolKind.Parameter || captured.Kind == SymbolKind.Local || captured.Kind == SymbolKind.RangeVariable); 728else if (variable.Kind != SymbolKind.RangeVariable) 772if ((object)_sourceAssembly != null && variable.Kind == SymbolKind.Field) 854if ((object)_sourceAssembly != null && variable.Kind == SymbolKind.Field) 1216symbol.Kind == SymbolKind.Local && 1229if (symbol.Kind == SymbolKind.Field) 1233else if (symbol.Kind == SymbolKind.Parameter && 1309var hasAssociatedProperty = associatedSymbol?.Kind == SymbolKind.Property; 1807while (current?.Kind is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property) 2656if (symbol.Kind != SymbolKind.Field)
FlowAnalysis\DefiniteAssignment.LocalFunctions.cs (1)
162if (symbol.Kind == SymbolKind.Method &&
FlowAnalysis\DefiniteAssignment.VariableIdentifier.cs (1)
28Debug.Assert(symbol.Kind switch
FlowAnalysis\EmptyStructTypeCache.cs (2)
193switch (member.Kind) 254for (; symbol != null && symbol.Kind != SymbolKind.Namespace; symbol = symbol.ContainingSymbol)
FlowAnalysis\LocalDataFlowPass.cs (1)
105if (symbol.Kind == SymbolKind.RangeVariable) return -1;
FlowAnalysis\NullableWalker.cs (16)
790var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations); 1130switch (member.Kind) 1177if (member.Kind != SymbolKind.Field && 1178member.Kind != SymbolKind.Property && 1179member.Kind != SymbolKind.Event) 1969switch (symbol.Kind) 1996throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 2169if (container.Kind == SymbolKind.NamedType) 4507if (members.Any(static m => m.Kind == SymbolKind.Field)) 4513if (members.Any(static m => m.Kind == SymbolKind.Property)) 5540if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7259switch (member.Kind) 7534return (type.Kind == SymbolKind.TypeParameter && !type.IsReferenceType) || type.IsNullableTypeOrTypeParameter(); 8239if (symbol.Kind == SymbolKind.Method) 8256int? memberIndex = symbol.Kind == SymbolKind.Property ? symbol.MemberIndexOpt : null; 10866if (member.Kind == SymbolKind.Property)
FlowAnalysis\NullableWalker_Patterns.cs (1)
264if (member.Symbol.Kind is not (SymbolKind.Property or SymbolKind.Field))
FlowAnalysis\ReadWriteWalker.cs (2)
81while (current?.Kind is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property) 128if (variable.Kind != SymbolKind.Field) (IsInside ? _readInside : _readOutside).Add(variable);
FlowAnalysis\UnassignedVariablesWalker.cs (1)
59if (symbol.Kind != SymbolKind.Field)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
78if (p.Variable?.Kind == SymbolKind.Local)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
479if (member.Kind != SymbolKind.Method) 507if (member.Kind != SymbolKind.Property)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
576switch (variable.Kind) 597throw ExceptionUtilities.UnexpectedValue(variable.Kind);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (6)
609symbol.Kind == SymbolKind.Local || 610symbol.Kind == SymbolKind.Parameter || 611symbol.Kind == SymbolKind.Method); 657if (symbol.Kind == SymbolKind.Method) 683switch (capturedVariable.Kind) 694Debug.Assert(capturedVariable.Kind == SymbolKind.Method);
Lowering\ClosureConversion\ClosureConversion.cs (2)
750switch (symbol.Kind) 780throw ExceptionUtilities.UnexpectedValue(symbol.Kind);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (7)
911switch (symbol.Kind) 920throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 926switch (symbol.Kind) 935throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 963builder.Add(_bound.StaticCall(sym.Kind is SymbolKind.Property ? 972builder.Add(_bound.StaticCall(sym.Kind is SymbolKind.Property ? 981builder.Add(_bound.StaticCall(sym.Kind is SymbolKind.Property ?
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
208Debug.Assert(symbol.Kind == SymbolKind.Local || symbol.Kind == SymbolKind.Parameter || symbol is LocalFunctionSymbol);
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
206var enumDelta = (targetSymbol.Kind == SymbolKind.Parameter) ?
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2101if (exprType.Kind == SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
691refKind = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.Kind == SymbolKind.TypeParameter ? RefKind.Ref : RefKind.None;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (5)
163Debug.Assert(propertyOrEvent.Kind == SymbolKind.Property || propertyOrEvent.Kind == SymbolKind.Event); 203var variableRepresentsLocation = rewrittenReceiver.Type.IsValueType || rewrittenReceiver.Type.Kind == SymbolKind.TypeParameter; 461Debug.Assert(fieldOrEvent.Kind == SymbolKind.Field || fieldOrEvent.Kind == SymbolKind.Event);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
44if (nodeExpressionType.Kind == SymbolKind.ArrayType)
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
84if (argumentType.Kind == SymbolKind.TypeParameter)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
672switch (memberSymbol.Kind) 712throw ExceptionUtilities.UnexpectedValue(memberSymbol.Kind);
Lowering\MethodToClassRewriter.cs (3)
636if (member.Kind == SymbolKind.Method) 679if (member.Kind == SymbolKind.Property) 704switch (member.Kind)
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
211var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type; 260switch (symbol.Kind)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
177Debug.Assert(localOrParameter.Kind == SymbolKind.Local || localOrParameter.Kind == SymbolKind.Parameter);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
153Debug.Assert(variable.Kind == SymbolKind.Local || variable.Kind == SymbolKind.Parameter); 155if (variable.Kind == SymbolKind.Local)
Lowering\SynthesizedSubmissionFields.cs (1)
64if ((object)hostObjectTypeSymbol != null && hostObjectTypeSymbol.Kind != SymbolKind.ErrorType)
Lowering\SyntheticBoundNodeFactory.cs (1)
1773if (exprType.Kind == SymbolKind.TypeParameter)
Operations\CSharpOperationFactory.cs (2)
867switch (memberSymbol.Kind) 902throw ExceptionUtilities.UnexpectedValue(memberSymbol.Kind);
Symbols\AbstractTypeMap.cs (1)
99switch (previous.Kind)
Symbols\AliasSymbol.cs (1)
83if (previousTarget.Kind != SymbolKind.Namespace)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
784if (member.Kind == SymbolKind.Method)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
117switch (m.Kind)
Symbols\Attributes\AttributeData.cs (13)
292if (foundMember.Kind == SymbolKind.Field || foundMember.Kind == SymbolKind.Property) 342Debug.Assert(targetSymbol.Kind == SymbolKind.Assembly || targetSymbol.Kind == SymbolKind.NamedType || targetSymbol.Kind == SymbolKind.Method); 385Debug.Assert(targetSymbol.Kind == SymbolKind.Assembly || targetSymbol.Kind == SymbolKind.NamedType || targetSymbol.Kind == SymbolKind.Method); 439if (targetSymbol.Kind == SymbolKind.NamedType || targetSymbol.Kind == SymbolKind.Method) 453if (targetSymbol.Kind == SymbolKind.Assembly) 558if (members.Length == 1 && members[0].Kind == SymbolKind.Property) 684switch (target.Kind)
Symbols\Attributes\SourceAttributeData.cs (2)
290if (parameterType.Kind != SymbolKind.NamedType && parameterType.Kind != SymbolKind.ErrorType)
Symbols\BaseTypeAnalysis.cs (2)
184switch (member.Kind) 195throw ExceptionUtilities.UnexpectedValue(member.Kind);
Symbols\Compilation_WellKnownMembers.cs (12)
221if (type.Kind != SymbolKind.NamedType || type.TypeKind != TypeKind.Class) 295if (member.Kind != targetSymbolKind || member.IsStatic != isStatic || 1073if (type.Kind != SymbolKind.ArrayType) 1097if (type.Kind != SymbolKind.NamedType) 1115if (type.Kind != SymbolKind.NamedType) 1148return type.Kind == SymbolKind.PointerType ? ((PointerTypeSymbol)type).PointedAtType : null; 1158if (type.Kind != SymbolKind.ArrayType) 1187if (type.Kind != SymbolKind.TypeParameter) 1192if (typeParam.ContainingSymbol.Kind != SymbolKind.Method) 1201if (type.Kind != SymbolKind.TypeParameter) 1206if (typeParam.ContainingSymbol.Kind != SymbolKind.NamedType) 1215if (type.Kind != SymbolKind.ArrayType)
Symbols\ConstraintsHelper.cs (2)
587if (type.Kind == SymbolKind.NamedType) 591else if (type.Kind == SymbolKind.PointerType)
Symbols\ExtendedErrorTypeSymbol.cs (4)
36(containingSymbol.Kind == SymbolKind.Namespace) || 37(containingSymbol.Kind == SymbolKind.NamedType) || 38(containingSymbol.Kind == SymbolKind.ErrorType)); 314switch (symbol.Kind)
Symbols\MemberSignatureComparer.cs (7)
426if (member1 is null || member2 is null || member1.Kind != member2.Kind) 537hash = Hash.Combine((int)member.Kind, hash); 553if (member.Kind != SymbolKind.Field) 852switch (member.Kind) 860throw ExceptionUtilities.UnexpectedValue(member.Kind); 866return member.Kind == SymbolKind.Method && ((MethodSymbol)member).IsVararg;
Symbols\MemberSymbolExtensions.cs (34)
35switch (member.Kind) 44throw ExceptionUtilities.UnexpectedValue(member.Kind); 53switch (member.Kind) 62throw ExceptionUtilities.UnexpectedValue(member.Kind); 68switch (member.Kind) 76throw ExceptionUtilities.UnexpectedValue(member.Kind); 85switch (member.Kind) 94throw ExceptionUtilities.UnexpectedValue(member.Kind); 100switch (member.Kind) 110throw ExceptionUtilities.UnexpectedValue(member.Kind); 131switch (symbol.Kind) 162return symbol.Kind == SymbolKind.Method && IsAccessor((MethodSymbol)symbol); 178return symbol.Kind == SymbolKind.Method && IsOperator((MethodSymbol)symbol); 183return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexer; 188return symbol.Kind == SymbolKind.Property && ((PropertySymbol)symbol).IsIndexedProperty; 193return symbol.Kind == SymbolKind.Method && ((MethodSymbol)symbol).MethodKind == MethodKind.Conversion; 220switch (m.Kind) 236throw ExceptionUtilities.UnexpectedValue(m.Kind); 269switch (s.Kind) 282throw ExceptionUtilities.UnexpectedValue(s.Kind); 291switch (symbol.Kind) 324switch (symbol.Kind) 336throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 342switch (symbol.Kind) 354throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 535switch (member.Kind) 577switch (member.Kind) 588throw ExceptionUtilities.UnexpectedValue(member.Kind); 594switch (member.Kind) 609switch (member.Kind) 618throw ExceptionUtilities.UnexpectedValue(member.Kind); 624switch (member.Kind) 645switch (member.Kind) 661if (member.Kind == SymbolKind.Method)
Symbols\MergedNamespaceSymbol.cs (1)
145if (childSymbol.Kind == SymbolKind.Namespace)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
151switch (type.Kind)
Symbols\Metadata\PE\MetadataDecoder.cs (5)
216switch (symbol.Kind) 268throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 316Debug.Assert(ReferenceEquals(newresult, result) || (newresult.Kind == SymbolKind.ErrorType)); 544Debug.Assert(scope.Kind == SymbolKind.NamedType || scope.Kind == SymbolKind.ErrorType);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (12)
374while (s.Kind != SymbolKind.Namespace) 965if (staticIndex < staticFields.Length && staticFields[staticIndex].Kind == SymbolKind.Field) 981Debug.Assert(staticIndex == staticFields.Length || staticFields[staticIndex].Kind != SymbolKind.Field); 1072if (members[index].Kind != SymbolKind.Method) 1090if (index >= members.Length || members[index].Kind != SymbolKind.Method) 1118if (index == members.Length || members[index].Kind != SymbolKind.Method) 1379Debug.Assert(field.AssociatedSymbol.Kind == SymbolKind.Event); 1414Debug.Assert(previous.Kind.ToSortOrder() <= current.Kind.ToSortOrder()); 1451if (member.Kind == SymbolKind.NamedType) 2445if (members[i].Kind == kind) 2468if (member.Kind != kind)
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
316var accessSymbol = containingSymbol.Kind == SymbolKind.Property ? containingSymbol.ContainingSymbol : containingSymbol; 1199_ => throw ExceptionUtilities.UnexpectedValue(this.ContainingSymbol.Kind)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
106return this.ContainingSymbol.Kind == SymbolKind.Method 253if (_containingSymbol.Kind == SymbolKind.Method) 609var typeParameters = (_containingSymbol.Kind == SymbolKind.Method) ? 670bool inherited = (_containingSymbol.Kind == SymbolKind.Method) && ((MethodSymbol)_containingSymbol).IsOverride;
Symbols\Metadata\PE\SymbolFactory.cs (1)
93if (arg.Key.Kind == SymbolKind.ErrorType &&
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
157switch (type.Kind)
Symbols\MissingMetadataTypeSymbol.cs (1)
255if (symbol.Kind == SymbolKind.Namespace) // VB should also check name casing.
Symbols\MissingNamespaceSymbol.cs (1)
68if (_containingSymbol.Kind == SymbolKind.NetModule)
Symbols\NamedTypeSymbol.cs (4)
315if (candidate.Kind == SymbolKind.Property) 350if (member.Kind == SymbolKind.Method) 698switch (symbol.Kind) 1634ContainingSymbol?.Kind == SymbolKind.Namespace &&
Symbols\NamespaceOrTypeSymbol.cs (2)
43return Kind == SymbolKind.Namespace; 262if (scope.Kind == SymbolKind.ErrorType)
Symbols\NamespaceSymbol.cs (1)
269if (sym.Kind == SymbolKind.Namespace)
Symbols\ObsoleteAttributeHelpers.cs (1)
63if (symbol.Kind == SymbolKind.Field)
Symbols\OverriddenOrHiddenMembersHelpers.cs (31)
86Debug.Assert(member.Kind == SymbolKind.Method || member.Kind == SymbolKind.Property || member.Kind == SymbolKind.Event); 100if (associatedPropertyOrEvent.Kind == SymbolKind.Property) 106Debug.Assert(associatedPropertyOrEvent.Kind == SymbolKind.Event); 177FindRelatedMembers(member.IsOverride, memberIsFromSomeCompilation, member.Kind, bestMatch, out overriddenMembers, ref hiddenBuilder); 255if (hiddenByProperty.Kind == SymbolKind.Property) 347if (hiddenByEvent.Kind == SymbolKind.Event) 499FindRelatedMembers(member.IsOverride, memberIsFromSomeCompilation, member.Kind, hidden, out overriddenMembers, ref hiddenAndRelatedBuilder); 559SymbolKind memberKind = member.Kind; 573else if (otherMember.Kind != memberKind) 678if (otherMember.Kind == currTypeBestMatch.Kind && !ReferenceEquals(otherMember, currTypeBestMatch)) 716bool needToSearchForRelated = representativeMember.Kind != SymbolKind.Field && representativeMember.Kind != SymbolKind.NamedType && 756if (hiddenMember.Kind != SymbolKind.Method || ((MethodSymbol)hiddenMember).CanBeHiddenByMemberKind(hidingMemberKind)) 792Debug.Assert(representativeMember.Kind == SymbolKind.Property || !representativeMember.ContainingType.IsDefinition); 798if (otherMember.Kind == representativeMember.Kind) 854Debug.Assert(representativeMember.Kind != SymbolKind.Field); 855Debug.Assert(representativeMember.Kind != SymbolKind.NamedType); 856Debug.Assert(representativeMember.Kind == SymbolKind.Property || !representativeMember.ContainingType.IsDefinition); 861if (otherMember.Kind == representativeMember.Kind) 873switch (member.Kind) 883throw ExceptionUtilities.UnexpectedValue(member.Kind); 889switch (member.Kind) 905throw ExceptionUtilities.UnexpectedValue(member.Kind); 911switch (member.Kind) 923throw ExceptionUtilities.UnexpectedValue(member.Kind); 1034if (otherMember.Kind == SymbolKind.Method &&
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (2)
38bool INamespaceOrTypeSymbol.IsNamespace => UnderlyingSymbol.Kind == SymbolKind.Namespace; 40bool INamespaceOrTypeSymbol.IsType => UnderlyingSymbol.Kind != SymbolKind.Namespace;
Symbols\PublicModel\Symbol.cs (1)
195SymbolKind ISymbol.Kind => UnderlyingSymbol.Kind;
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
85if (s.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)s).IsExplicitDefinitionOfNoPiaLocalType)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (7)
164Debug.Assert(symbol.Kind != SymbolKind.NamedType || ((NamedTypeSymbol)symbol).PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive); 322if (type.ContainingSymbol.Kind != SymbolKind.NamedType && 645switch (symbol.Kind) 686throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 1031if (retargetedMember.Kind == SymbolKind.Method) 1097if (retargetedMember.Kind == SymbolKind.Property) 1116if (retargetedMember.Kind == SymbolKind.Event)
Symbols\Source\ExplicitInterfaceHelpers.cs (5)
257if (interfaceMember.Kind != implementingMember.Kind || !interfaceMember.IsImplementableInterfaceMember()) 314switch (implementedMember.Kind) 390if (collisionCandidateMember.Kind == implementingMember.Kind && implementedMember != collisionCandidateMember)
Symbols\Source\LocalFunctionSymbol.cs (2)
441if (tpEnclosing.ContainingSymbol.Kind == SymbolKind.Method) 448Debug.Assert(tpEnclosing.ContainingSymbol.Kind == SymbolKind.NamedType);
Symbols\Source\ModifierUtils.cs (1)
470(symbol.Kind != SymbolKind.Method || (modifiers & DeclarationModifiers.Partial) == 0) &&
Symbols\Source\ParameterHelpers.cs (1)
909if (current.Kind == SymbolKind.Method)
Symbols\Source\SourceAssemblySymbol.cs (5)
1113if (member.Kind == SymbolKind.Namespace) 2073switch (member.Kind) 2088throw ExceptionUtilities.UnexpectedValue(member.Kind); 2237if (forwardedType.Kind != SymbolKind.NamedType) 2732if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.Kind == SymbolKind.Event)
Symbols\Source\SourceEventSymbol.cs (1)
705if (interfaceMember.Kind == SymbolKind.Event && //quick check (necessary, not sufficient)
Symbols\Source\SourceMemberContainerSymbol.cs (18)
274if (ContainingSymbol.Kind == SymbolKind.Namespace && 297if (containingSymbol.Kind == SymbolKind.Namespace) 445switch (this.ContainingSymbol.Kind) 1520switch (m.Kind) 1995if (symbol.Kind == SymbolKind.NamedType || 2038if (symbol.Kind != SymbolKind.Method || lastSym.Kind != SymbolKind.Method) 2040if (symbol.Kind != SymbolKind.Field || !symbol.IsImplicitlyDeclared) 2049if (lastSym.Kind == SymbolKind.Method) 2320switch (symbol.Kind) 2386switch (member.Kind) 2448if (member.Kind != SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor) 2700switch (m.Kind) 3869if (symbol.Kind != SymbolKind.Method) 3905if (symbol.Kind != SymbolKind.Method) 4061switch (member.Kind) 4102throw ExceptionUtilities.UnexpectedValue(member.Kind); 4811if (member.Kind == SymbolKind.Method)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (24)
103if (abstractMember.Kind == SymbolKind.Method && abstractMember is not SynthesizedRecordOrdinaryMethod) 139SymbolKind interfaceMemberKind = interfaceMember.Kind; 426if (interfacePropertyOrEvent.Kind == SymbolKind.Event && implementingPropertyOrEvent.Kind == SymbolKind.Event && 532switch (member.Kind) 658sourceField.AssociatedSymbol.Kind != SymbolKind.Event); 671Debug.Assert(symbol.Kind == SymbolKind.Field || symbol.Kind == SymbolKind.NamedType); 703if (hiddenMember.Kind == SymbolKind.Method && !((MethodSymbol)hiddenMember).CanBeHiddenByMemberKind(symbol.Kind)) 751var overridingMemberIsMethod = overridingMember.Kind == SymbolKind.Method; 752var overridingMemberIsProperty = overridingMember.Kind == SymbolKind.Property; 753var overridingMemberIsEvent = overridingMember.Kind == SymbolKind.Event; 808else if (associatedPropertyOrEvent.Kind == SymbolKind.Property) //no specific errors for event accessors 870var overridingMemberIsMethod = overridingMember.Kind == SymbolKind.Method; 871var overridingMemberIsProperty = overridingMember.Kind == SymbolKind.Property; 872var overridingMemberIsEvent = overridingMember.Kind == SymbolKind.Event; 883Debug.Assert(overriddenMember.Kind == overridingMember.Kind); 1586if (!hidingMemberIsNew && hiddenMember.Kind == hidingMember.Kind && 1641switch (hiddenMember.Kind) 1671switch (hidingMember.Kind) 1806if ((object)implementingMember == null || implementingMember.Kind != SymbolKind.Method)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
463if ((object)associatedPropertyOrEvent != null && associatedPropertyOrEvent.Kind == SymbolKind.Event)
Symbols\Source\SourceModuleSymbol.cs (2)
169switch (s.Kind) 608switch (member.Kind)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
91if (containingSymbol.Kind == SymbolKind.NamedType)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (4)
769if (imported.Kind == SymbolKind.Namespace) 789else if (imported.Kind == SymbolKind.NamedType) 818else if (imported.Kind is SymbolKind.ArrayType or SymbolKind.PointerType or SymbolKind.FunctionPointerType or SymbolKind.DynamicType) 827else if (imported.Kind != SymbolKind.ErrorType)
Symbols\Source\SourceParameterSymbol.cs (2)
111Debug.Assert((owner.Kind == SymbolKind.Method) || (owner.Kind == SymbolKind.Property));
Symbols\SubstitutedNamedTypeSymbol.cs (2)
246if (t.Kind == SymbolKind.NamedType) 296if (t.Kind == SymbolKind.NamedType)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
65if (_container.Kind == SymbolKind.Method)
Symbols\Symbol.cs (11)
199switch (this.Kind) 633switch (this.Kind) 702throw ExceptionUtilities.UnexpectedValue(this.Kind); 725if (this.Kind == SymbolKind.Method) 902Debug.Assert(this.Kind == SymbolKind.NamedType || this.Kind == SymbolKind.Method); 1017return $"{this.Kind} {this.ToDisplayString(s_debuggerDisplayFormat)}"; 1210switch (this.Kind) 1628switch (this.Kind) 1704switch (variable.Kind) 1740throw ExceptionUtilities.UnexpectedValue(variable.Kind);
Symbols\Symbol_Attributes.cs (3)
46switch (this.Kind) 911Debug.Assert(this.Kind == SymbolKind.Method); 928switch (this.Kind)
Symbols\SymbolDistinguisher.cs (6)
57switch (symbol.Kind) 83throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 144switch (symbol.Kind) 196Debug.Assert(unwrappedSymbol.Kind == SymbolKind.DynamicType || unwrappedSymbol.Kind == SymbolKind.ErrorType || unwrappedSymbol.Kind == SymbolKind.FunctionPointerType);
Symbols\SymbolExtensions.cs (13)
122return symbol.Kind.Localize(); 134switch (containingSymbol.Kind) 147while (containingMember is object && containingMember.Kind == SymbolKind.Method) 164switch (symbol.Kind) 201switch (symbol.Kind) 254for (; ((object?)containingSymbol != null) && (containingSymbol.Kind != SymbolKind.Namespace); containingSymbol = containingSymbol.ContainingSymbol) 268switch (symbol.Kind) 316var upperLevelType = symbol.Kind == SymbolKind.NamedType ? (NamedTypeSymbol)symbol : symbol.ContainingType; 332switch (symbol.Kind) 347switch (symbol.Kind) 490switch (symbol.Kind) 534throw ExceptionUtilities.UnexpectedValue(symbol.Kind); 545return symbol.Kind switch
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
104if (m.Kind is SymbolKind.Property)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (5)
199var value = member.Kind switch 203_ => throw ExceptionUtilities.UnexpectedValue(member.Kind) 248if (m.Kind is SymbolKind.Field && m is not TupleErrorFieldSymbol) 253if (m.Kind is SymbolKind.Property) 303if (member.Kind != SymbolKind.Property)
Symbols\Synthesized\SynthesizedContainer.cs (2)
62if (ContainingSymbol.Kind == SymbolKind.NamedType && ContainingSymbol.IsImplicitlyDeclared) 131switch (m.Kind)
Symbols\Synthesized\SynthesizedSubstitutedTypeParameterSymbol.cs (1)
25$"Container is {ContainingSymbol?.Kind}, TypeParameterKind is {this.TypeParameterKind}");
Symbols\Tuples\TupleTypeSymbol.cs (5)
593switch (member.Kind) 700throw ExceptionUtilities.UnexpectedValue(member.Kind); 1016if (member.Kind != SymbolKind.Field) 1061switch (member.Kind) 1091throw ExceptionUtilities.UnexpectedValue(member.Kind);
Symbols\TypeSymbol.cs (20)
736switch (interfaceMember.Kind) 806Debug.Assert(interfaceMember.Kind == SymbolKind.Method || interfaceMember.Kind == SymbolKind.Property || interfaceMember.Kind == SymbolKind.Event); 1002if (!canBeImplementedImplicitlyInCSharp9 && interfaceMember.Kind == SymbolKind.Method && 1401switch (interfaceMember.Kind) 1504associated = implementation.Kind == SymbolKind.Method 1623if (interfaceMember.Kind == SymbolKind.Method) 1673if (interfaceMember.Kind == SymbolKind.Method) 1768if (interfaceMember.Kind == SymbolKind.Event) 1909switch (interfaceMember.Kind) 1957throw ExceptionUtilities.UnexpectedValue(interfaceMember.Kind); 2004switch (interfaceMember.Kind) 2020throw ExceptionUtilities.UnexpectedValue(interfaceMember.Kind); 2024switch (closestMismatch.Kind) 2178if (member.Kind == interfaceMember.Kind) 2285Debug.Assert(interfaceMember.Kind != SymbolKind.Method || (object)interfaceMember == ((MethodSymbol)interfaceMember).ConstructedFrom); 2392if (this.IsAbstract && member.IsAbstract && member.Kind != SymbolKind.NamedType) 2398switch (member.Kind)
Symbols\TypeSymbolExtensions.cs (10)
267if (type.Kind == SymbolKind.ArrayType) 329return type.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)type).IsInterface; 347return type.Kind == SymbolKind.ErrorType; 352return p.ContainingSymbol.Kind == SymbolKind.Method; 553if (symbol.Kind != SymbolKind.Namespace) 1010for (Symbol s2 = sym2; s2.Kind != SymbolKind.Namespace; s2 = s2.ContainingSymbol) 1744switch (methodOrType.Kind) 1778if (container.Kind != SymbolKind.Namespace) 1917switch (type.Kind) 2265if (type.Kind == SymbolKind.NamedType)
Symbols\TypeUnification.cs (2)
109switch (t1.Type.Kind) 267switch (type.Kind)
Symbols\VarianceSafety.cs (2)
47switch (member.Kind) 301switch (type.Kind)
Utilities\TypeSymbolExtensions.cs (2)
29switch (type.Kind) 95switch (type.Kind)