7031 references to SymbolKind
ConfigurationSchemaGenerator (4)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
ILLink.RoslynAnalyzer (26)
CompilationExtensions.cs (4)
84 case SymbolKind.Alias: 89 case SymbolKind.Parameter: 93 case SymbolKind.TypeParameter: 98 while (symbol != null && symbol.Kind != SymbolKind.Namespace) {
DataFlow\DynamicallyAccessedMembersBinder.cs (4)
412 case SymbolKind.Field: 413 case SymbolKind.Method: 414 case SymbolKind.Property: 415 case SymbolKind.Event:
DynamicallyAccessedMembersAnalyzer.cs (5)
132 }, SymbolKind.NamedType); 137 }, SymbolKind.Method); 140 }, SymbolKind.NamedType); 143 }, SymbolKind.Property); 146 }, SymbolKind.Field);
ISymbolExtensions.cs (1)
158 if (methodSymbol.ContainingSymbol?.Kind == SymbolKind.NamedType) {
RequiresAnalyzerBase.cs (4)
37 private protected virtual ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ExtraSymbolActions { get; } = ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)>.Empty; 57 }, SymbolKind.Method); 62 }, SymbolKind.NamedType);
RequiresUnreferencedCodeAnalyzer.cs (4)
94 private protected override ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ExtraSymbolActions => 95 ImmutableArray.Create<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ((typeDerivesFromRucBase, new SymbolKind[] { SymbolKind.NamedType }));
TrimAnalysis\SingleValueExtensions.cs (4)
30 SymbolKind.TypeParameter => new GenericParameterValue ((ITypeParameterSymbol) type), 31 SymbolKind.NamedType => new SystemTypeValue (new TypeProxy (type)), 33 SymbolKind.ArrayType => new SystemTypeValue (new TypeProxy (type.BaseType!)), 34 SymbolKind.ErrorType => UnknownValue.Instance,
Microsoft.Analyzers.Extra (4)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
635foreach (var methodSymbol in targetClassSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Method).OfType<IMethodSymbol>())
MakeExeTypesInternalAnalyzer.cs (1)
137}, SymbolKind.NamedType);
UsingToStringInLoggersAnalyzer.cs (1)
28if (operationBlockContext.OwningSymbol.Kind != SymbolKind.Method)
Utilities\SymbolExtensions.cs (1)
39while (symbol.Kind != SymbolKind.Namespace)
Microsoft.Analyzers.Local (4)
ApiLifecycle\ApiLifecycleAnalyzer.cs (2)
53.Where(symbol => symbol.IsExternallyVisible() && symbol.Kind == SymbolKind.NamedType) 147.Where(symbol => symbol.IsExternallyVisible() && symbol.Kind == SymbolKind.NamedType)
ApiLifecycle\AssemblyAnalysis.cs (1)
202if (member.Kind != SymbolKind.Method)
Utilities\SymbolExtensions.cs (1)
15while (symbol.Kind != SymbolKind.Namespace)
Microsoft.AspNetCore.Analyzers (5)
BuildServiceProviderAnalyzer.cs (1)
21Debug.Assert(context.Symbol.Kind == SymbolKind.NamedType);
StartupAnalyzer.cs (2)
60if (context.OwningSymbol.Kind != SymbolKind.Method) 101}, SymbolKind.NamedType);
UseAuthorizationAnalyzer.cs (1)
22Debug.Assert(context.Symbol.Kind == SymbolKind.NamedType);
UseMvcAnalyzer.cs (1)
21Debug.Assert(context.Symbol.Kind == SymbolKind.NamedType);
Microsoft.AspNetCore.App.Analyzers (1)
Mvc\MvcAnalyzer.cs (1)
87}, SymbolKind.NamedType);
Microsoft.AspNetCore.Components.Analyzers (6)
ComponentParameterAnalyzer.cs (1)
136}, SymbolKind.NamedType);
InternalUsageAnalyzer.cs (5)
52SymbolKind.NamedType, 53SymbolKind.Field, 54SymbolKind.Method, 55SymbolKind.Property, 56SymbolKind.Event);
Microsoft.AspNetCore.Components.SdkAnalyzers (6)
ComponentParameterAnalyzer.cs (1)
123}, SymbolKind.NamedType);
InternalUsageAnalyzer.cs (5)
52SymbolKind.NamedType, 53SymbolKind.Field, 54SymbolKind.Method, 55SymbolKind.Property, 56SymbolKind.Event);
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (2)
53}, SymbolKind.Method); 64}, SymbolKind.NamedType);
TopLevelParameterNameAnalyzer.cs (2)
81}, SymbolKind.Method); 112member.Kind != SymbolKind.Property)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
SymbolApiResponseMetadataProvider.cs (1)
111.FirstOrDefault(m => m.Kind == SymbolKind.Method && m.IsStatic && m.DeclaredAccessibility == Accessibility.Public);
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
285.Where(member => member.Kind == SymbolKind.Method) 289.Where(member => member.Kind == SymbolKind.Method)
HubServerProxyGenerator.Parser.cs (2)
262.Where(member => member.Kind == SymbolKind.Method) 266.Where(member => member.Kind == SymbolKind.Method)
Microsoft.CodeAnalysis (126)
CodeGen\MetadataNamedArgument.cs (1)
41bool Cci.IMetadataNamedArgument.IsField => _entity.Kind == SymbolKind.Field;
CodeGen\PermissionSetAttribute.cs (1)
86member => member.Kind == SymbolKind.Property && ((IPropertySymbol)member).Type.SpecialType == SpecialType.System_String));
Compilation\Compilation.cs (10)
1710case SymbolKind.Assembly: 1712case SymbolKind.PointerType: 1715case SymbolKind.ArrayType: 1718case SymbolKind.Alias: 1721case SymbolKind.Discard: 1724case SymbolKind.FunctionPointerType: 1740case SymbolKind.DynamicType: 1741case SymbolKind.ErrorType: 1742case SymbolKind.Preprocessing: 1743case SymbolKind.Namespace:
Compilation\SymbolInfo.cs (2)
70Debug.Assert(symbol is null || symbol.Kind != SymbolKind.Namespace || ((INamespaceSymbol)symbol).NamespaceKind != NamespaceKindNamespaceGroup); 73Debug.Assert(item.Kind != SymbolKind.Namespace || ((INamespaceSymbol)item).NamespaceKind != NamespaceKindNamespaceGroup);
DiagnosticAnalyzer\AnalysisScope.cs (1)
223!((symbol.Kind == SymbolKind.Namespace && ((INamespaceSymbol)symbol).IsGlobalNamespace));
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
2560var getSymbol = topmostNodeForAnalysis != declaringReferenceSyntax || declaredSymbol.Kind == SymbolKind.Namespace; 2909declaredSymbol.Kind == SymbolKind.Namespace && 2910otherSymbol.Kind == SymbolKind.Namespace &&
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActions.cs (1)
16/// <see cref="AnalyzerActions"/> grouped by <see cref="DiagnosticAnalyzer"/>, and possibly other entities, such as <see cref="OperationKind"/>, <see cref="SymbolKind"/>, etc.
DiagnosticAnalyzer\AnalyzerExecutor.cs (6)
1129case SymbolKind.Method: 1130case SymbolKind.Event: 1131case SymbolKind.Property: 1132case SymbolKind.NamedType: 1133case SymbolKind.Namespace: // We are exposing assembly/module attributes on global namespace symbol. 1136case SymbolKind.Field:
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (2)
187case SymbolKind.NamedType: 191case SymbolKind.Namespace:
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
906symbolDeclaredEvent.Symbol.Kind != SymbolKind.Namespace)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (12)
75/// <param name="symbolKinds">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches one of the <see cref="SymbolKind"/> values.</param> 76public void RegisterSymbolAction(Action<SymbolAnalysisContext> action, params SymbolKind[] symbolKinds) 86/// <param name="symbolKinds">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches one of the <see cref="SymbolKind"/> values.</param> 87public abstract void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds); 93/// <param name="symbolKind">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches the given <see cref="SymbolKind"/>.</param> 94public virtual void RegisterSymbolStartAction(Action<SymbolStartAnalysisContext> action, SymbolKind symbolKind) 370/// <param name="symbolKinds">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches one of the <see cref="SymbolKind"/> values.</param> 371public void RegisterSymbolAction(Action<SymbolAnalysisContext> action, params SymbolKind[] symbolKinds) 381/// <param name="symbolKinds">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches one of the <see cref="SymbolKind"/> values.</param> 382public abstract void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds); 388/// <param name="symbolKind">Action will be executed only if an <see cref="ISymbol"/>'s Kind matches the given <see cref="SymbolKind"/>.</param> 389public virtual void RegisterSymbolStartAction(Action<SymbolStartAnalysisContext> action, SymbolKind symbolKind)
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (2)
24internal static void VerifyArguments<TContext>(Action<TContext> action, ImmutableArray<SymbolKind> symbolKinds) 117private static void VerifySymbolKinds(ImmutableArray<SymbolKind> symbolKinds)
DiagnosticAnalyzer\DiagnosticAnalyzerAction.cs (4)
24public ImmutableArray<SymbolKind> Kinds { get; } 26public SymbolAnalyzerAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> kinds, DiagnosticAnalyzer analyzer) 37public SymbolKind Kind { get; } 39public SymbolStartAnalyzerAction(Action<SymbolStartAnalysisContext> action, SymbolKind kind, DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (4)
60public override void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds) 66public override void RegisterSymbolStartAction(Action<SymbolStartAnalysisContext> action, SymbolKind symbolKind) 165public override void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds) 171public override void RegisterSymbolStartAction(Action<SymbolStartAnalysisContext> action, SymbolKind symbolKind)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
80if (symbol.Kind != SymbolKind.Namespace) 175if (symbol.Kind == SymbolKind.Namespace)
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (10)
119candidateMembers.Where(s => s.Kind == SymbolKind.NamedType).ToImmutableArray() : 120candidateMembers.Where(s => s.Kind != SymbolKind.NamedType).ToImmutableArray(); 171if (containingSymbol.Kind == SymbolKind.NamedType) 203singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Namespace); 217singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Event); 222s.Kind is not SymbolKind.Namespace and 223not SymbolKind.NamedType); 824s.Kind == SymbolKind.NamedType && 832s.Kind is SymbolKind.Namespace or 833SymbolKind.NamedType);
DocumentationCommentId.cs (20)
736SymbolKind kind; 741kind = SymbolKind.Event; 744kind = SymbolKind.Field; 747kind = SymbolKind.Method; 750kind = SymbolKind.Namespace; 753kind = SymbolKind.Property; 756kind = SymbolKind.NamedType; 807else if (kind == SymbolKind.Namespace) 838case SymbolKind.Method: 841case SymbolKind.NamedType: 844case SymbolKind.Property: 847case SymbolKind.Event: 850case SymbolKind.Field: 853case SymbolKind.Namespace: 1169if (symbol.Kind == SymbolKind.NamedType) 1194if (symbol.Kind == SymbolKind.Namespace || (symbol.Kind == SymbolKind.NamedType && ((INamedTypeSymbol)symbol).Arity == 0)) 1215if (symbol.Kind == SymbolKind.Namespace) 1355if (symbol.Kind == SymbolKind.Field) 1371if (symbol.Kind == SymbolKind.Event)
Emit\EditAndContinue\DefinitionMap.cs (1)
653if (member is { Kind: SymbolKind.Field, IsStatic: false })
Emit\EditAndContinue\SymbolChanges.cs (9)
170if (synthesizedSymbol.Kind == SymbolKind.NamedType) 175if (synthesizedSymbol.Kind == SymbolKind.Method) 193if (synthesizedSymbol.Kind == SymbolKind.NamedType) 201if (synthesizedSymbol.Kind == SymbolKind.Method) 267if (symbol.Kind == SymbolKind.Namespace) 417if (newMember.Kind == SymbolKind.Method) 440else if (newMember.Kind == SymbolKind.Property) 517case SymbolKind.NetModule: 518case SymbolKind.Assembly:
Operations\ControlFlowGraphBuilder.cs (2)
4027return resource.Type == null || resource.Type.Kind == SymbolKind.DynamicType; 7957.Where(m => m.Kind == SymbolKind.Property)
SourceGeneration\GeneratedCodeUtilities.cs (1)
27if (symbol.Kind != SymbolKind.Namespace)
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (2)
199if (containingSymbol.Kind == SymbolKind.Namespace && 319if (member.Kind == SymbolKind.Field)
SymbolDisplay\AbstractSymbolDisplayVisitor_Minimal.cs (2)
70case SymbolKind.NamedType: 73case SymbolKind.Method:
Symbols\Attributes\CommonAttributeData.cs (1)
79if (attributeType.ContainingSymbol?.Kind != SymbolKind.Namespace)
Symbols\ISymbol.cs (2)
26/// Gets the <see cref="SymbolKind"/> indicating what kind of symbol it is. 28SymbolKind Kind { get; }
Symbols\ISymbolExtensions.cs (1)
97if (sym.Kind == SymbolKind.Namespace)
Symbols\ISymbolInternal.cs (2)
20/// Gets the <see cref="SymbolKind"/> indicating what kind of symbol it is. 22SymbolKind Kind { get; }
Symbols\ITypeSymbol.cs (1)
257return type?.Kind == SymbolKind.DynamicType;
Symbols\SymbolKind.cs (2)
127internal const SymbolKind FunctionType = (SymbolKind)255;
Symbols\SymbolKindExtensions.cs (18)
11public static int ToSortOrder(this SymbolKind kind) 15case SymbolKind.Field: 17case SymbolKind.Method: 19case SymbolKind.Property: 21case SymbolKind.Event: 23case SymbolKind.NamedType: 25case SymbolKind.Namespace: 27case SymbolKind.Alias: 29case SymbolKind.ArrayType: 31case SymbolKind.Assembly: 37case SymbolKind.Label: 39case SymbolKind.Local: 41case SymbolKind.NetModule: 43case SymbolKind.Parameter: 45case SymbolKind.RangeVariable: 47case SymbolKind.TypeParameter: 49case SymbolKind.DynamicType: 51case SymbolKind.Preprocessing:
Microsoft.CodeAnalysis.CodeStyle (227)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
62context.RegisterSymbolAction(AnalyzeFieldSymbol, SymbolKind.Field); 85}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
36private static readonly ImmutableArray<SymbolKind> _symbolKinds = [SymbolKind.Event, SymbolKind.Method, SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Property];
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
109var symbolKind = operation switch
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (5)
767case SymbolKind.NamedType: 768case SymbolKind.Method: 769case SymbolKind.Field: 770case SymbolKind.Property: 771case SymbolKind.Event:
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (11)
193compilationStartContext.RegisterSymbolAction(AnalyzeSymbolDeclaration, SymbolKind.Method, SymbolKind.Field, SymbolKind.Property, SymbolKind.Event); 225}, SymbolKind.NamedType); 432case SymbolKind.Method: 433case SymbolKind.Property: 744case SymbolKind.Method: 845case SymbolKind.Field: 848case SymbolKind.Property: 856case SymbolKind.Event:
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
606(symbol.IsStatic && symbol.Kind == SymbolKind.Local) ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
71}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
225}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (6)
113case SymbolKind.Namespace: 114case SymbolKind.NamedType: 115case SymbolKind.Field: 116case SymbolKind.Parameter: 117case SymbolKind.Local: 121if (symbol.Kind == SymbolKind.Property && isTopLevel)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
83if (member.Kind == SymbolKind.Field)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
287if (symbolInfo.Symbol.Kind != SymbolKind.Method)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (10)
119candidateMembers.Where(s => s.Kind == SymbolKind.NamedType).ToImmutableArray() : 120candidateMembers.Where(s => s.Kind != SymbolKind.NamedType).ToImmutableArray(); 171if (containingSymbol.Kind == SymbolKind.NamedType) 203singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Namespace); 217singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Event); 222s.Kind is not SymbolKind.Namespace and 223not SymbolKind.NamedType); 824s.Kind == SymbolKind.NamedType && 832s.Kind is SymbolKind.Namespace or 833SymbolKind.NamedType);
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
27if (symbol.Kind != SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (8)
89if (member.Kind == SymbolKind.Property) 101if (member.Kind == SymbolKind.Property) 199m.Kind != SymbolKind.NamedType && IsImplementable(m) && 209if (member.Kind != SymbolKind.Property) 299return type.GetMembers().WhereAsArray(m => m.Kind != SymbolKind.NamedType && 309if (member.Kind != SymbolKind.Property) 484case SymbolKind.Field: 495case SymbolKind.Property:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (28)
35case SymbolKind.Alias: 40case SymbolKind.Parameter: 44case SymbolKind.TypeParameter: 49while (symbol != null && symbol.Kind != SymbolKind.Namespace) 116if (symbol.Kind is SymbolKind.Event or SymbolKind.Property) 147if (symbol.Kind is not SymbolKind.Method and not SymbolKind.Property and not SymbolKind.Event) 175if (symbol.Kind == SymbolKind.Event) 180if (symbol.Kind == SymbolKind.Property) 185if (symbol.Kind == SymbolKind.Method) 222=> symbol?.Kind == SymbolKind.ArrayType; 230public static bool IsKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 233public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 236public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2) 242public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2, SymbolKind kind3) 248public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, params SymbolKind[] kinds) 258=> symbol?.Kind == SymbolKind.Field && symbol.ContainingType.IsEnumType(); 340SymbolKind.NamedType => ((INamedTypeSymbol)symbol).Arity, 341SymbolKind.Method => ((IMethodSymbol)symbol).Arity, 521=> symbol != null && symbol.Kind == SymbolKind.NamedType && symbol.IsStatic; 524=> symbol?.Kind == SymbolKind.Namespace; 581if (symbol.Kind != SymbolKind.Local) 767public static bool IsKind<TSymbol>(this ISymbol symbol, SymbolKind kind, [NotNullWhen(true)] out TSymbol? result) where TSymbol : class, ISymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (22)
95case SymbolKind.Alias: 98case SymbolKind.ArrayType: 101case SymbolKind.PointerType: 104case SymbolKind.FunctionPointerType: 121case SymbolKind.NamedType: 124case SymbolKind.ErrorType: 125case SymbolKind.Discard: 128case SymbolKind.TypeParameter: 129case SymbolKind.Parameter: 130case SymbolKind.Local: 131case SymbolKind.Label: 132case SymbolKind.Namespace: 133case SymbolKind.DynamicType: 134case SymbolKind.Assembly: 135case SymbolKind.NetModule: 136case SymbolKind.RangeVariable: 140case SymbolKind.Method: 141case SymbolKind.Property: 142case SymbolKind.Field: 143case SymbolKind.Event: 155if (symbol.ContainingSymbol.IsKind(SymbolKind.DynamicType)) 192if (typeArg.Kind != SymbolKind.TypeParameter &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
603case SymbolKind.NamedType: 614case SymbolKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (2)
180if (symbol.Kind == SymbolKind.Discard) 204if (symbol.Kind == SymbolKind.Discard)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (14)
124private static readonly SymbolKindOrTypeKind _namespace = new(SymbolKind.Namespace); 129private static readonly SymbolKindOrTypeKind _property = new(SymbolKind.Property); 132private static readonly SymbolKindOrTypeKind _field = new(SymbolKind.Field); 133private static readonly SymbolKindOrTypeKind _event = new(SymbolKind.Event); 135private static readonly SymbolKindOrTypeKind _parameter = new(SymbolKind.Parameter); 136private static readonly SymbolKindOrTypeKind _typeParameter = new(SymbolKind.TypeParameter); 137private static readonly SymbolKindOrTypeKind _local = new(SymbolKind.Local); 413case SymbolKind.Namespace: 416case SymbolKind.Property: 419case SymbolKind.Field: 422case SymbolKind.Event: 425case SymbolKind.Parameter: 428case SymbolKind.TypeParameter: 431case SymbolKind.Local:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (4)
17private readonly ImmutableArray<SymbolKind> _symbolKindsThatCanBeOverridden = 18[SymbolKind.Method, SymbolKind.Property, SymbolKind.Event];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (26)
66new SymbolKindOrTypeKind(SymbolKind.Namespace), 74new SymbolKindOrTypeKind(SymbolKind.Property), 77new SymbolKindOrTypeKind(SymbolKind.Field), 78new SymbolKindOrTypeKind(SymbolKind.Event), 79new SymbolKindOrTypeKind(SymbolKind.Parameter), 81new SymbolKindOrTypeKind(SymbolKind.Local), 101public bool AppliesTo(SymbolKind symbolKind, Accessibility accessibility) 164case SymbolKind.Namespace: 167case SymbolKind.Parameter: 168case SymbolKind.TypeParameter: 171case SymbolKind.Method: 293foreach (var symbolKindElement in symbolKindListElement.Elements(nameof(SymbolKind))) 344public SymbolKindOrTypeKind(SymbolKind symbolKind) 359public SymbolKind? SymbolKind => (_category == SymbolCategory.Other) ? (SymbolKind)_kind : null; 366SymbolCategory.Other => symbol.IsKind((SymbolKind)_kind), 375SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 426var symbolKind = (SymbolKind)Enum.Parse(typeof(SymbolKind), symbolKindElement.Value); 432CodeAnalysis.SymbolKind.Method => new(CodeAnalysis.MethodKind.Ordinary), 502var kind = symbol.Kind; 503if (Modifier.IsAsync && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 510if (kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsReadOnly) 518if ((kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsConst) || 519(kind == SymbolKind.Local && ((ILocalSymbol)symbol).IsConst))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SimplifierOptions.cs (5)
42public bool TryGetQualifyMemberAccessOption(SymbolKind symbolKind, [NotNullWhen(true)] out CodeStyleOption2<bool>? option) 46SymbolKind.Field => QualifyFieldAccess, 47SymbolKind.Property => QualifyPropertyAccess, 48SymbolKind.Method => QualifyMethodAccess, 49SymbolKind.Event => QualifyEventAccess,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (2)
65if (symbol.Kind == SymbolKind.Alias) 74else if (symbol.Kind != SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
55var kind = symbol.Kind; 136var kind = (SymbolKind)reader.ReadInteger(); 256SemanticModel semanticModel, SyntaxNode containerDeclaration, SymbolKind kind, string localName, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
498if (symbol.Kind == SymbolKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.IsKind(SymbolKind.Method) 878return symbol.Kind == SymbolKind.Method && 1040if (receiverType.IsKind(SymbolKind.TypeParameter) && !receiverType.IsReferenceType) 1059return receiverSymbol.IsKind(SymbolKind.Method) || 1061receiverSymbol.IsKind(SymbolKind.Property); 1066if (originalSymbol.IsKind(SymbolKind.Method) || originalSymbol.IsIndexer())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (6)
41SymbolKind.Method => HaveSameSignature((IMethodSymbol)symbol1, (IMethodSymbol)symbol2, caseSensitive), 42SymbolKind.Property => HaveSameSignature((IPropertySymbol)symbol1, (IPropertySymbol)symbol2, caseSensitive), 43SymbolKind.Event => HaveSameSignature((IEventSymbol)symbol1, (IEventSymbol)symbol2, caseSensitive), 150case SymbolKind.Method: 155case SymbolKind.Property: 163case SymbolKind.Event:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (5)
175=> symbol.IsKind(SymbolKind.Alias, out IAliasSymbol? alias) ? alias.Target : symbol; 177private static SymbolKind GetKindAndUnwrapAlias(ref ISymbol symbol) 179var k = symbol.Kind; 180if (k == SymbolKind.Alias) 196=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (28)
29var xKind = GetKindAndUnwrapAlias(ref x); 30var yKind = GetKindAndUnwrapAlias(ref y); 39if ((xKind == SymbolKind.DynamicType && IsObjectType(y)) || 40(yKind == SymbolKind.DynamicType && IsObjectType(x))) 48if (xKind == SymbolKind.ArrayType && y.IsReadOnlySpan()) 52else if (x.IsReadOnlySpan() && yKind == SymbolKind.ArrayType) 111private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 116SymbolKind.ArrayType => ArrayTypesAreEquivalent((IArrayTypeSymbol)x, (IArrayTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 117SymbolKind.Assembly => AssembliesAreEquivalent((IAssemblySymbol)x, (IAssemblySymbol)y), 118SymbolKind.DynamicType => NullableAnnotationsEquivalent((IDynamicTypeSymbol)x, (IDynamicTypeSymbol)y), 119SymbolKind.Event => EventsAreEquivalent((IEventSymbol)x, (IEventSymbol)y, equivalentTypesWithDifferingAssemblies), 120SymbolKind.Field => FieldsAreEquivalent((IFieldSymbol)x, (IFieldSymbol)y, equivalentTypesWithDifferingAssemblies), 121SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 122SymbolKind.Local => LocalsAreEquivalent((ILocalSymbol)x, (ILocalSymbol)y), 123SymbolKind.Method => MethodsAreEquivalent((IMethodSymbol)x, (IMethodSymbol)y, equivalentTypesWithDifferingAssemblies), 124SymbolKind.NetModule => ModulesAreEquivalent((IModuleSymbol)x, (IModuleSymbol)y), 125SymbolKind.NamedType => NamedTypesAreEquivalent((INamedTypeSymbol)x, (INamedTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 126SymbolKind.ErrorType => NamedTypesAreEquivalent((INamedTypeSymbol)x, (INamedTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 127SymbolKind.Namespace => NamespacesAreEquivalent((INamespaceSymbol)x, (INamespaceSymbol)y, equivalentTypesWithDifferingAssemblies), 128SymbolKind.Parameter => ParametersAreEquivalent((IParameterSymbol)x, (IParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 129SymbolKind.PointerType => PointerTypesAreEquivalent((IPointerTypeSymbol)x, (IPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 130SymbolKind.Property => PropertiesAreEquivalent((IPropertySymbol)x, (IPropertySymbol)y, equivalentTypesWithDifferingAssemblies), 131SymbolKind.RangeVariable => RangeVariablesAreEquivalent((IRangeVariableSymbol)x, (IRangeVariableSymbol)y), 132SymbolKind.TypeParameter => TypeParametersAreEquivalent((ITypeParameterSymbol)x, (ITypeParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 133SymbolKind.Preprocessing => PreprocessingSymbolsAreEquivalent((IPreprocessingSymbol)x, (IPreprocessingSymbol)y), 134SymbolKind.FunctionPointerType => FunctionPointerTypesAreEquivalent((IFunctionPointerTypeSymbol)x, (IFunctionPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 367if (x.Kind == SymbolKind.ErrorType && 371Debug.Assert(y.Kind == SymbolKind.ErrorType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (17)
44if (x.Kind == SymbolKind.DynamicType || 59SymbolKind.ArrayType => CombineHashCodes((IArrayTypeSymbol)x, currentHash), 60SymbolKind.Assembly => CombineHashCodes((IAssemblySymbol)x, currentHash), 61SymbolKind.Event => CombineHashCodes((IEventSymbol)x, currentHash), 62SymbolKind.Field => CombineHashCodes((IFieldSymbol)x, currentHash), 63SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 64SymbolKind.Local => CombineHashCodes((ILocalSymbol)x, currentHash), 65SymbolKind.Method => CombineHashCodes((IMethodSymbol)x, currentHash), 66SymbolKind.NetModule => CombineHashCodes((IModuleSymbol)x, currentHash), 67SymbolKind.NamedType => CombineHashCodes((INamedTypeSymbol)x, currentHash), 68SymbolKind.Namespace => CombineHashCodes((INamespaceSymbol)x, currentHash), 69SymbolKind.Parameter => CombineHashCodes((IParameterSymbol)x, currentHash), 70SymbolKind.PointerType => CombineHashCodes((IPointerTypeSymbol)x, currentHash), 71SymbolKind.Property => CombineHashCodes((IPropertySymbol)x, currentHash), 72SymbolKind.RangeVariable => CombineHashCodes((IRangeVariableSymbol)x, currentHash), 73SymbolKind.TypeParameter => CombineHashCodes((ITypeParameterSymbol)x, currentHash), 74SymbolKind.Preprocessing => CombineHashCodes((IPreprocessingSymbol)x, currentHash),
Microsoft.CodeAnalysis.CodeStyle.Fixes (61)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
549if (parameterType.Kind == SymbolKind.TypeParameter)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
135symbolInfo.CandidateSymbols.All(symbol => symbol.IsKind(SymbolKind.NamedType) &&
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
129if (symbol.Kind == SymbolKind.Property)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 82var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 83var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 365if (type.Kind == SymbolKind.ArrayType)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
195if (semanticInfo.GetAllSymbols().Any(static s => s.Kind is SymbolKind.Local or SymbolKind.Parameter) &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (4)
109document.Document, state, SymbolKind.Property, state.DetermineMaximalAccessibility(), cancellationToken).ConfigureAwait(false)) 125Document document, State state, SymbolKind kind, Accessibility accessibility, CancellationToken cancellationToken) 191document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 207document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (6)
145.Where(m => m.Kind != SymbolKind.Method); 316CheckSurroundingContext(SymbolKind.Field, cancellationToken); 317CheckSurroundingContext(SymbolKind.Property, cancellationToken); 323SymbolKind symbolKind, CancellationToken cancellationToken) 354if (symbolKind == SymbolKind.Field) 368SymbolKind symbolKind,
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (8)
27new SymbolKindOrTypeKind(SymbolKind.Field), 28new SymbolKindOrTypeKind(SymbolKind.Local), 29new SymbolKindOrTypeKind(SymbolKind.Parameter), 30new SymbolKindOrTypeKind(SymbolKind.RangeVariable), 38[new SymbolKindOrTypeKind(SymbolKind.Field)]), 71var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field), new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local));
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (1)
18this Document document, SymbolKind symbolKind, Accessibility accessibility, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
69if (symbol.Kind == SymbolKind.Field)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
50if (containingSymbol.Kind == SymbolKind.Namespace &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (2)
79public override SymbolKind Kind => SymbolKind.Method;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (2)
47public override SymbolKind Kind => SymbolKind.NamedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (2)
45public override SymbolKind Kind => SymbolKind.ArrayType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventSymbol.cs (2)
44public override SymbolKind Kind => SymbolKind.Event;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldSymbol.cs (2)
49public override SymbolKind Kind => SymbolKind.Field;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (2)
70public override SymbolKind Kind => SymbolKind.NamedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceSymbol.cs (2)
25public override SymbolKind Kind => SymbolKind.Namespace;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (2)
50public override SymbolKind Kind => SymbolKind.Parameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (2)
21public override SymbolKind Kind => SymbolKind.PointerType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertySymbol.cs (2)
56public override SymbolKind Kind => SymbolKind.Property;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
78public abstract SymbolKind Kind { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (2)
49public override SymbolKind Kind => SymbolKind.TypeParameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (6)
32s.Kind is SymbolKind.Local or 33SymbolKind.Parameter or 34SymbolKind.RangeVariable or 35SymbolKind.Field or 36SymbolKind.Property || 37s is { Kind: SymbolKind.NamedType, IsStatic: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
123return symbol.Kind == SymbolKind.Method &&
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (15)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (15)
114case SymbolKind symbolKind: 163ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 195ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 227ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 259ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 421ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 453ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 485ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)), 517ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 581ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Property)), 645ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.TypeParameter)), 678new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field), 679new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 711ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)), 718ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Local)),
Microsoft.CodeAnalysis.CSharp (1271)
Binder\Binder.cs (14)
427RoslynDebug.Assert(member is null || member.Kind != SymbolKind.ErrorType); 447case SymbolKind.Method: 451case SymbolKind.NamedType: 606case SymbolKind.NamedType: 607case SymbolKind.Field: 608case SymbolKind.Method: 609case SymbolKind.Event: 610case SymbolKind.Property: 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 (5)
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);
Binder\Binder_AnonymousTypes.cs (4)
124if (symbol.Kind == SymbolKind.Property) 193case SymbolKind.Method: 196case SymbolKind.Field: 199case SymbolKind.NamedType:
Binder\Binder_Attributes.cs (5)
531if (namedArgumentNameSymbol.Kind == SymbolKind.Property) 609if (namedArgumentNameSymbol.Kind == SymbolKind.ErrorType) 628case SymbolKind.Field: 635case SymbolKind.Property: 949case SymbolKind.TypeParameter:
Binder\Binder_Await.cs (2)
156case SymbolKind.Field: 169case SymbolKind.Method:
Binder\Binder_Constraints.cs (2)
34Debug.Assert((containingSymbol.Kind == SymbolKind.NamedType) || (containingSymbol.Kind == SymbolKind.Method));
Binder\Binder_Crefs.cs (11)
51if (result.Kind == SymbolKind.ErrorType) 101if ((object?)containerOpt != null && containerOpt.Kind == SymbolKind.TypeParameter) 303symbol.Kind != SymbolKind.Method || TypeSymbol.Equals(((MethodSymbol)symbol).ReturnType, returnType, TypeCompareKind.ConsiderEverything2), returnType); 644if (s.Kind != SymbolKind.Method) 667s.Kind != SymbolKind.Method || ((MethodSymbol)s).Arity == 0); 703if (symbol.Kind == SymbolKind.TypeParameter) 718else if (symbol.Kind == SymbolKind.TypeParameter) 773case SymbolKind.Method: 803case SymbolKind.Property: 819case SymbolKind.NamedType: 915if (symbol.Kind == SymbolKind.Method)
Binder\Binder_Expressions.cs (59)
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)) 1960case SymbolKind.Local: 2075case SymbolKind.Parameter: 2158case SymbolKind.NamedType: 2159case SymbolKind.ErrorType: 2160case SymbolKind.TypeParameter: 2165case SymbolKind.Property: 2171case SymbolKind.Event: 2177case SymbolKind.Field: 2183case SymbolKind.Namespace: 2186case SymbolKind.Alias: 2197case SymbolKind.RangeVariable: 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 && 7466case SymbolKind.Field: 7467case SymbolKind.Local: 7468case SymbolKind.Parameter: 7469case SymbolKind.Property: 7470case SymbolKind.RangeVariable: 7553Error(diagnostics, ErrorCode.ERR_TypeArgsNotAllowed, right, right.Identifier.Text, SymbolKind.Property.Localize()); 7781else if (sym.Kind == SymbolKind.Namespace) 7787Debug.Assert(sym.Kind == SymbolKind.NamedType); 7803Debug.Assert(symbols[0].Kind == SymbolKind.NamedType); 7982lookupResult.Symbols.All(s => s.Kind == SymbolKind.Method) ? lookupResult.Symbols.SelectAsArray(s_toMethodSymbolFunc) : ImmutableArray<MethodSymbol>.Empty, 8129if (symbols.Length > 0 && symbols[0].Kind == SymbolKind.Method) 8174case SymbolKind.Field: 8177case SymbolKind.Property: 8180case SymbolKind.Event: 8271Debug.Assert(symbol.Kind != SymbolKind.Method); 8272left = ReplaceTypeOrValueReceiver(left, symbol.IsStatic || symbol.Kind == SymbolKind.NamedType, diagnostics); 8276if (symbol.Kind is not (SymbolKind.Event or SymbolKind.Property)) 8283case SymbolKind.NamedType: 8284case SymbolKind.ErrorType: 8308case SymbolKind.Property: 8314case SymbolKind.Event: 8320case SymbolKind.Field: 8875if ((existingKind == SymbolKind.Method) || 8876((existingKind == SymbolKind.Property) && (kind != SymbolKind.Method))) 8887if ((kind == SymbolKind.Method) || (kind == SymbolKind.Property)) 8912if ((methodOrPropertyGroup[0].Kind == SymbolKind.Method) || ((object)other == null)) 8943case SymbolKind.Method: 8946case SymbolKind.Property:
Binder\Binder_Invocation.cs (2)
369else if (boundExpression.Type?.Kind == SymbolKind.FunctionPointerType) 2038if (parameterType?.Kind == SymbolKind.NamedType &&
Binder\Binder_Lookup.cs (32)
260SymbolKind? lookingForOverloadsOfKind = null; 303if (existingDefinition.Kind != SymbolKind.NamedType || arity == 0) 698if (symbol.Kind == SymbolKind.NamedType) 903if (sym.Kind == SymbolKind.Method || sym.Kind == SymbolKind.Property) 940if (sym.Kind == SymbolKind.Method || sym.Kind == SymbolKind.Property) 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 1486else if ((options & LookupOptions.MustNotBeNamespace) != 0 && unwrappedSymbol.Kind == SymbolKind.Namespace) 1491else if ((options & LookupOptions.LabelsOnly) != 0 && unwrappedSymbol.Kind != SymbolKind.Label) 1549case SymbolKind.Property: 1556case SymbolKind.Event: 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)) 1711case SymbolKind.Method: 1712case SymbolKind.Field: 1713case SymbolKind.Property: 1714case SymbolKind.NamedType: 1715case SymbolKind.Event: 1732case SymbolKind.Method: 1733case SymbolKind.Event: // Spec says it doesn't matter whether it is field-like 1736case SymbolKind.Field: 1740case SymbolKind.Property: 1752case SymbolKind.Field: 1753case SymbolKind.Property: 1754case SymbolKind.Method: 1755case SymbolKind.Event: 1769case SymbolKind.NamedType: 1792case SymbolKind.Method:
Binder\Binder_NameConflicts.cs (3)
139case SymbolKind.NamedType: 140case SymbolKind.Namespace: 143return containingMemberOrLambda.ContainingSymbol?.Kind == SymbolKind.NamedType &&
Binder\Binder_Operators.cs (1)
1086if (type.Kind != SymbolKind.NamedType)
Binder\Binder_Patterns.cs (6)
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 (40)
266if (symbol.Kind != SymbolKind.Alias) 582if (left.Kind == SymbolKind.NamedType) 908if (bindingResult.Kind == SymbolKind.Alias) 960case SymbolKind.Alias: 961if (((AliasSymbol)s).Target.Kind == SymbolKind.NamedType) return true; 963case SymbolKind.NamedType: 964case SymbolKind.TypeParameter: 979if (s.Kind == SymbolKind.Namespace) 1086if (symbol.Kind == SymbolKind.Alias) 1127if (symbol.Kind == SymbolKind.Alias) 1327if (((object)qualifierOpt != null) && (qualifierOpt.Kind == SymbolKind.TypeParameter)) 1481case SymbolKind.Method: 1493case SymbolKind.Property: 1534if (!haveInstanceCandidates && members[0].Kind == SymbolKind.Method) 1611bool isLeftUnboundGenericType = left.Kind == SymbolKind.NamedType && 1915if (symbol.Kind == SymbolKind.NamedType) 1988if (srcSymbol.Kind == SymbolKind.Namespace && mdSymbol.Kind == SymbolKind.NamedType) 1999else if (srcSymbol.Kind == SymbolKind.NamedType && mdSymbol.Kind == SymbolKind.Namespace) 2010else if (srcSymbol.Kind == SymbolKind.NamedType && mdSymbol.Kind == SymbolKind.NamedType) 2024Debug.Assert(!(srcSymbol.Kind == SymbolKind.Namespace && mdSymbol.Kind == SymbolKind.Namespace)); 2059if (first.Kind == SymbolKind.NamedType && second.Kind == SymbolKind.NamedType) 2101else if (first.Kind == SymbolKind.Namespace && second.Kind == SymbolKind.NamedType) 2114else if (first.Kind == SymbolKind.NamedType && second.Kind == SymbolKind.Namespace) 2165else if (first.Kind == SymbolKind.RangeVariable && second.Kind == SymbolKind.RangeVariable) 2199first.Kind == SymbolKind.NamedType && 2200second.Kind == SymbolKind.NamedType && 2260if (singleResult.Kind == SymbolKind.NamedType && 2274else if (singleResult.Kind == SymbolKind.ErrorType) 2333((object)qualifierOpt == null || qualifierOpt.Kind != SymbolKind.ErrorType)) // Suppress cascading. 2485if (symbol.Kind == SymbolKind.Namespace) 2643if (forwardedType.Kind == SymbolKind.ErrorType) 2710if (contextualAttributeBinder is { AttributeTarget: { Kind: SymbolKind.Assembly } })
Binder\Binder_XmlNameAttribute.cs (2)
45Debug.Assert(lookupSymbols[0].Kind == SymbolKind.TypeParameter || lookupSymbols[0].Kind == SymbolKind.Parameter);
Binder\BinderFactory.BinderFactoryVisitor.cs (10)
521return (SourceMemberMethodSymbol)GetMemberSymbol(methodName, baseMethodDeclarationSyntax.FullSpan, container, SymbolKind.Method); 540return (SourcePropertySymbol)GetMemberSymbol(propertyName, basePropertyDeclarationSyntax.Span, container, SymbolKind.Property); 557return (SourceEventSymbol)GetMemberSymbol(eventName, eventDeclarationSyntax.Span, container, SymbolKind.Event); 560private Symbol GetMemberSymbol(string memberName, TextSpan memberSpan, NamedTypeSymbol container, SymbolKind kind) 562Debug.Assert(kind is SymbolKind.Method or SymbolKind.Property or SymbolKind.Event); 592bool checkSymbol(Symbol sym, TextSpan memberSpan, SymbolKind kind, out Symbol result) 601if (kind is SymbolKind.Method or SymbolKind.Property)
Binder\ContextualAttributeBinder.cs (3)
58case SymbolKind.Method: 59case SymbolKind.Property: 60case SymbolKind.Event:
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 (20)
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; 256if (newSymbolKind == SymbolKind.ErrorType) 261if (parameterKind == SymbolKind.Parameter) 265case SymbolKind.Parameter: 266case SymbolKind.Local: 271case SymbolKind.Method: 274goto case SymbolKind.Parameter; 278case SymbolKind.TypeParameter: 282case SymbolKind.RangeVariable: 289if (parameterKind == SymbolKind.TypeParameter) 293case SymbolKind.Parameter: 294case SymbolKind.Local: 299case SymbolKind.Method: 302goto case SymbolKind.Parameter; 306case SymbolKind.TypeParameter: 310case SymbolKind.RangeVariable:
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 (10)
504SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.Kind; 506if (newSymbolKind == SymbolKind.ErrorType) return true; 510declaredInThisScope |= newSymbolKind == SymbolKind.Local && this.Locals.Contains((LocalSymbol)newSymbol); 511declaredInThisScope |= newSymbolKind == SymbolKind.Method && this.LocalFunctions.Contains((LocalFunctionSymbol)newSymbol); 522case SymbolKind.Local: 523case SymbolKind.Parameter: 524case SymbolKind.Method: 525case SymbolKind.TypeParameter: 530case SymbolKind.RangeVariable:
Binder\MethodGroupResolution.cs (1)
48Debug.Assert(((object)otherSymbol == null) || (otherSymbol.Kind != SymbolKind.Method));
Binder\Semantics\AccessCheck.cs (28)
73case SymbolKind.NamedType: 74case SymbolKind.Event: 75case SymbolKind.Field: 76case SymbolKind.Method: 77case SymbolKind.Property: 79case SymbolKind.TypeParameter: 151case SymbolKind.ArrayType: 154case SymbolKind.PointerType: 157case SymbolKind.NamedType: 160case SymbolKind.Alias: 163case SymbolKind.Discard: 166case SymbolKind.FunctionPointerType: 183case SymbolKind.ErrorType: 187case SymbolKind.TypeParameter: 188case SymbolKind.Parameter: 189case SymbolKind.Local: 190case SymbolKind.Label: 191case SymbolKind.Namespace: 192case SymbolKind.DynamicType: 193case SymbolKind.Assembly: 194case SymbolKind.NetModule: 195case SymbolKind.RangeVariable: 196case SymbolKind.Method when ((MethodSymbol)symbol).MethodKind == MethodKind.LocalFunction: 200case SymbolKind.Method: 201case SymbolKind.Property: 202case SymbolKind.Event: 203case SymbolKind.Field: 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)
1450case SymbolKind.Method: 1452case SymbolKind.Property: 3344if (targetType.Kind != SymbolKind.NamedType) 4188member.Kind == SymbolKind.Method && (method = (MethodSymbol)(Symbol)member).Arity > 0) 4639case SymbolKind.Property: 4641case SymbolKind.Method:
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
903Debug.Assert(badMember.Kind == SymbolKind.Method);
Binder\WithLambdaParametersBinder.cs (8)
126SymbolKind newSymbolKind = (object)newSymbol == null ? SymbolKind.Parameter : newSymbol.Kind; 130case SymbolKind.ErrorType: 133case SymbolKind.Parameter: 134case SymbolKind.Local: 139case SymbolKind.Method: 143case SymbolKind.TypeParameter: 147case SymbolKind.RangeVariable:
Binder\WithUsingNamespacesAndTypesBinder.cs (5)
92case SymbolKind.Namespace: 107case SymbolKind.NamedType: 166case SymbolKind.Namespace: 170case SymbolKind.Method: 180case SymbolKind.NamedType:
BoundTree\BoundExpressionExtensions.cs (1)
265return receiverType is NamedTypeSymbol { Kind: SymbolKind.NamedType, IsComImport: true };
BoundTree\UnboundLambda.cs (1)
409bool hasErrors = !types.IsDefault && types.Any(static t => t.Type?.Kind == SymbolKind.ErrorType);
BoundTree\VariablePendingInference.cs (2)
50case SymbolKind.Local: 78case SymbolKind.Field:
Compilation\CSharpCompilation.cs (7)
2406within0.Kind == SymbolKind.Assembly ? 3058if (symbol.Kind == SymbolKind.Method && symbol.IsImplicitlyDeclared && ((MethodSymbol)symbol).MethodKind == MethodKind.Constructor) 3589Debug.Assert(symbol.ContainingSymbol.Kind == SymbolKind.Namespace); // avoid unnecessary traversal of nested types 4720case SymbolKind.Parameter: 4721case SymbolKind.TypeParameter: 4722case SymbolKind.Property: 4723case SymbolKind.Event:
Compilation\CSharpSemanticModel.cs (21)
385SymbolKind firstCandidateKind = symbols[0].Kind; 577if (type?.Kind != SymbolKind.ErrorType) 1577if ((object)container == null || container.Kind == SymbolKind.Namespace) 1595if ((object)containingType != null && containingType.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)containingType).IsScriptClass) 1748if (lookupResult.Symbols.Any(t => t.Kind == SymbolKind.NamedType || t.Kind == SymbolKind.Namespace || t.Kind == SymbolKind.ErrorType)) 2369if (symbol.Kind == SymbolKind.Alias) 3743case SymbolKind.Method: 3744case SymbolKind.Field: 3745case SymbolKind.Property: 3764case SymbolKind.Method: 3771case SymbolKind.Field: 3772case SymbolKind.Property: 3985if (unwrappedSymbols.Count == 1 && unwrappedSymbols[0].Kind == SymbolKind.NamedType) 4522case SymbolKind.Method: 4523case SymbolKind.Property: 4592if (((object)otherSymbol != null) && (otherSymbol.Kind == SymbolKind.Method)) 4715Debug.Assert(singleResult.Symbol.Kind == SymbolKind.Method); 5265case SymbolKind.Event: // for field-like events 5266case SymbolKind.Field:
Compilation\InitializerSemanticModel.cs (6)
150case SymbolKind.Field: 164case SymbolKind.Property: 171case SymbolKind.Parameter: 277case SymbolKind.Field: 278case SymbolKind.Property: 282case SymbolKind.Parameter:
Compilation\MethodBodySemanticModel.cs (1)
52Debug.Assert(owner.Kind == SymbolKind.Method);
Compilation\SyntaxTreeSemanticModel.cs (13)
259Debug.Assert(symbols.All(s => s.Kind == SymbolKind.TypeParameter || s.Kind == SymbolKind.Parameter)); 366if ((object)result == null || result.Kind == SymbolKind.ErrorType) 2412case SymbolKind.Namespace: 2417case SymbolKind.Method: 2422case SymbolKind.NamedType: 2437case SymbolKind.Method: 2458case SymbolKind.NamedType: 2473case SymbolKind.Method: 2486case SymbolKind.NamedType: 2507case ParameterSyntax param when declaredSymbol.Kind == SymbolKind.Property && param.Parent?.Parent is RecordDeclarationSyntax recordDeclaration && recordDeclaration.ParameterList == param.Parent: 2519case SymbolKind.Method: 2543case SymbolKind.NamedType:
Compiler\ClsComplianceChecker.cs (45)
422SymbolKind symbolKind = symbol.Kind; 425symbolKind == SymbolKind.NamedType || 426symbolKind == SymbolKind.Field || 427symbolKind == SymbolKind.Property || 428symbolKind == SymbolKind.Event || 429symbolKind == SymbolKind.Method); 448if (symbol.Kind == SymbolKind.NamedType) 471if (symbolKind == SymbolKind.NamedType) 481else if (symbolKind == SymbolKind.Method) 487else if (symbolKind == SymbolKind.Property) 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) 719case SymbolKind.Field: 723case SymbolKind.Property: 727case SymbolKind.Event: 731case SymbolKind.Method: 746case SymbolKind.NamedType: 754goto case SymbolKind.Method; 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; 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; 1331case SymbolKind.Method: 1340case SymbolKind.Property: 1420return arrayType.ElementType.Kind == SymbolKind.ArrayType;
Compiler\DocumentationCommentCompiler.cs (15)
142symbol.Kind == SymbolKind.Event || 143symbol.Kind == SymbolKind.Field || 144symbol.Kind == SymbolKind.Method || 145symbol.Kind == SymbolKind.NamedType || 146symbol.Kind == SymbolKind.Property); 619case SymbolKind.NamedType: 626case SymbolKind.Method: 627case SymbolKind.Property: 628case SymbolKind.Event: 642case SymbolKind.Method: 643case SymbolKind.NamedType: 644case SymbolKind.ErrorType: 1088if (symbol.Kind == SymbolKind.Alias) 1190Debug.Assert(referencedSymbol.Kind == SymbolKind.Parameter); 1204Debug.Assert(referencedSymbol.Kind == SymbolKind.TypeParameter);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (7)
562case SymbolKind.Method: 565case SymbolKind.Property: 568case SymbolKind.NamedType: 569case SymbolKind.ErrorType: 590case SymbolKind.NamedType: // Includes delegates. 591case SymbolKind.ErrorType: 598case SymbolKind.Method:
Compiler\MethodBodySynthesizer.cs (1)
600if (member.Kind == SymbolKind.Method)
Compiler\MethodCompiler.cs (4)
506case SymbolKind.NamedType: 510case SymbolKind.Method: 541case SymbolKind.Property: 551case SymbolKind.Field:
Compiler\SynthesizedMetadataCompiler.cs (2)
95case SymbolKind.Property: 96case SymbolKind.NamedType:
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
154if (containingSymbol.Kind == SymbolKind.Method)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
70if (member.Kind == SymbolKind.Field)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (14)
259case SymbolKind.NetModule: 263case SymbolKind.Namespace: 330case SymbolKind.Namespace: 359case SymbolKind.NamedType: 443SymbolKind.NamedType or SymbolKind.ErrorType => ((NamedTypeSymbol)otherContainer).TypeParameters, 444SymbolKind.Method => ((MethodSymbol)otherContainer).TypeParameters, 756case SymbolKind.ArrayType: 759case SymbolKind.PointerType: 762case SymbolKind.FunctionPointerType: 765case SymbolKind.NamedType: 766case SymbolKind.ErrorType: 769case SymbolKind.TypeParameter: 781if (symbol.Kind == SymbolKind.NamedType)
Emitter\EditAndContinue\EmitHelpers.cs (1)
165if (type.Kind == SymbolKind.ErrorType)
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\PEAssemblyBuilder.cs (1)
595var subnamespace = (NamespaceSymbol)result.GetMembers(partName).FirstOrDefault(m => m.Kind == SymbolKind.Namespace);
Emitter\Model\PEModuleBuilder.cs (25)
230case SymbolKind.Namespace: 241case SymbolKind.Namespace: 242case SymbolKind.NamedType: 251case SymbolKind.NamedType: 350case SymbolKind.Namespace: 361case SymbolKind.Namespace: 362case SymbolKind.NamedType: 373case SymbolKind.NamedType: 384case SymbolKind.NamedType: 388case SymbolKind.Method: 400case SymbolKind.Property: 403case SymbolKind.Field: 414case SymbolKind.Event: 569if (member.Kind == SymbolKind.Namespace) 584if (symbol.Kind == SymbolKind.NamedType) 977if (namedTypeSymbol.OriginalDefinition.Kind == SymbolKind.ErrorType) 982if (diagInfo == null && namedTypeSymbol.Kind == SymbolKind.ErrorType) 1144case SymbolKind.DynamicType: 1147case SymbolKind.ArrayType: 1150case SymbolKind.ErrorType: 1151case SymbolKind.NamedType: 1154case SymbolKind.PointerType: 1157case SymbolKind.TypeParameter: 1160case SymbolKind.FunctionPointerType: 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 (4)
301case SymbolKind.Field: 304case SymbolKind.Method: 307case SymbolKind.Property: 310case SymbolKind.Event:
Emitter\NoPia\EmbeddedTypesManager.cs (3)
272if (member.Kind != SymbolKind.NamedType) 514case SymbolKind.Property: 517case SymbolKind.Event:
Errors\MessageProvider.cs (2)
101if (symbol.Kind == SymbolKind.Assembly || symbol.Kind == SymbolKind.Namespace)
FlowAnalysis\AbstractFlowPass.cs (1)
3585if (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 (18)
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 (7)
30SymbolKind.Local => true, 31SymbolKind.Parameter => true, 32SymbolKind.Field => true, 33SymbolKind.Property => true, 34SymbolKind.Event => true, 35SymbolKind.ErrorType => true, 36SymbolKind.Method when symbol is MethodSymbol m && m.MethodKind == MethodKind.LocalFunction => true,
FlowAnalysis\DefinitelyAssignedWalker.cs (1)
96symbol.Kind != SymbolKind.Field)
FlowAnalysis\EmptyStructTypeCache.cs (3)
195case SymbolKind.Field: 207case SymbolKind.Event: 254for (; symbol != null && symbol.Kind != SymbolKind.Namespace; symbol = symbol.ContainingSymbol)
FlowAnalysis\LocalDataFlowPass.cs (1)
105if (symbol.Kind == SymbolKind.RangeVariable) return -1;
FlowAnalysis\NullableWalker.cs (28)
1071case SymbolKind.Field: 1072case SymbolKind.Property: 1084case SymbolKind.Event: 1085case SymbolKind.Method: 1116if (member.Kind != SymbolKind.Field && 1117member.Kind != SymbolKind.Property && 1118member.Kind != SymbolKind.Event) 1910case SymbolKind.Local: 1919case SymbolKind.Parameter: 1928case SymbolKind.Field: 1929case SymbolKind.Property: 1930case SymbolKind.Event: 1932case SymbolKind.ErrorType: 2108if (container.Kind == SymbolKind.NamedType) 2752Debug.Assert(member.Kind == SymbolKind.Field || member.Kind == SymbolKind.Property || member.Kind == SymbolKind.Event); 4446if (members.Any(static m => m.Kind == SymbolKind.Field)) 4452if (members.Any(static m => m.Kind == SymbolKind.Property)) 5479if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7200case SymbolKind.Field: 7201case SymbolKind.Property: 7208case SymbolKind.Event: 7209case SymbolKind.Method: 7473return (type.Kind == SymbolKind.TypeParameter && !type.IsReferenceType) || type.IsNullableTypeOrTypeParameter(); 8178if (symbol.Kind == SymbolKind.Method) 8195int? memberIndex = symbol.Kind == SymbolKind.Property ? symbol.MemberIndexOpt : null; 10805if (member.Kind == SymbolKind.Property)
FlowAnalysis\NullableWalker_Patterns.cs (2)
264if (member.Symbol.Kind is not (SymbolKind.Property or SymbolKind.Field))
FlowAnalysis\ReadWriteWalker.cs (4)
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 (3)
578case SymbolKind.Parameter: 579case SymbolKind.Local: 586case SymbolKind.Method:
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (7)
609symbol.Kind == SymbolKind.Local || 610symbol.Kind == SymbolKind.Parameter || 611symbol.Kind == SymbolKind.Method); 657if (symbol.Kind == SymbolKind.Method) 685case SymbolKind.Local: 688case SymbolKind.Parameter: 694Debug.Assert(capturedVariable.Kind == SymbolKind.Method);
Lowering\ClosureConversion\ClosureConversion.cs (2)
752case SymbolKind.Parameter: 763case SymbolKind.Local:
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (9)
913case SymbolKind.Field: 915case SymbolKind.Property: 917case SymbolKind.Event: 928case SymbolKind.Field: 930case SymbolKind.Property: 932case SymbolKind.Event: 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 (3)
674case SymbolKind.Field: 678case SymbolKind.Property: 707case SymbolKind.Event:
Lowering\MethodToClassRewriter.cs (4)
636if (member.Kind == SymbolKind.Method) 679if (member.Kind == SymbolKind.Property) 706case SymbolKind.Field: 709case SymbolKind.Property:
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (8)
161case SymbolKind.Local: 168case SymbolKind.Parameter: 172case SymbolKind.Field: 211var type = (variable.Kind == SymbolKind.Local) ? ((LocalSymbol)variable).Type : ((ParameterSymbol)variable).Type; 262case SymbolKind.Field: 264goto case SymbolKind.Local; 266case SymbolKind.Local: 267case SymbolKind.Parameter:
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 (3)
869case SymbolKind.Field: 873case SymbolKind.Event: 876case SymbolKind.Property:
SymbolDisplay\SymbolDisplayVisitor.cs (4)
108text = EscapeIdentifier(text, symbol?.Kind is SymbolKind.NamedType or SymbolKind.Alias); 383if (symbol.Kind != SymbolKind.Method) 465&& symbol.Kind == SymbolKind.Field
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
53while (underlyingType.Kind == SymbolKind.ArrayType && !ShouldAddNullableAnnotation(underlyingType)); 784if (owner.Kind == SymbolKind.Method) 811if (typeArg.Kind == SymbolKind.TypeParameter) 849if (typeArg.Kind == SymbolKind.TypeParameter)
Symbols\AbstractTypeMap.cs (7)
101case SymbolKind.NamedType: 104case SymbolKind.TypeParameter: 106case SymbolKind.ArrayType: 109case SymbolKind.PointerType: 112case SymbolKind.FunctionPointerType: 115case SymbolKind.DynamicType: 118case SymbolKind.ErrorType:
Symbols\AliasSymbol.cs (3)
83if (previousTarget.Kind != SymbolKind.Namespace) 101public override SymbolKind Kind 105return SymbolKind.Alias;
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (1)
784if (member.Kind == SymbolKind.Method)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
119case SymbolKind.Field:
Symbols\ArrayTypeSymbol.cs (2)
286public override SymbolKind Kind 290return SymbolKind.ArrayType;
Symbols\AssemblySymbol.cs (2)
196public sealed override SymbolKind Kind 200return SymbolKind.Assembly;
Symbols\Attributes\AttributeData.cs (20)
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) 686case SymbolKind.Assembly: 700case SymbolKind.Event: 708case SymbolKind.Field: 719case SymbolKind.Method: 742case SymbolKind.NetModule: 746case SymbolKind.NamedType: 759case SymbolKind.Parameter: 771case SymbolKind.Property:
Symbols\Attributes\SourceAttributeData.cs (2)
290if (parameterType.Kind != SymbolKind.NamedType && parameterType.Kind != SymbolKind.ErrorType)
Symbols\BaseTypeAnalysis.cs (2)
186case SymbolKind.Field: 191case SymbolKind.Event:
Symbols\Compilation_WellKnownMembers.cs (20)
221if (type.Kind != SymbolKind.NamedType || type.TypeKind != TypeKind.Class) 253SymbolKind targetSymbolKind; 261targetSymbolKind = SymbolKind.Method; 268targetSymbolKind = SymbolKind.Method; 272targetSymbolKind = SymbolKind.Method; 277targetSymbolKind = SymbolKind.Field; 281targetSymbolKind = SymbolKind.Property; 303case SymbolKind.Method: 328case SymbolKind.Property: 344case SymbolKind.Field: 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\DiscardSymbol.cs (2)
31public override SymbolKind Kind => SymbolKind.Discard;
Symbols\DynamicTypeSymbol.cs (2)
54public override SymbolKind Kind 58return SymbolKind.DynamicType;
Symbols\ErrorTypeSymbol.cs (2)
214public sealed override SymbolKind Kind 218return SymbolKind.ErrorType;
Symbols\EventSymbol.cs (2)
234public sealed override SymbolKind Kind 238return SymbolKind.Event;
Symbols\ExtendedErrorTypeSymbol.cs (6)
36(containingSymbol.Kind == SymbolKind.Namespace) || 37(containingSymbol.Kind == SymbolKind.NamedType) || 38(containingSymbol.Kind == SymbolKind.ErrorType)); 316case SymbolKind.NamedType: 317case SymbolKind.ErrorType: 319case SymbolKind.Method:
Symbols\FieldSymbol.cs (2)
186public sealed override SymbolKind Kind 190return SymbolKind.Field;
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (2)
78public override SymbolKind Kind => SymbolKind.FunctionPointerType;
Symbols\FunctionTypeSymbol.cs (1)
108public override SymbolKind Kind => SymbolKindInternal.FunctionType;
Symbols\LabelSymbol.cs (3)
162/// Returns value 'Label' of the <see cref="SymbolKind"/> 164public override SymbolKind Kind 168return SymbolKind.Label;
Symbols\LocalSymbol.cs (3)
187/// Returns value 'Local' of the <see cref="SymbolKind"/> 189public sealed override SymbolKind Kind 193return SymbolKind.Local;
Symbols\MemberSignatureComparer.cs (5)
553if (member.Kind != SymbolKind.Field) 854case SymbolKind.Method: 856case SymbolKind.Property: //NOTE: Not using PropertySymbol.CallingConvention 857case SymbolKind.Event: 866return member.Kind == SymbolKind.Method && ((MethodSymbol)member).IsVararg;
Symbols\MemberSymbolExtensions.cs (70)
37case SymbolKind.Method: 39case SymbolKind.Property: 41case SymbolKind.Event: 55case SymbolKind.Method: 57case SymbolKind.Property: 59case SymbolKind.Event: 70case SymbolKind.Method: 72case SymbolKind.Property: 73case SymbolKind.Event: 87case SymbolKind.Method: 89case SymbolKind.Property: 91case SymbolKind.Event: 102case SymbolKind.Method: 104case SymbolKind.Property: 106case SymbolKind.Event: 107case SymbolKind.Field: 133case SymbolKind.Property: 137case SymbolKind.Event: 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; 222case SymbolKind.ArrayType: 223case SymbolKind.ErrorType: 224case SymbolKind.NamedType: 225case SymbolKind.PointerType: 226case SymbolKind.TypeParameter: 227case SymbolKind.FunctionPointerType: 229case SymbolKind.Event: 231case SymbolKind.Method: 233case SymbolKind.Property: 271case SymbolKind.Field: 273case SymbolKind.Method: 275case SymbolKind.NamedType: 277case SymbolKind.Property: 279case SymbolKind.Event: 293case SymbolKind.Method: 296case SymbolKind.NamedType: 297case SymbolKind.ErrorType: 326case SymbolKind.Method: 328case SymbolKind.NamedType: 329case SymbolKind.ErrorType: 331case SymbolKind.Field: 332case SymbolKind.Property: 333case SymbolKind.Event: 344case SymbolKind.Method: 346case SymbolKind.NamedType: 347case SymbolKind.ErrorType: 349case SymbolKind.Field: 350case SymbolKind.Property: 351case SymbolKind.Event: 537case SymbolKind.Method: 539case SymbolKind.Property: 541case SymbolKind.Event: 579case SymbolKind.Method: 582case SymbolKind.Property: 584case SymbolKind.Event: 596case SymbolKind.Method: 598case SymbolKind.Property: 600case SymbolKind.Event: 611case SymbolKind.Method: 613case SymbolKind.Property: 615case SymbolKind.Event: 626case SymbolKind.Method: 630case SymbolKind.Property: 634case SymbolKind.Event: 647case SymbolKind.Field: 650case SymbolKind.Event: 661if (member.Kind == SymbolKind.Method)
Symbols\MergedNamespaceSymbol.cs (1)
145if (childSymbol.Kind == SymbolKind.Namespace)
Symbols\Metadata\PE\DynamicTypeDecoder.cs (6)
153case SymbolKind.ErrorType: 154case SymbolKind.NamedType: 163case SymbolKind.ArrayType: 166case SymbolKind.PointerType: 169case SymbolKind.FunctionPointerType: 172case SymbolKind.DynamicType:
Symbols\Metadata\PE\MetadataDecoder.cs (10)
218case SymbolKind.TypeParameter: 221case SymbolKind.ArrayType: 224case SymbolKind.PointerType: 227case SymbolKind.DynamicType: 230case SymbolKind.ErrorType: 231goto case SymbolKind.NamedType; 232case SymbolKind.NamedType: 316Debug.Assert(ReferenceEquals(newresult, result) || (newresult.Kind == SymbolKind.ErrorType)); 544Debug.Assert(scope.Kind == SymbolKind.NamedType || scope.Kind == SymbolKind.ErrorType);
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
653return candidate.Kind != SymbolKind.ErrorType || !(candidate is MissingMetadataTypeSymbol);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (22)
373while (s.Kind != SymbolKind.Namespace) 964if (staticIndex < staticFields.Length && staticFields[staticIndex].Kind == SymbolKind.Field) 980Debug.Assert(staticIndex == staticFields.Length || staticFields[staticIndex].Kind != SymbolKind.Field); 992IEnumerable<FieldSymbol> nonEventFields = GetMembers<FieldSymbol>(this.GetMembers().WhereAsArray(m => !(m is TupleErrorFieldSymbol)), SymbolKind.Field, offset: 0); 1065int index = GetIndexOfFirstMember(members, SymbolKind.Method); 1071if (members[index].Kind != SymbolKind.Method) 1089if (index >= members.Length || members[index].Kind != SymbolKind.Method) 1117if (index == members.Length || members[index].Kind != SymbolKind.Method) 1157return GetMembers<PropertySymbol>(this.GetMembers(), SymbolKind.Property); 1162return GetMembers<EventSymbol>(this.GetMembers(), SymbolKind.Event); 1279Debug.Assert(SymbolKind.Field.ToSortOrder() < SymbolKind.Method.ToSortOrder()); 1280Debug.Assert(SymbolKind.Method.ToSortOrder() < SymbolKind.Property.ToSortOrder()); 1281Debug.Assert(SymbolKind.Property.ToSortOrder() < SymbolKind.Event.ToSortOrder()); 1282Debug.Assert(SymbolKind.Event.ToSortOrder() < SymbolKind.NamedType.ToSortOrder()); 1378Debug.Assert(field.AssociatedSymbol.Kind == SymbolKind.Event); 1450if (member.Kind == SymbolKind.NamedType) 2439private static int GetIndexOfFirstMember(ImmutableArray<Symbol> members, SymbolKind kind) 2456private static IEnumerable<TSymbol> GetMembers<TSymbol>(ImmutableArray<Symbol> members, SymbolKind kind, int offset = -1)
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
316var accessSymbol = containingSymbol.Kind == SymbolKind.Property ? containingSymbol.ContainingSymbol : containingSymbol;
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
105return this.ContainingSymbol.Kind == SymbolKind.Method 252if (_containingSymbol.Kind == SymbolKind.Method) 608var typeParameters = (_containingSymbol.Kind == SymbolKind.Method) ? 669bool 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 (7)
159case SymbolKind.ErrorType: 163case SymbolKind.DynamicType: 164case SymbolKind.TypeParameter: 167case SymbolKind.FunctionPointerType: 170case SymbolKind.PointerType: 173case SymbolKind.NamedType: 196case SymbolKind.ArrayType:
Symbols\MetadataOrSourceAssemblySymbol.cs (2)
97(corType.Kind == SymbolKind.ErrorType && 98_lazySpecialTypes[(int)typeId].Kind == SymbolKind.ErrorType));
Symbols\MethodSymbol.cs (3)
638/// Returns value 'Method' of the <see cref="SymbolKind"/> 640public sealed override SymbolKind Kind 644return SymbolKind.Method;
Symbols\MethodSymbolExtensions.cs (7)
95public static bool CanBeHiddenByMemberKind(this MethodSymbol hiddenMethod, SymbolKind hidingMemberKind) 107case SymbolKind.ErrorType: 108case SymbolKind.NamedType: 109case SymbolKind.Method: 110case SymbolKind.Property: 112case SymbolKind.Field: 113case SymbolKind.Event: // Events are not covered by CSemanticChecker::FindSymHiddenByMethPropAgg.
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\ModuleSymbol.cs (3)
56/// Returns value 'NetModule' of the <see cref="SymbolKind"/> 58public sealed override SymbolKind Kind 62return SymbolKind.NetModule;
Symbols\NamedTypeSymbol.cs (7)
320if (candidate.Kind == SymbolKind.Property) 355if (member.Kind == SymbolKind.Method) 705case SymbolKind.Field: 706case SymbolKind.Event: 760public override SymbolKind Kind // Cannot seal this method because of the ErrorSymbol. 764return SymbolKind.NamedType; 1639ContainingSymbol?.Kind == SymbolKind.Namespace &&
Symbols\NamespaceOrTypeSymbol.cs (2)
43return Kind == SymbolKind.Namespace; 262if (scope.Kind == SymbolKind.ErrorType)
Symbols\NamespaceSymbol.cs (3)
120public sealed override SymbolKind Kind 124return SymbolKind.Namespace; 269if (sym.Kind == SymbolKind.Namespace)
Symbols\ObsoleteAttributeHelpers.cs (1)
63if (symbol.Kind == SymbolKind.Field)
Symbols\OverriddenOrHiddenMembersHelpers.cs (33)
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); 255if (hiddenByProperty.Kind == SymbolKind.Property) 347if (hiddenByEvent.Kind == SymbolKind.Event) 559SymbolKind memberKind = member.Kind; 578if (otherMemberArity == memberArity || (memberKind == SymbolKind.Method && otherMemberArity == 0)) 587case SymbolKind.Field: 591case SymbolKind.NamedType: 640case SymbolKind.Field: 641case SymbolKind.NamedType: 707SymbolKind overridingMemberKind, 716bool needToSearchForRelated = representativeMember.Kind != SymbolKind.Field && representativeMember.Kind != SymbolKind.NamedType && 753private static void AddHiddenMemberIfApplicable(ref ArrayBuilder<Symbol> hiddenBuilder, SymbolKind hidingMemberKind, Symbol hiddenMember) 756if (hiddenMember.Kind != SymbolKind.Method || ((MethodSymbol)hiddenMember).CanBeHiddenByMemberKind(hidingMemberKind)) 792Debug.Assert(representativeMember.Kind == SymbolKind.Property || !representativeMember.ContainingType.IsDefinition); 851private static void FindOtherHiddenMembersInContainingType(SymbolKind hidingMemberKind, Symbol representativeMember, ref ArrayBuilder<Symbol> hiddenBuilder) 854Debug.Assert(representativeMember.Kind != SymbolKind.Field); 855Debug.Assert(representativeMember.Kind != SymbolKind.NamedType); 856Debug.Assert(representativeMember.Kind == SymbolKind.Property || !representativeMember.ContainingType.IsDefinition); 875case SymbolKind.Property: 876case SymbolKind.Event: 879case SymbolKind.Method: 891case SymbolKind.Method: 896case SymbolKind.Property: 901case SymbolKind.Event: 913case SymbolKind.Method: 916case SymbolKind.Property: 919case SymbolKind.Event: 1034if (otherMember.Kind == SymbolKind.Method &&
Symbols\ParameterSymbol.cs (2)
255public sealed override SymbolKind Kind 259return SymbolKind.Parameter;
Symbols\PointerTypeSymbol.cs (2)
157public override SymbolKind Kind 161return SymbolKind.PointerType;
Symbols\PropertySymbol.cs (2)
336public sealed override SymbolKind Kind 340return SymbolKind.Property;
Symbols\PublicModel\NamespaceOrTypeSymbol.cs (2)
38bool INamespaceOrTypeSymbol.IsNamespace => UnderlyingSymbol.Kind == SymbolKind.Namespace; 40bool INamespaceOrTypeSymbol.IsType => UnderlyingSymbol.Kind != SymbolKind.Namespace;
Symbols\PublicModel\PreprocessingSymbol.cs (2)
98SymbolKind ISymbol.Kind => SymbolKind.Preprocessing;
Symbols\PublicModel\Symbol.cs (1)
195SymbolKind ISymbol.Kind => UnderlyingSymbol.Kind;
Symbols\RangeVariableSymbol.cs (2)
40public override SymbolKind Kind 44return SymbolKind.RangeVariable;
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
85if (s.Kind == SymbolKind.NamedType && ((NamedTypeSymbol)s).IsExplicitDefinitionOfNoPiaLocalType)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (13)
164Debug.Assert(symbol.Kind != SymbolKind.NamedType || ((NamedTypeSymbol)symbol).PrimitiveTypeCode == Cci.PrimitiveTypeCode.NotPrimitive); 227if (type.Kind == SymbolKind.ErrorType) 322if (type.ContainingSymbol.Kind != SymbolKind.NamedType && 494if (newDefinition.Kind == SymbolKind.ErrorType && !newDefinition.IsGenericType) 647case SymbolKind.TypeParameter: 650case SymbolKind.ArrayType: 653case SymbolKind.PointerType: 656case SymbolKind.DynamicType: 659case SymbolKind.ErrorType: 660case SymbolKind.NamedType: 1031if (retargetedMember.Kind == SymbolKind.Method) 1097if (retargetedMember.Kind == SymbolKind.Property) 1116if (retargetedMember.Kind == SymbolKind.Event)
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
316case SymbolKind.Property: 322case SymbolKind.Event:
Symbols\Source\LocalFunctionSymbol.cs (2)
440if (tpEnclosing.ContainingSymbol.Kind == SymbolKind.Method) 447Debug.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) 2075case SymbolKind.Namespace: 2081case SymbolKind.NamedType: 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 (25)
274if (ContainingSymbol.Kind == SymbolKind.Namespace && 297if (containingSymbol.Kind == SymbolKind.Namespace) 447case SymbolKind.Namespace: 458case SymbolKind.NamedType: 1522case SymbolKind.Field: 1530case SymbolKind.Event: 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) 2322case SymbolKind.Property: 2329case SymbolKind.Event: 2388case SymbolKind.Field: 2392case SymbolKind.Event: 2448if (member.Kind != SymbolKind.Method || ((MethodSymbol)member).MethodKind != MethodKind.Destructor) 2688case SymbolKind.Field: 2692case SymbolKind.Event: 3855if (symbol.Kind != SymbolKind.Method) 3891if (symbol.Kind != SymbolKind.Method) 4049case SymbolKind.Field: 4052case SymbolKind.Method: 4081case SymbolKind.Property: 4084case SymbolKind.Event: 4797if (member.Kind == SymbolKind.Method)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (33)
103if (abstractMember.Kind == SymbolKind.Method && abstractMember is not SynthesizedRecordOrdinaryMethod) 139SymbolKind interfaceMemberKind = interfaceMember.Kind; 142case SymbolKind.Method: 143case SymbolKind.Property: 144case SymbolKind.Event: 203if (wasImplementingMemberFound && interfaceMemberKind == SymbolKind.Event) 237var associatedPropertyOrEvent = interfaceMemberKind == SymbolKind.Method ? ((MethodSymbol)interfaceMember).AssociatedSymbol : null; 312if (wasImplementingMemberFound && interfaceMemberKind == SymbolKind.Method) 426if (interfacePropertyOrEvent.Kind == SymbolKind.Event && implementingPropertyOrEvent.Kind == SymbolKind.Event && 534case SymbolKind.Method: 569case SymbolKind.Property: 610case SymbolKind.Event: 651case SymbolKind.Field: 658sourceField.AssociatedSymbol.Kind != SymbolKind.Event); 662case SymbolKind.NamedType: 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; 1643case SymbolKind.Method: 1644case SymbolKind.Property: 1645case SymbolKind.Event: 1673case SymbolKind.Method: 1683case SymbolKind.Property: 1684case SymbolKind.Event: 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 (4)
171case SymbolKind.Namespace: 179case SymbolKind.NamedType: 610case SymbolKind.Namespace: 616case SymbolKind.NamedType:
Symbols\Source\SourceNamedTypeSymbol.cs (1)
91if (containingSymbol.Kind == SymbolKind.NamedType)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (7)
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 (3)
134public sealed override SymbolKind Kind 245if (t.Kind == SymbolKind.NamedType) 295if (t.Kind == SymbolKind.NamedType)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
65if (_container.Kind == SymbolKind.Method)
Symbols\Symbol.cs (45)
104public abstract SymbolKind Kind { get; } 201case SymbolKind.ErrorType: 203case SymbolKind.Assembly: 206case SymbolKind.NetModule: 635case SymbolKind.Local: 636case SymbolKind.Label: 637case SymbolKind.Alias: 638case SymbolKind.RangeVariable: 642case SymbolKind.Namespace: 643case SymbolKind.Field: 644case SymbolKind.ErrorType: 645case SymbolKind.Parameter: 646case SymbolKind.TypeParameter: 647case SymbolKind.Event: 650case SymbolKind.NamedType: 657case SymbolKind.Property: 665case SymbolKind.Method: 692case SymbolKind.ArrayType: 693case SymbolKind.PointerType: 694case SymbolKind.FunctionPointerType: 695case SymbolKind.Assembly: 696case SymbolKind.DynamicType: 697case SymbolKind.NetModule: 698case SymbolKind.Discard: 725if (this.Kind == SymbolKind.Method) 902Debug.Assert(this.Kind == SymbolKind.NamedType || this.Kind == SymbolKind.Method); 1212case SymbolKind.Field: 1213case SymbolKind.Method: 1214case SymbolKind.Property: 1215case SymbolKind.Event: 1630case SymbolKind.NamedType: 1636case SymbolKind.Event: 1642case SymbolKind.Field: 1654case SymbolKind.Method: 1660case SymbolKind.Property: 1667case SymbolKind.Parameter: 1670case SymbolKind.TypeParameter: 1706case SymbolKind.Field: 1707case SymbolKind.Property: 1708case SymbolKind.Event: 1712case SymbolKind.RangeVariable: 1715case SymbolKind.Local: 1722case SymbolKind.Parameter: 1725case SymbolKind.Method:
Symbols\Symbol_Attributes.cs (13)
48case SymbolKind.Assembly: 51case SymbolKind.Field: 54case SymbolKind.Method: 66case SymbolKind.NamedType: 94case SymbolKind.NetModule: 97case SymbolKind.Parameter: 100case SymbolKind.Property: 103case SymbolKind.Event: 106case SymbolKind.TypeParameter: 911Debug.Assert(this.Kind == SymbolKind.Method); 930case SymbolKind.Assembly: 931case SymbolKind.NamedType: 932case SymbolKind.Method:
Symbols\SymbolDistinguisher.cs (26)
59case SymbolKind.ErrorType: 60case SymbolKind.NamedType: 61case SymbolKind.Event: 62case SymbolKind.Field: 63case SymbolKind.Method: 64case SymbolKind.Property: 65case SymbolKind.TypeParameter: 67case SymbolKind.ArrayType: 68case SymbolKind.PointerType: 69case SymbolKind.Parameter: 71case SymbolKind.DynamicType: // Can't sensibly append location, but it should never be ambiguous. 72case SymbolKind.FunctionPointerType: // Can't sensibly append location 74case SymbolKind.Namespace: 75case SymbolKind.Alias: 76case SymbolKind.Assembly: 77case SymbolKind.NetModule: 78case SymbolKind.Label: 79case SymbolKind.Local: 80case SymbolKind.RangeVariable: 81case SymbolKind.Preprocessing: 146case SymbolKind.Parameter: 149case SymbolKind.PointerType: 152case SymbolKind.ArrayType: 196Debug.Assert(unwrappedSymbol.Kind == SymbolKind.DynamicType || unwrappedSymbol.Kind == SymbolKind.ErrorType || unwrappedSymbol.Kind == SymbolKind.FunctionPointerType);
Symbols\SymbolExtensions.cs (35)
136case SymbolKind.Namespace: 137case SymbolKind.NamedType: 138case SymbolKind.ErrorType: 147while (containingMember is object && containingMember.Kind == SymbolKind.Method) 166case SymbolKind.Method: 178case SymbolKind.Field: 183case SymbolKind.NamedType: 203case SymbolKind.NamedType: 204case SymbolKind.ErrorType: 207case SymbolKind.Method: 254for (; ((object?)containingSymbol != null) && (containingSymbol.Kind != SymbolKind.Namespace); containingSymbol = containingSymbol.ContainingSymbol) 270case SymbolKind.ArrayType: 271case SymbolKind.DynamicType: 272case SymbolKind.ErrorType: 273case SymbolKind.NamedType: 274case SymbolKind.PointerType: 275case SymbolKind.FunctionPointerType: 276case SymbolKind.TypeParameter: 278case SymbolKind.Alias: 316var upperLevelType = symbol.Kind == SymbolKind.NamedType ? (NamedTypeSymbol)symbol : symbol.ContainingType; 334case SymbolKind.Property: 336case SymbolKind.Event: 349case SymbolKind.NamedType: 351case SymbolKind.Method: 492case SymbolKind.Field: 498case SymbolKind.Method: 504case SymbolKind.Property: 510case SymbolKind.Event: 516case SymbolKind.Local: 522case SymbolKind.Parameter: 528case SymbolKind.ErrorType: 547SymbolKind.Method => ((MethodSymbol)symbol).RequiresInstanceReceiver, 548SymbolKind.Property => ((PropertySymbol)symbol).RequiresInstanceReceiver, 549SymbolKind.Field => ((FieldSymbol)symbol).RequiresInstanceReceiver, 550SymbolKind.Event => ((EventSymbol)symbol).RequiresInstanceReceiver,
Symbols\SymbolKindExtensions.cs (18)
16public static LocalizableErrorArgument Localize(this SymbolKind kind) 20case SymbolKind.Namespace: 22case SymbolKind.NamedType: 24case SymbolKind.TypeParameter: 26case SymbolKind.ArrayType: 28case SymbolKind.PointerType: 30case SymbolKind.FunctionPointerType: 32case SymbolKind.DynamicType: 34case SymbolKind.Method: 36case SymbolKind.Property: 38case SymbolKind.Event: 40case SymbolKind.Field: 42case SymbolKind.Local: 43case SymbolKind.Parameter: 44case SymbolKind.RangeVariable: 46case SymbolKind.Alias: 48case SymbolKind.Label: 50case SymbolKind.Preprocessing:
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
104if (m.Kind is SymbolKind.Property)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (5)
201SymbolKind.Field => F.Field(F.This(), (FieldSymbol)member), 202SymbolKind.Property => F.Property(F.This(), (PropertySymbol)member), 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) 133case SymbolKind.Field:
Symbols\Tuples\TupleTypeSymbol.cs (11)
595case SymbolKind.Field: 691case SymbolKind.NamedType: 692case SymbolKind.Method: 693case SymbolKind.Property: 694case SymbolKind.Event: 1016if (member.Kind != SymbolKind.Field) 1063case SymbolKind.Method: 1064case SymbolKind.Property: 1065case SymbolKind.NamedType: 1069case SymbolKind.Field: 1077case SymbolKind.Event:
Symbols\TypeParameterSymbol.cs (2)
187public sealed override SymbolKind Kind 191return SymbolKind.TypeParameter;
Symbols\TypeSymbol.cs (25)
738case SymbolKind.Method: 739case SymbolKind.Property: 740case SymbolKind.Event: 806Debug.Assert(interfaceMember.Kind == SymbolKind.Method || interfaceMember.Kind == SymbolKind.Property || interfaceMember.Kind == SymbolKind.Event); 1002if (!canBeImplementedImplicitlyInCSharp9 && interfaceMember.Kind == SymbolKind.Method && 1403case SymbolKind.Property: 1410case SymbolKind.Event: 1504associated = implementation.Kind == SymbolKind.Method 1623if (interfaceMember.Kind == SymbolKind.Method) 1673if (interfaceMember.Kind == SymbolKind.Method) 1768if (interfaceMember.Kind == SymbolKind.Event) 1911case SymbolKind.Property: 1940case SymbolKind.Method: 2006case SymbolKind.Method: 2011case SymbolKind.Property: 2016case SymbolKind.Event: 2026case SymbolKind.Method: 2030case SymbolKind.Property: 2285Debug.Assert(interfaceMember.Kind != SymbolKind.Method || (object)interfaceMember == ((MethodSymbol)interfaceMember).ConstructedFrom); 2392if (this.IsAbstract && member.IsAbstract && member.Kind != SymbolKind.NamedType) 2400case SymbolKind.Method: 2405case SymbolKind.Property: 2410case SymbolKind.Event:
Symbols\TypeSymbolExtensions.cs (19)
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) 1746case SymbolKind.Method: 1747case SymbolKind.NamedType: 1748case SymbolKind.ErrorType: 1749case SymbolKind.Field: 1750case SymbolKind.Property: 1751case SymbolKind.Event: 1778if (container.Kind != SymbolKind.Namespace) 1919case SymbolKind.NamedType: 1920case SymbolKind.ErrorType: 1927case SymbolKind.ArrayType: 1934case SymbolKind.PointerType: 1941case SymbolKind.FunctionPointerType: 2265if (type.Kind == SymbolKind.NamedType)
Symbols\TypeUnification.cs (10)
111case SymbolKind.ArrayType: 128case SymbolKind.PointerType: 140case SymbolKind.NamedType: 141case SymbolKind.ErrorType: 182case SymbolKind.TypeParameter: 269case SymbolKind.ArrayType: 271case SymbolKind.PointerType: 273case SymbolKind.NamedType: 274case SymbolKind.ErrorType: 292case SymbolKind.TypeParameter:
Symbols\VarianceSafety.cs (8)
49case SymbolKind.Method: 55case SymbolKind.Property: 58case SymbolKind.Event: 61case SymbolKind.NamedType: 303case SymbolKind.TypeParameter: 330case SymbolKind.ArrayType: 333case SymbolKind.ErrorType: 334case SymbolKind.NamedType:
Utilities\TypeSymbolExtensions.cs (10)
31case SymbolKind.ArrayType: 36case SymbolKind.PointerType: 41case SymbolKind.FunctionPointerType: 45case SymbolKind.ErrorType: 46case SymbolKind.NamedType: 97case SymbolKind.ArrayType: 104case SymbolKind.PointerType: 110case SymbolKind.FunctionPointerType: 128case SymbolKind.ErrorType: 129case SymbolKind.NamedType:
Microsoft.CodeAnalysis.CSharp.CodeStyle (22)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
91{ Kind: SymbolKind.Local, DeclaringSyntaxReferences: { Length: 1 } syntaxRefs })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
70}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
53}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
68}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
30if (symbol.IsKind(SymbolKind.Parameter)
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (2)
55return (containingSymbol.Kind is SymbolKind.Field or SymbolKind.Property) &&
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
143if (symbolInfo.Symbol.IsKind(SymbolKind.Namespace))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
80context.RegisterSymbolStartAction(context => Analyzer.AnalyzeNamedTypeStart(this, context, namedTypeToAnalyzer), SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
71context.RegisterSymbolStartAction(AnalyzeNamedType, SymbolKind.NamedType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (7)
441case SymbolKind.Field: 442case SymbolKind.Local: 443case SymbolKind.Method: 444case SymbolKind.Parameter: 445case SymbolKind.Property: 446case SymbolKind.RangeVariable: 447case SymbolKind.FunctionPointerType:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
172if (symbolInfo.Symbol != null && symbolInfo.Symbol.Kind == SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1069return typeInfo.Type?.Kind == SymbolKind.ArrayType; 1077if (symbol?.Kind == SymbolKind.Field)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
101if (conflict?.IsKind(SymbolKind.NamedType) == true) 305if (semanticModel.GetSymbolInfo(n, cancellationToken).Symbol.IsKind(SymbolKind.Local) == true)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (25)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (3)
56if (symbol.Kind is SymbolKind.Method or SymbolKind.Property or SymbolKind.Event)
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (4)
84if (leftSymbol.Kind is not SymbolKind.Local and 85not SymbolKind.Parameter and 86not SymbolKind.Field and 87not SymbolKind.Property)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
90if (type?.Kind != SymbolKind.NamedType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
81var members = GetMembers(namedType).Where(s => s.Kind != SymbolKind.Property || PropertyGenerator.CanBeGenerated((IPropertySymbol)s))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (2)
56if (symbol != null && symbol.Kind != SymbolKind.Namespace && model.GetSymbolInfo(namespacePart).Symbol is INamespaceSymbol) 216if (symbol?.Kind == SymbolKind.NamedType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1013if (conditionOrType.GetBestOrAllSymbols().FirstOrDefault() is { Kind: SymbolKind.NamedType }) 3045case SymbolKind.NamedType: 3047case SymbolKind.Alias:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
114if (targetType.Kind == SymbolKind.DynamicType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
47var typeSymbol = firstSymbol != null && firstSymbol.Kind == SymbolKind.Alias
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (2)
50visibleSymbols = visibleSymbols.WhereAsArray(s => !s.MatchesKind(SymbolKind.Local, SymbolKind.Parameter));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
619if (method.TypeArguments.Any(static t => t.Kind == SymbolKind.ErrorType)) 660if (returnType.Kind == SymbolKind.TypeParameter) 662if (inferredType.Kind != SymbolKind.TypeParameter) 681case SymbolKind.ArrayType: 684case SymbolKind.PointerType: 687case SymbolKind.NamedType: 1810SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (13)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (13)
233[InlineData("} namespace [|c2|] {", "} namespace C2 {", SymbolKind.Namespace, Accessibility.Public)] 239[InlineData("class M<[|t|]> {}", "class M<T> {}", SymbolKind.TypeParameter, Accessibility.Private)] 240[InlineData("void M<[|t|]>() {}", "void M<T>() {}", SymbolKind.TypeParameter, Accessibility.Private)] 241[InlineData("int [|m|] { get; }", "int M { get; }", SymbolKind.Property, Accessibility.Private)] 244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)] 245[InlineData("event System.EventHandler [|m|];", "event System.EventHandler M;", SymbolKind.Event, Accessibility.Private)] 246[InlineData("void Outer(int [|m|]) {}", "void Outer(int M) {}", SymbolKind.Parameter, Accessibility.Private)] 247[InlineData("void Outer() { void Inner(int [|m|]) {} }", "void Outer() { void Inner(int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 248[InlineData("void Outer() { System.Action<int> action = [|m|] => {} }", "void Outer() { System.Action<int> action = M => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 249[InlineData("void Outer() { System.Action<int> action = ([|m|]) => {} }", "void Outer() { System.Action<int> action = (M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 250[InlineData("void Outer() { System.Action<int> action = (int [|m|]) => {} }", "void Outer() { System.Action<int> action = (int M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 251[InlineData("void Outer() { System.Action<int> action = delegate (int [|m|]) {} }", "void Outer() { System.Action<int> action = delegate (int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 252[InlineData("void Outer() { int [|m|]; }", "void Outer() { int M; }", SymbolKind.Local, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
15845SymbolKind.NamedType); 15862SymbolKind.NamedType);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
346if (symbol is not { Kind: SymbolKind.Event })
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (103)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (8)
2923SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Local), name: "Local1"), 2924SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Local), name: "Local1"), 2954SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Field), "Field"), 2955SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Property), "Property"), 2957SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Local), "Local"), 2995ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Parameter)), 3001ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local)),
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (38)
34new SymbolKindOrTypeKind(SymbolKind.Field), 35new SymbolKindOrTypeKind(SymbolKind.Property), 52new SymbolKindOrTypeKind(SymbolKind.Field), 53new SymbolKindOrTypeKind(SymbolKind.Property), 70new SymbolKindOrTypeKind(SymbolKind.Property), 87new SymbolKindOrTypeKind(SymbolKind.Field), 88new SymbolKindOrTypeKind(SymbolKind.Property), 105new SymbolKindOrTypeKind(SymbolKind.Field)); 124new SymbolKindOrTypeKind(SymbolKind.Local), 144new SymbolKindOrTypeKind(SymbolKind.Local)); 163new SymbolKindOrTypeKind(SymbolKind.Local), 183new SymbolKindOrTypeKind(SymbolKind.Local)); 202new SymbolKindOrTypeKind(SymbolKind.Local)); 221new SymbolKindOrTypeKind(SymbolKind.Local)); 240new SymbolKindOrTypeKind(SymbolKind.Local)); 277new SymbolKindOrTypeKind(SymbolKind.Local)); 294new SymbolKindOrTypeKind(SymbolKind.Parameter)); 311new SymbolKindOrTypeKind(SymbolKind.Parameter)); 328new SymbolKindOrTypeKind(SymbolKind.Parameter)); 345new SymbolKindOrTypeKind(SymbolKind.Parameter)); 363new SymbolKindOrTypeKind(SymbolKind.Parameter)); 378new SymbolKindOrTypeKind(SymbolKind.TypeParameter)); 390new SymbolKindOrTypeKind(SymbolKind.TypeParameter)); 403new SymbolKindOrTypeKind(SymbolKind.Field)); 416new SymbolKindOrTypeKind(SymbolKind.Field)); 429new SymbolKindOrTypeKind(SymbolKind.Property), 443new SymbolKindOrTypeKind(SymbolKind.Property), 457new SymbolKindOrTypeKind(SymbolKind.Property), 471new SymbolKindOrTypeKind(SymbolKind.Property), 499new SymbolKindOrTypeKind(SymbolKind.Field), 500new SymbolKindOrTypeKind(SymbolKind.Property), 521new SymbolKindOrTypeKind(SymbolKind.Local)); 541new SymbolKindOrTypeKind(SymbolKind.Local)); 563new SymbolKindOrTypeKind(SymbolKind.Local)); 709new SymbolKindOrTypeKind(SymbolKind.Local), 729new SymbolKindOrTypeKind(SymbolKind.Local), 749new SymbolKindOrTypeKind(SymbolKind.Local), 768new SymbolKindOrTypeKind(SymbolKind.Local),
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (8)
39var symbolKindsWithNoCodeBlocks = new HashSet<SymbolKind> 41SymbolKind.Property, 42SymbolKind.NamedType 98Assert.True(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.NamedType)); 99Assert.False(ideEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.Property)); 111Assert.True(compilerEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.NamedType)); 112Assert.False(compilerEngineAnalyzer.CallLog.Any(e => e.CallerName == method && e.SymbolKind == SymbolKind.Property)); 872=> context.RegisterSymbolAction(OnSymbol, SymbolKind.NamedType);
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
52if (symbol != null && symbol.Kind == SymbolKind.Field)
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (27)
50new SymbolKindOrTypeKind(SymbolKind.Property) 177new SymbolKindOrTypeKind(SymbolKind.Property), 179new SymbolKindOrTypeKind(SymbolKind.Field), 180new SymbolKindOrTypeKind(SymbolKind.Event), 225new SymbolKindOrTypeKind(SymbolKind.Property), 227new SymbolKindOrTypeKind(SymbolKind.Field), 228new SymbolKindOrTypeKind(SymbolKind.Event), 269new SymbolKindOrTypeKind(SymbolKind.Parameter), 270new SymbolKindOrTypeKind(SymbolKind.Local), 340[InlineData("property,method", new object[] { SymbolKind.Property, MethodKind.Ordinary })] 341[InlineData("namespace", new object[] { SymbolKind.Namespace })] 342[InlineData("type_parameter", new object[] { SymbolKind.TypeParameter })] 344[InlineData("*", new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 345[InlineData(null, new object[] { SymbolKind.Namespace, TypeKind.Class, TypeKind.Struct, TypeKind.Interface, TypeKind.Enum, SymbolKind.Property, MethodKind.Ordinary, MethodKind.LocalFunction, SymbolKind.Field, SymbolKind.Event, TypeKind.Delegate, SymbolKind.Parameter, SymbolKind.TypeParameter, SymbolKind.Local })] 346[InlineData("property,method,invalid", new object[] { SymbolKind.Property, MethodKind.Ordinary })]
SymbolKey\SymbolKeyCompilationsTests.cs (2)
104Assert.NotEqual(SymbolKind.ErrorType, symbol01.Kind); 105Assert.NotEqual(SymbolKind.ErrorType, symbol02.Kind);
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (3)
153originalSymbols = originalSymbols.Where(s => !s.IsAccessor() && s.Kind != SymbolKind.Parameter).OrderBy(s => s.Name).Select(s => s).ToList(); 340var originalSymbols = originals.Where(s => !s.IsAccessor() && s.Kind != SymbolKind.Parameter).OrderBy(s => s.Name).ToList(); 424var originalSymbols = originals.Where(s => !s.IsAccessor() && s.Kind != SymbolKind.Parameter).OrderBy(s => s.Name).ToList();
SymbolKey\SymbolKeyTestBase.cs (16)
154var kinds = new List<SymbolKind>(); 157kinds.Add(SymbolKind.Namespace); 162kinds.Add(SymbolKind.NamedType); 163kinds.Add(SymbolKind.TypeParameter); 168kinds.Add(SymbolKind.Field); 169kinds.Add(SymbolKind.Event); 170kinds.Add(SymbolKind.Property); 171kinds.Add(SymbolKind.Method); 176kinds.Add(SymbolKind.Parameter); 186foreach (var k in kinds) 226case SymbolKind.NamedType: 227case SymbolKind.Namespace: 230case SymbolKind.Method: 240case SymbolKind.Field: 341if (v is ILocalSymbol local && (local.Type.Kind == SymbolKind.ArrayType || local.Type.Kind == SymbolKind.PointerType))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (92)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
965IEnumerable<IGrouping<TypeSymbol, FieldSymbol>> spillFieldsByType = stateMachineClass.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.Name.StartsWith("<>7__wrap", StringComparison.Ordinal)).Cast<FieldSymbol>().GroupBy(x => x.Type);
CodeGen\CodeGenClosureLambdaTests.cs (2)
3979}, c.GetMembers().Where(member => member.Kind == SymbolKind.NamedType).Select(member => member.ToString())); 4048}, c.GetMembers().Where(member => member.Kind == SymbolKind.NamedType).Select(member => member.ToString()));
CodeGen\CodeGenDeconstructTests.cs (37)
3613Assert.Equal(SymbolKind.Field, field.Kind); 3700Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 3705Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x2Type).Symbol.Kind); 3753Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 3802Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 3805Assert.Equal(SymbolKind.NamedType, x1Alias.Target.Kind); 3810Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x2Type).Symbol.Kind); 3942Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 3947Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x2Type).Symbol.Kind); 3988Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 3993Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x2Type).Symbol.Kind); 4408Assert.Equal(SymbolKind.Parameter, symbol.Kind); 5035Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(xType).Symbol.Kind); 5041Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(yType).Symbol.Kind); 5187Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 5313Assert.Equal(SymbolKind.Local, x1Symbol.Kind); 5318Assert.Equal(SymbolKind.Local, x2Symbol.Kind); 5349Assert.Equal(SymbolKind.Local, x1Symbol.Kind); 5354Assert.Equal(SymbolKind.Local, x2Symbol.Kind); 5475Assert.Equal(SymbolKind.Field, firstX1Symbol.Kind); 5480Assert.Equal(SymbolKind.Field, secondX1Symbol.Kind); 5507Assert.Equal(SymbolKind.Field, firstYSymbol.Kind); 5512Assert.Equal(SymbolKind.Field, secondYSymbol.Kind); 5538Assert.Equal(SymbolKind.Field, firstXSymbol.Kind); 5543Assert.Equal(SymbolKind.Field, secondXSymbol.Kind); 5612Assert.Equal(SymbolKind.ErrorType, xTypeISymbol.Kind); 5818Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 5821Assert.Equal(SymbolKind.NamedType, x1Alias.Target.Kind); 5826Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x3Type).Symbol.Kind); 5829Assert.Equal(SymbolKind.NamedType, x3Alias.Target.Kind); 5870Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x1Type).Symbol.Kind); 5876Assert.Equal(SymbolKind.NamedType, model.GetSymbolInfo(x3Type).Symbol.Kind); 6005Assert.Equal(SymbolKind.Discard, isymbol.Kind); 6040Assert.Equal(SymbolKind.Discard, symbol.Kind); 6049Assert.Equal(SymbolKind.Discard, symbolClone.Kind); 6093Assert.Equal(SymbolKind.Discard, symbol.Kind); 6140Assert.Equal(SymbolKind.Discard, symbol.Kind);
CodeGen\CodeGenDynamicTests.cs (3)
684case SymbolKind.Field: 689case SymbolKind.Method: 703case SymbolKind.Property:
CodeGen\CodeGenRefLocalTests.cs (1)
4078Assert.Equal(SymbolKind.NamedType, alias.Target.Kind);
CodeGen\CodeGenTupleTest.cs (36)
3351Assert.Equal(SymbolKind.ErrorType, mTuple.TupleUnderlyingType.Kind); 4502Assert.Equal(SymbolKind.NamedType, unnamedTuple.Kind); 4513Assert.Equal(SymbolKind.NamedType, namedTuple.Kind); 5819Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 5824Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 5877Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 5882Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 5916Assert.Equal(SymbolKind.NamedType, tuple.TupleUnderlyingType.Kind); 5919Assert.Equal(SymbolKind.NamedType, tuple.Kind); 5954Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.Kind); 5959Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.Kind); 5978Assert.Equal(SymbolKind.ErrorType, tupleWithNames.Kind); 5997Assert.Equal(SymbolKind.ErrorType, tupleWithSomeNames.Kind); 6015Assert.Equal(SymbolKind.ErrorType, tupleWithNames.Kind); 6194Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 6198Assert.Equal(SymbolKind.NamedType, types[0].Kind); 6199Assert.Equal(SymbolKind.ErrorType, types[1].Kind); 6373Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 6398Assert.Equal(SymbolKind.NamedType, tuple.Kind); 6421Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.Kind); 6437Assert.Equal(SymbolKind.ErrorType, tupleWithNames.Kind); 6452Assert.Equal(SymbolKind.ErrorType, tupleWithNames.Kind); 6547Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind); 6551Assert.Equal(SymbolKind.NamedType, types[0].Kind); 6552Assert.Equal(SymbolKind.ErrorType, types[1].Kind); 11153Assert.Equal(SymbolKind.NamedType, m1Tuple.Kind); 11417Assert.Equal(SymbolKind.NamedType, m1Tuple.Kind); 11629if (members1[i].Kind == SymbolKind.Method) 11646else if (members1[i].Kind == SymbolKind.Property) 12735Assert.Equal(SymbolKind.NamedType, m1Tuple.Kind); 15821Assert.Equal(SymbolKind.Property, m1P1.Kind); 15852Assert.Equal(SymbolKind.Property, m1this.Kind); 16050Assert.Equal(SymbolKind.Event, m1E1.Kind); 16084Assert.Equal(SymbolKind.Event, m1E2.Kind); 17374Assert.Equal(SymbolKind.Field, sym.Symbol.Kind); 17409Assert.Equal(SymbolKind.Field, bobField.Kind);
CodeGen\EventTests.cs (2)
210Assert.Equal(SymbolKind.Event, @event.Kind); 232Assert.Equal(SymbolKind.Field, associatedField.Kind);
CodeGen\IndexerTests.cs (2)
154var indexer = @class.GetMembers().Where(member => member.Kind == SymbolKind.Property).Cast<PropertySymbol>().Single(); 257Assert.Equal(SymbolKind.Property, indexer.Kind);
Emit\CompilationEmitTests.cs (8)
4259ParentKind = SymbolKind.Assembly, 4328ParentKind = SymbolKind.Assembly, 4378ParentKind = SymbolKind.Assembly, 4439ParentKind = SymbolKind.Assembly, 4456ParentKind = SymbolKind.Assembly, 4502ParentKind = SymbolKind.Assembly, 4559ParentKind = SymbolKind.Assembly, 4576ParentKind = SymbolKind.Assembly,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (173)
Attributes\AttributeTests_MarshalAs.cs (4)
34foreach (NamedTypeSymbol type in compilation.GlobalNamespace.GetMembers().Where(s => s.Kind == SymbolKind.NamedType)) 36var fields = type.GetMembers().Where(s => s.Kind == SymbolKind.Field); 68foreach (NamedTypeSymbol type in compilation.GlobalNamespace.GetMembers().Where(s => s.Kind == SymbolKind.NamedType)) 70var methods = type.GetMembers().Where(s => s.Kind == SymbolKind.Method);
Attributes\AttributeTests_Security.cs (27)
676ParentKind = SymbolKind.NamedType, 695ParentKind = SymbolKind.NamedType, 729ParentKind = SymbolKind.Method, 772ParentKind = SymbolKind.Method, 810ParentKind = SymbolKind.Method, 850ParentKind = SymbolKind.NamedType, 903ParentKind = SymbolKind.Method, 955ParentKind = SymbolKind.NamedType, 974ParentKind = SymbolKind.NamedType, 1015ParentKind = SymbolKind.Method, 1034ParentKind = SymbolKind.Method, 1081ParentKind = SymbolKind.NamedType, 1100ParentKind = SymbolKind.NamedType, 1143ParentKind = SymbolKind.Method, 1162ParentKind = SymbolKind.Method, 1215ParentKind = SymbolKind.Assembly, 1232ParentKind = SymbolKind.Assembly, 1249ParentKind = SymbolKind.NamedType, 1268ParentKind = SymbolKind.Method, 1309ParentKind = SymbolKind.Assembly, 1326ParentKind = SymbolKind.NamedType, 1345ParentKind = SymbolKind.Method, 1389ParentKind = SymbolKind.Assembly, 1406ParentKind = SymbolKind.NamedType, 1425ParentKind = SymbolKind.NamedType, 1444ParentKind = SymbolKind.Method, 1519ParentKind = SymbolKind.NamedType,
Attributes\AttributeTests_Synthesized.cs (2)
493foreach (var member in iter.GetMembers().Where(s => s.Kind == SymbolKind.Method)) 1637ParentKind = SymbolKind.Assembly,
Attributes\AttributeTests_Tuples.cs (5)
277case SymbolKind.Method: 285case SymbolKind.NamedType: 289case SymbolKind.Field: 292case SymbolKind.Property: 295case SymbolKind.Event:
Diagnostics\DiagnosticAnalyzerTests.AllInOne.cs (2)
28var symbolKindsWithNoCodeBlocks = new HashSet<SymbolKind>(); 29symbolKindsWithNoCodeBlocks.Add(SymbolKind.Property);
Diagnostics\DiagnosticAnalyzerTests.cs (49)
246context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.NamedType); 516SymbolKind.Namespace, SymbolKind.NamedType, SymbolKind.Event, SymbolKind.Field, SymbolKind.Method, SymbolKind.Property); 842}, SymbolKind.Method); 2859TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType), 2873TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Namespace), 2884TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Method), 2902TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Field), 2909TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Property), 2916TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Event), 2923TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Parameter)); 2929var analyzer1 = new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Namespace, analyzerId: 1); 2930var analyzer2 = new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Method, analyzerId: 2); 2955var analyzer1 = new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, analyzerId: 1); 2956var analyzer2 = new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Method, analyzerId: 2); 2989var symbolKinds = new[] { SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Method, 2990SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3033TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Namespace, OperationKind.VariableDeclarationGroup), 3045TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.VariableDeclarationGroup), 3062TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.Method, OperationKind.VariableDeclarationGroup), 3083var symbolKinds = new[] { SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Method, 3084SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3143var symbolKinds = new[] { SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Method, 3144SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3191var analyzers = new DiagnosticAnalyzer[] { new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.Invocation) }; 3223var analyzers = new DiagnosticAnalyzer[] { new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.NamedType, OperationKind.FieldReference) }; 3265var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3311var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType)); 3347var analyzer1 = new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.Field, analyzerId: 1); 3348var analyzer2 = new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.Field, analyzerId: 2);
Diagnostics\GetDiagnosticsTests.cs (2)
715var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.NamedType, OperationKind.VariableDeclaration)); 1729}, SymbolKind.NamedType);
FlowAnalysis\FlowTestBase.cs (3)
51case SymbolKind.Method: 55case SymbolKind.NamedType: 65case SymbolKind.Namespace:
Semantics\OutVarTests.cs (3)
1164Assert.NotEqual(SymbolKind.Field, symbol.Kind); 1174if (symbol.Kind == SymbolKind.Local) 32734Assert.Equal(SymbolKind.Field, symbol.Kind);
Semantics\PatternMatchingTestBase.cs (5)
195Assert.NotEqual(SymbolKind.Field, symbol.Kind); 205if (symbol.Kind == SymbolKind.Local) 246Assert.Equal(SymbolKind.Field, symbol.Kind); 400Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 401Assert.Equal(SymbolKind.ErrorType, typeInfo.ConvertedType.Kind);
Semantics\PatternMatchingTests.cs (3)
3449Assert.Equal(SymbolKind.NamedType, typeInfo1.Type.Kind); 3453Assert.Equal(SymbolKind.NamedType, typeInfo1.Type.Kind); 3459Assert.Equal(SymbolKind.NamedType, typeInfo2.Type.Kind);
Semantics\PatternMatchingTests_ListPatterns.cs (4)
3646Assert.Equal(SymbolKind.Local, symbol.Kind); 3726Assert.Equal(SymbolKind.Local, symbol.Kind); 3741Assert.Equal(SymbolKind.Local, symbol.Kind); 4416Assert.Equal(SymbolKind.Local, symbol.Kind);
Semantics\PatternMatchingTests2.cs (1)
724Assert.Equal(SymbolKind.Local, symbol.Kind);
Semantics\PrimaryConstructorTests.cs (36)
964Assert.Equal(SymbolKind.Local, outVar.Kind); 1011Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1076Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1304Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1317Assert.Equal(SymbolKind.Local, symbol.Kind); 1328Assert.Equal(SymbolKind.Method, symbol.Kind); 1533Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1622Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1971Assert.Equal(SymbolKind.Parameter, symbol.Kind); 2645Assert.Equal(SymbolKind.Parameter, symbol.Kind); 2683Assert.Equal(SymbolKind.Parameter, symbol.Kind); 2720Assert.Equal(SymbolKind.Parameter, symbol.Kind); 2756Assert.Equal(SymbolKind.Parameter, symbol.Kind); 4079context.RegisterSymbolAction(Handle, SymbolKind.Method); 4080context.RegisterSymbolAction(Handle, SymbolKind.Property); 4081context.RegisterSymbolAction(Handle, SymbolKind.Parameter); 4082context.RegisterSymbolAction(Handle, SymbolKind.NamedType); 4165context.RegisterSymbolStartAction(Handle1, SymbolKind.Method); 4166context.RegisterSymbolStartAction(Handle1, SymbolKind.Property); 4167context.RegisterSymbolStartAction(Handle1, SymbolKind.Parameter); 4168context.RegisterSymbolStartAction(Handle1, SymbolKind.NamedType); 5142context.RegisterSymbolAction(Handle1, SymbolKind.Method); 5143context.RegisterSymbolAction(Handle2, SymbolKind.Property); 5144context.RegisterSymbolAction(Handle3, SymbolKind.Parameter); 5482context.RegisterSymbolAction(Handle, SymbolKind.Method); 5483context.RegisterSymbolAction(Handle, SymbolKind.Property); 5484context.RegisterSymbolAction(Handle, SymbolKind.Parameter); 5485context.RegisterSymbolAction(Handle, SymbolKind.NamedType); 5569context.RegisterSymbolStartAction(Handle1, SymbolKind.Method); 5570context.RegisterSymbolStartAction(Handle1, SymbolKind.Property); 5571context.RegisterSymbolStartAction(Handle1, SymbolKind.Parameter); 5572context.RegisterSymbolStartAction(Handle1, SymbolKind.NamedType); 7822Assert.Equal(SymbolKind.Property, symbol.Kind); 7828Assert.Equal(SymbolKind.Parameter, symbol.Kind); 8762Assert.Equal(SymbolKind.Parameter, symbol.Kind); 9168Assert.Equal(SymbolKind.Parameter, symbol.Kind);
Semantics\RecordTests.cs (27)
451Assert.Equal(SymbolKind.Parameter, parameter.Kind); 457Assert.Equal(SymbolKind.Parameter, initializer.Kind); 483Assert.Equal(SymbolKind.Local, outVar.Kind); 21081return comp.GetMember<NamedTypeSymbol>(typeName).GetMembers().WhereAsArray(m => m.Kind == SymbolKind.Property); 21148Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 21378Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 21391Assert.Equal(SymbolKind.Local, symbol!.Kind); 21402Assert.Equal(SymbolKind.Method, symbol!.Kind); 21607Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 21696Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 22083Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 24647Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 24682Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 24716Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 24751Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 26517context.RegisterSymbolAction(Handle, SymbolKind.Method); 26518context.RegisterSymbolAction(Handle, SymbolKind.Property); 26519context.RegisterSymbolAction(Handle, SymbolKind.Parameter); 26520context.RegisterSymbolAction(Handle, SymbolKind.NamedType); 26612context.RegisterSymbolStartAction(Handle1, SymbolKind.Method); 26613context.RegisterSymbolStartAction(Handle1, SymbolKind.Property); 26614context.RegisterSymbolStartAction(Handle1, SymbolKind.Parameter); 26615context.RegisterSymbolStartAction(Handle1, SymbolKind.NamedType); 27609context.RegisterSymbolAction(Handle1, SymbolKind.Method); 27610context.RegisterSymbolAction(Handle2, SymbolKind.Property); 27611context.RegisterSymbolAction(Handle3, SymbolKind.Parameter); 28348Assert.Equal(SymbolKind.Property, model.GetSymbolInfo(cref).Symbol!.Kind);
Microsoft.CodeAnalysis.CSharp.Features (85)
AddImport\CSharpAddImportFeatureService.cs (2)
330return namespaceOrTypeSymbol.IsKind(SymbolKind.Namespace) 482usingDirective = namespaceOrTypeSymbol.IsKind(SymbolKind.Namespace)
ChangeSignature\CSharpChangeSignatureService.cs (1)
166if (typeSymbol != null && typeSymbol.IsKind(SymbolKind.NamedType) && ((ITypeSymbol)typeSymbol).TypeKind == TypeKind.Delegate)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
287containingSymbol.Kind != SymbolKind.NamedType)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (2)
524Kind: SymbolKind.Property or SymbolKind.Field,
Completion\CompletionProviders\CompletionUtilities.cs (1)
166if (symbol.Kind == SymbolKind.Label &&
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (28)
28[new SymbolKindOrTypeKind(SymbolKind.Parameter)]; 31[new SymbolKindOrTypeKind(SymbolKind.Property)]; 105_ => [new SymbolKindOrTypeKind(SymbolKind.Local)], cancellationToken); 127_ => [new SymbolKindOrTypeKind(SymbolKind.Local)], cancellationToken); 154[new SymbolKindOrTypeKind(SymbolKind.Local)], 175_ => [new SymbolKindOrTypeKind(SymbolKind.Local), new SymbolKindOrTypeKind(MethodKind.LocalFunction)], 348(_ => [new SymbolKindOrTypeKind(SymbolKind.Local)]) 395possibleDeclarationComputer: d => [new SymbolKindOrTypeKind(SymbolKind.Local)], 411possibleDeclarationComputer: d => [new SymbolKindOrTypeKind(SymbolKind.Local)], 422[new SymbolKindOrTypeKind(SymbolKind.TypeParameter)], 511return [new SymbolKindOrTypeKind(SymbolKind.Field)]; 515new SymbolKindOrTypeKind(SymbolKind.Field), 516new SymbolKindOrTypeKind(SymbolKind.Property), 521possibleTypes = possibleTypes.Remove(new SymbolKindOrTypeKind(SymbolKind.Field)); 527possibleTypes = possibleTypes.Remove(new SymbolKindOrTypeKind(SymbolKind.Field)); 528possibleTypes = possibleTypes.Remove(new SymbolKindOrTypeKind(SymbolKind.Property)); 538? [new SymbolKindOrTypeKind(SymbolKind.Local)] : 541[new SymbolKindOrTypeKind(SymbolKind.Local), new SymbolKindOrTypeKind(MethodKind.LocalFunction)]; 627public static Glyph GetGlyph(SymbolKind kind, Accessibility? declaredAccessibility) 631SymbolKind.Field => Glyph.FieldPublic, 632SymbolKind.Local => Glyph.Local, 633SymbolKind.Method => Glyph.MethodPublic, 634SymbolKind.Parameter => Glyph.Parameter, 635SymbolKind.Property => Glyph.PropertyPublic, 636SymbolKind.RangeVariable => Glyph.RangeVariable, 637SymbolKind.TypeParameter => Glyph.TypeParameter, 661public static SymbolKind GetSymbolKind(SymbolKindOrTypeKind symbolKindOrTypeKind) 666symbolKindOrTypeKind.MethodKind.HasValue ? SymbolKind.Method :
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (5)
48if (nameInfo.PossibleSymbolKinds.Any(static k => k.SymbolKind == SymbolKind.Parameter)) 309result.Add((overloadParameter.Name, NameDeclarationInfo.GetGlyph(SymbolKind.Parameter, declarationInfo.DeclaredAccessibility))); 334return symbol.Kind is SymbolKind.Local or 335SymbolKind.Parameter or 336SymbolKind.RangeVariable;
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
302if (symbol?.Kind == SymbolKind.Field &&
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (1)
84member.Kind == SymbolKind.NamedType ||
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (2)
147if (symbol.IsKind(SymbolKind.Field)) 152if (symbol.IsKind(SymbolKind.Property) && !((IPropertySymbol)symbol).IsWriteOnly)
Completion\CompletionProviders\SymbolCompletionProvider.cs (2)
253if (symbol.IsKind(SymbolKind.Method) && !context.IsNameOfContext) 261else if (symbol.IsKind(SymbolKind.NamedType) || symbol is IAliasSymbol aliasSymbol && aliasSymbol.Target.IsType)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
40new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field),
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
81new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field),
Debugging\CSharpProximityExpressionsService.cs (1)
72if (info.Symbol.Kind == SymbolKind.Local)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1019return symbol.Kind == SymbolKind.Method && syntax is TypeDeclarationSyntax { ParameterList: { } parameterList } ? parameterList : syntax;
GenerateType\CSharpGenerateTypeService.cs (4)
230!leftSymbol.IsKind(SymbolKind.Namespace) || 275if (leftSymbol != null && leftSymbol.IsKind(SymbolKind.Namespace)) 456return memberGroup.ElementAt(0).IsKind(SymbolKind.Method) ? (IMethodSymbol)memberGroup.ElementAt(0) : null; 466if (expressionSymbol.IsKind(SymbolKind.Method))
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (3)
142string.Format(fieldOrProperty.Kind == SymbolKind.Field ? FeaturesResources.Initialize_field_0 : FeaturesResources.Initialize_property_0, fieldOrProperty.Name), 223if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private)) 246if (rule.SymbolSpecification.AppliesTo(SymbolKind.Property, Accessibility.Public))
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (1)
254if (symbol is IMethodSymbol method && method.ContainingSymbol.IsKind(SymbolKind.Method))
NavigationBar\CSharpNavigationBarItemService.cs (3)
70member.Kind == SymbolKind.NamedType || 181if (member.Kind == SymbolKind.Method) 211if (symbol.Kind == SymbolKind.Field)
Rename\CSharpRenameIssuesService.cs (1)
28symbol.Kind == SymbolKind.DynamicType)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
30if (expressionSymbol.IsKind(SymbolKind.Event) &&
Snippets\CSharpForEachLoopSnippetProvider.cs (4)
71symbol.Kind is SymbolKind.Local or SymbolKind.Field or SymbolKind.Parameter or SymbolKind.Property);
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
91{ Kind: SymbolKind.Local, DeclaringSyntaxReferences: { Length: 1 } syntaxRefs })
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
70}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
53}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
68}, SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
30if (symbol.IsKind(SymbolKind.Parameter)
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (2)
55return (containingSymbol.Kind is SymbolKind.Field or SymbolKind.Property) &&
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\NullableImpactingSpanWalker.cs (1)
143if (symbolInfo.Symbol.IsKind(SymbolKind.Namespace))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
80context.RegisterSymbolStartAction(context => Analyzer.AnalyzeNamedTypeStart(this, context, namedTypeToAnalyzer), SymbolKind.NamedType);
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
71context.RegisterSymbolStartAction(AnalyzeNamedType, SymbolKind.NamedType);
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (3)
56if (symbol.Kind is SymbolKind.Method or SymbolKind.Property or SymbolKind.Event)
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (4)
84if (leftSymbol.Kind is not SymbolKind.Local and 85not SymbolKind.Parameter and 86not SymbolKind.Field and 87not SymbolKind.Property)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
90if (type?.Kind != SymbolKind.NamedType)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (18)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (3)
78ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 110ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)), 142ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)),
ConvertTupleToStruct\ConvertTupleToStructTests.cs (1)
387ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Parameter)),
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1311}, SymbolKind.NamedType);
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (13)
233[InlineData("} namespace [|c2|] {", "} namespace C2 {", SymbolKind.Namespace, Accessibility.Public)] 239[InlineData("class M<[|t|]> {}", "class M<T> {}", SymbolKind.TypeParameter, Accessibility.Private)] 240[InlineData("void M<[|t|]>() {}", "void M<T>() {}", SymbolKind.TypeParameter, Accessibility.Private)] 241[InlineData("int [|m|] { get; }", "int M { get; }", SymbolKind.Property, Accessibility.Private)] 244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)] 245[InlineData("event System.EventHandler [|m|];", "event System.EventHandler M;", SymbolKind.Event, Accessibility.Private)] 246[InlineData("void Outer(int [|m|]) {}", "void Outer(int M) {}", SymbolKind.Parameter, Accessibility.Private)] 247[InlineData("void Outer() { void Inner(int [|m|]) {} }", "void Outer() { void Inner(int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 248[InlineData("void Outer() { System.Action<int> action = [|m|] => {} }", "void Outer() { System.Action<int> action = M => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 249[InlineData("void Outer() { System.Action<int> action = ([|m|]) => {} }", "void Outer() { System.Action<int> action = (M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 250[InlineData("void Outer() { System.Action<int> action = (int [|m|]) => {} }", "void Outer() { System.Action<int> action = (int M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 251[InlineData("void Outer() { System.Action<int> action = delegate (int [|m|]) {} }", "void Outer() { System.Action<int> action = delegate (int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)] 252[InlineData("void Outer() { int [|m|]; }", "void Outer() { int M; }", SymbolKind.Local, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IVariableDeclaration.cs (1)
943Assert.Equal(SymbolKind.Method, invocInfo.Symbol.Kind);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (266)
Semantics\ColorColorTests.cs (83)
50SymbolKind.Property, "E F.E { get; set; }", 51SymbolKind.Method, "void E.M(System.Int32 x)"); 75SymbolKind.Field, "E F.E", 76SymbolKind.Method, "void E.M(System.Int32 x)", 100SymbolKind.Event, "event E F.E", 101SymbolKind.Method, "void E.Invoke(System.Int32 x)"); 123SymbolKind.Parameter, "E E", 124SymbolKind.Method, "void E.M(System.Int32 x)"); 147SymbolKind.Local, "E E", 148SymbolKind.Method, "void E.M(System.Int32 x)"); 196SymbolKind.Field, "E F.E", 197SymbolKind.Property, "System.Int32 E.P { get; set; }", 224SymbolKind.Field, "E F.E", 225SymbolKind.Field, "System.Int32 E.F", 255SymbolKind.Field, "E F.E", 256SymbolKind.Event, "event System.Action E.Event", 286SymbolKind.NamedType, "E", 287SymbolKind.Field, "E.Element", 318SymbolKind.NamedType, "C", 319SymbolKind.NamedType, "C.Inner", 347SymbolKind.Field, "E F.E", 348SymbolKind.Method, "void E.M(System.Int32 x)", 376SymbolKind.Field, "E F.E", 377SymbolKind.Method, "void E.M<System.Int32>(System.Int32 x)", 405SymbolKind.Field, "E F.E", 406SymbolKind.Method, "void E.M<System.Boolean>(System.Boolean x)", 438SymbolKind.Field, "E F.E", 439SymbolKind.Method, "void E.M(System.Int32 x)", 471SymbolKind.Field, "E F.E", 472SymbolKind.Method, "void E.M(System.Int32 x)", 506SymbolKind.Property, "E F.E { get; set; }", 507SymbolKind.Method, "void E.M(System.Int32 x)"); 533SymbolKind.NamedType, "E", 534SymbolKind.Method, "void E.M(params System.Int32[] a)"); 560SymbolKind.Property, "E F.Q { get; set; }", 561SymbolKind.Method, "void E.M(System.Int32 x)"); 594Assert.Equal(SymbolKind.Alias, alias.Kind); 601Assert.Equal(SymbolKind.Method, parentInfo.Symbol.Kind); 641Assert.Equal(SymbolKind.Local, info.Symbol.Kind); 680SymbolKind.Local, "E E", 681SymbolKind.Method, "void E.M(System.Int32 x)"); 709SymbolKind.NamedType, "E", 710SymbolKind.Method, "void E.M(params System.Int32[] a)"); 760SymbolKind.Property, "E F.Q { get; set; }", 761SymbolKind.Method, "void E.M(System.Int32 x)", 799SymbolKind.NamedType, "E", 800SymbolKind.Method, "void E.M(params System.Int32[] a)", 838SymbolKind.Property, "E F.E { get; set; }", 839SymbolKind.Method, "void E.M(System.Int32 x)", 877SymbolKind.NamedType, "E", 878SymbolKind.Method, "void E.M(params System.Int32[] a)", 907SymbolKind.NamedType, "C", 908SymbolKind.Method, "void C.Static()"); 931SymbolKind.NamedType, "C", 932SymbolKind.Method, "void C.Static()"); 955SymbolKind.NamedType, "Color", 956SymbolKind.Field, "Color.Red"); 1070Assert.Equal(SymbolKind.Property, info.Symbol.Kind); 1116Assert.Equal(SymbolKind.Property, info.Symbol.Kind); 1162Assert.Equal(SymbolKind.Property, info.Symbol.Kind); 1207Assert.Equal(SymbolKind.Property, info.Symbol.Kind); 1251Assert.Equal(SymbolKind.Event, candidate.Kind); 1285Assert.Equal(SymbolKind.Field, info.Symbol.Kind); 1323SymbolKind.NamedType, "E", 1324SymbolKind.Method, "void E.M(params System.Int32[] a)", 1353SymbolKind.NamedType, "E", 1354SymbolKind.Method, "void E.M(params System.Int32[] a)"); 1382SymbolKind.Property, "E F.E { get; set; }", 1383SymbolKind.Method, "void E.M(System.Int32 x)", 1411SymbolKind.NamedType, "E", 1412SymbolKind.Method, "void E.M(params System.Int32[] a)", 1439SymbolKind.Local, "E E", 1440SymbolKind.Method, "void E.M(System.Int32 x)"); 1790Assert.Equal(SymbolKind.NamedType, actualSymbol.Symbol.Kind); 1824Assert.Equal(SymbolKind.NamedType, actualSymbol.Symbol.Kind); 1831SymbolKind exprSymbolKind, 1833SymbolKind parentSymbolKind, 1889Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind); 1903Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind); 1946Assert.Equal(SymbolKind.Local, symbolInfo.Symbol.Kind); 1960Assert.Equal(SymbolKind.Local, symbolInfo.Symbol.Kind); 2003Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind); 2017Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind);
Semantics\DeconstructionTests.cs (28)
3952Assert.Equal(SymbolKind.Local, symbol.Kind); 3957Assert.NotEqual(SymbolKind.Local, symbol.Kind); 3966Assert.Equal(SymbolKind.Local, symbol.Kind); 3971Assert.NotEqual(SymbolKind.Local, symbol.Kind); 4285Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 4291Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 4377Assert.Equal(SymbolKind.Field, a.Kind); 4381Assert.Equal(SymbolKind.Field, b.Kind); 4385Assert.Equal(SymbolKind.Field, c.Kind); 4389Assert.Equal(SymbolKind.Field, d.Kind); 4416Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 4422Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 4544Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 4553Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5230Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5236Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5335Assert.Equal(SymbolKind.Field, a.Kind); 5339Assert.Equal(SymbolKind.Field, b.Kind); 5343Assert.Equal(SymbolKind.Field, c.Kind); 5347Assert.Equal(SymbolKind.Field, d.Kind); 5374Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5380Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5511Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5520Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 5769Assert.Equal(SymbolKind.Field, a.Kind); 5773Assert.Equal(SymbolKind.Field, b.Kind); 5777Assert.Equal(SymbolKind.Field, c.Kind); 5781Assert.Equal(SymbolKind.Field, d.Kind);
Semantics\ExpressionBodiedMemberTests.cs (4)
141Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 159Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 174Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 267Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind);
Semantics\ForEachTests.cs (2)
1221Assert.Equal(SymbolKind.ArrayType, ((BoundConversion)boundNode.Expression).Operand.Type.Kind); 1715Assert.Equal(SymbolKind.DynamicType, ((BoundConversion)boundNode.Expression).Operand.Type.Kind);
Semantics\ImplicitlyTypeArraysTests.cs (2)
69Assert.Equal(SymbolKind.Local, sym.Symbol.Kind); 97Assert.Equal(SymbolKind.ArrayType, symInfo.Symbol.Kind);
Semantics\InteractiveSemanticModelTests.cs (6)
144Assert.Equal(SymbolKind.Field, symbol.Kind); 164Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 215Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 247Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 249Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 267Assert.Equal(SymbolKind.RangeVariable, semanticInfo.Symbol.Kind);
Semantics\InteractiveUsingTests.cs (3)
44Assert.Equal(SymbolKind.Property, GetSpeculativeSymbol(sub, "NewLine").Kind); 90Assert.Equal(SymbolKind.Alias, aliasSymbol.Kind); 120Assert.Equal(SymbolKind.Alias, aliasSymbol.Kind);
Semantics\LambdaDiscardParametersTests.cs (5)
453Assert.Equal(SymbolKind.Local, localSymbol.Kind); 457Assert.Equal(SymbolKind.Parameter, parameterSymbol.Kind); 486Assert.Equal(SymbolKind.Local, localSymbol.Kind); 518Assert.Equal(SymbolKind.Local, localSymbol.Kind); 522Assert.Equal(SymbolKind.Local, parameterSymbol.Kind);
Semantics\LambdaTests.cs (4)
857Assert.Equal(SymbolKind.Method, sym.Kind); 867Assert.Equal(SymbolKind.Method, sym.Kind); 3009Assert.Equal(SymbolKind.Parameter, symbol.Kind); 3017Assert.Equal(SymbolKind.Parameter, symbol.Kind);
Semantics\LocalFunctionTests.cs (18)
4968Assert.Equal(SymbolKind.Local, b1Symbol.Kind); 6411Assert.Equal(SymbolKind.Local, symbol.Kind); 6447Assert.Equal(SymbolKind.Local, symbol.Kind); 6450Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6491Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6494Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6497Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6538Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6541Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 6544Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 7373Assert.Equal(SymbolKind.TypeParameter, symbolInfo.Symbol.Kind); 7635private void VerifyTParameter(CSharpCompilation comp, int index, string expectedContainer, bool findAnyways = false, string lookupFinds = "TParameter", SymbolKind symbolKind = SymbolKind.TypeParameter) 7656Assert.Equal(SymbolKind.TypeParameter, typeInfo.Type.Kind); 7891VerifyTParameter(comp, 1, "C", symbolKind: SymbolKind.NamedType, lookupFinds: "System.String C.TParameter"); 8365VerifyTParameter(comp, 1, "C", symbolKind: SymbolKind.NamedType, lookupFinds: "System.String C.TParameter"); 8427VerifyTParameter(comp, 1, "C", lookupFinds: "System.String C.TParameter", symbolKind: SymbolKind.NamedType); 8954Assert.Equal(SymbolKind.Parameter, symbolInfo.Symbol.Kind);
Semantics\LookupTests.cs (11)
1394var systemNS = (INamespaceSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("System") && sym.Kind == SymbolKind.Namespace).Single(); 1524var namespaceX = (INamespaceSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("X") && sym.Kind == SymbolKind.Namespace).Single(); 1533var typeA = (INamedTypeSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("A") && sym.Kind == SymbolKind.NamedType).Single(); 1538var aliasY = (IAliasSymbol)actual_lookupSymbols.Where((sym) => sym.Name.Equals("aliasY") && sym.Kind == SymbolKind.Alias).Single(); 1843Assert.True(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1865Assert.False(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1887Assert.False(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1910Assert.False(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1932Assert.False(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1955Assert.True(symbols.Any(s => s.Kind == SymbolKind.TypeParameter)); 1986Assert.True(symbols.Any(s => s.Kind == SymbolKind.TypeParameter));
Semantics\NamedAndOptionalTests.cs (1)
819Assert.Equal(SymbolKind.Parameter, symInfo.Symbol.Kind);
Semantics\NativeIntegerTests.cs (14)
223Assert.Equal(SymbolKind.NamedType, type.Kind); 238Assert.Equal(SymbolKind.NamedType, type.Kind); 319case SymbolKind.Method: 335case SymbolKind.Property: 433case SymbolKind.Method: 449case SymbolKind.Property: 559case SymbolKind.Method: 570case SymbolKind.Property: 577case SymbolKind.Parameter: 612case SymbolKind.Method: 614case SymbolKind.Property: 616case SymbolKind.Parameter: 726Assert.Equal(SymbolKind.ErrorType, type.Kind); 734Assert.Equal(SymbolKind.ErrorType, type.Kind);
Semantics\NonTrailingNamedArgumentsTests.cs (2)
54Assert.Equal(SymbolKind.Parameter, firstASymbol.Symbol.Kind); 66Assert.Equal(SymbolKind.Parameter, secondASymbol.Symbol.Kind);
Semantics\NullableReferenceTypesTests.cs (5)
71784Assert.Equal(SymbolKind.Discard, discard1.Kind); 71788Assert.Equal(SymbolKind.Discard, discard2.Kind); 71792Assert.Equal(SymbolKind.Discard, discard3.Kind); 71796Assert.Equal(SymbolKind.Discard, discard4.Kind); 71800Assert.Equal(SymbolKind.Discard, discard5.Kind);
Semantics\OperatorTests.cs (1)
8408isChecked = isDynamic || symbol1.ContainingSymbol.Kind == SymbolKind.PointerType || symbol1.ContainingType.EnumUnderlyingTypeOrSelf().SpecialType.IsIntegralType();
Semantics\QueryTests.cs (18)
1459Assert.Equal(SymbolKind.RangeVariable, x.Kind); 1467Assert.Equal(SymbolKind.RangeVariable, y.Kind); 1475Assert.Equal(SymbolKind.RangeVariable, z.Kind); 1668Assert.Equal(SymbolKind.RangeVariable, x.Kind); 1676Assert.Equal(SymbolKind.RangeVariable, y.Kind); 1684Assert.Equal(SymbolKind.RangeVariable, z.Kind); 2180Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2210Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2237Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2243Assert.Equal(SymbolKind.RangeVariable, info.Symbol.Kind); 2277Assert.Equal(SymbolKind.RangeVariable, symbol.Kind); 2330Assert.Equal(SymbolKind.RangeVariable, symbol.Kind); 2902Assert.Equal(SymbolKind.RangeVariable, x.Kind); 2935Assert.Equal(SymbolKind.RangeVariable, x.Kind); 3141Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind); 3473Assert.Equal(SymbolKind.RangeVariable, x.Kind); 3523Assert.Equal(SymbolKind.RangeVariable, symbol.Kind); 3563Assert.Equal(SymbolKind.RangeVariable, symbol.Kind);
Semantics\RecordStructTests.cs (21)
2598Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 2633Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 2667Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 2702Assert.Equal(SymbolKind.Parameter, symbol!.Kind); 3289Assert.Equal(SymbolKind.Property, model.GetSymbolInfo(cref).Symbol!.Kind); 3337Assert.Equal(SymbolKind.Property, model.GetSymbolInfo(cref).Symbol!.Kind); 3388Assert.Equal(SymbolKind.Property, model.GetSymbolInfo(cref).Symbol!.Kind); 5852Assert.Equal(SymbolKind.Parameter, parameter.Kind); 5858Assert.Equal(SymbolKind.Parameter, initializer.Kind); 5894Assert.Equal(SymbolKind.Local, outVar.Kind); 6183context.RegisterSymbolAction(Handle, SymbolKind.Method); 6184context.RegisterSymbolAction(Handle, SymbolKind.Property); 6185context.RegisterSymbolAction(Handle, SymbolKind.Parameter); 6186context.RegisterSymbolAction(Handle, SymbolKind.NamedType); 6279context.RegisterSymbolStartAction(Handle1, SymbolKind.Method); 6280context.RegisterSymbolStartAction(Handle1, SymbolKind.Property); 6281context.RegisterSymbolStartAction(Handle1, SymbolKind.Parameter); 6282context.RegisterSymbolStartAction(Handle1, SymbolKind.NamedType); 6817context.RegisterSymbolAction(Handle1, SymbolKind.Method); 6818context.RegisterSymbolAction(Handle2, SymbolKind.Property); 6819context.RegisterSymbolAction(Handle3, SymbolKind.Parameter);
Semantics\RefFieldTests.cs (1)
2020var fieldMembers = containingType.GetMembers().WhereAsArray(m => m.Kind == SymbolKind.Field);
Semantics\RefLocalsAndReturnsTests.cs (2)
4867Assert.Equal(SymbolKind.DynamicType, model.GetTypeInfo(left).Type.Kind); 4895Assert.Equal(SymbolKind.DynamicType, model.GetTypeInfo(left).Type.Kind);
Semantics\ScriptSemanticsTests.cs (1)
597if (symbol.Kind == SymbolKind.NamedType)
Semantics\TopLevelStatementsTests.cs (22)
704Assert.Equal(SymbolKind.Local, local.Kind); 706Assert.Equal(SymbolKind.Method, local.ContainingSymbol.Kind); 708Assert.Equal(SymbolKind.NamedType, local.ContainingSymbol.ContainingSymbol.Kind); 2429Assert.Equal(SymbolKind.Label, declSymbol.Kind); 3952Assert.False(symbols.Any(s => s.Kind == SymbolKind.Parameter)); 4101Assert.False(symbols.Any(s => s.Kind == SymbolKind.Parameter)); 4136Assert.False(symbols.Any(s => s.Kind == SymbolKind.Parameter)); 4141Assert.False(symbols.Any(s => s.Kind == SymbolKind.Parameter)); 4223Assert.Equal(SymbolKind.Method, local.ContainingSymbol.Kind); 4225Assert.Equal(SymbolKind.NamedType, local.ContainingSymbol.ContainingSymbol.Kind); 4899Assert.Equal(SymbolKind.Label, label.Kind); 4901Assert.Equal(SymbolKind.Method, label.ContainingSymbol.Kind); 4903Assert.Equal(SymbolKind.NamedType, label.ContainingSymbol.ContainingSymbol.Kind); 4984Assert.Equal(SymbolKind.Label, label.Kind); 4986Assert.Equal(SymbolKind.Method, label.ContainingSymbol.Kind); 4988Assert.Equal(SymbolKind.NamedType, label.ContainingSymbol.ContainingSymbol.Kind); 6530context.RegisterSymbolAction(Handle, SymbolKind.Method); 6605context.RegisterSymbolStartAction(Handle1, SymbolKind.Method); 6606context.RegisterSymbolStartAction(Handle2, SymbolKind.NamedType); 7269context.RegisterSymbolAction(Handle1, SymbolKind.Method); 7270context.RegisterSymbolAction(Handle2, SymbolKind.Namespace); 7271context.RegisterSymbolAction(Handle3, SymbolKind.NamedType);
Semantics\UnsafeTests.cs (8)
5203Assert.Equal(SymbolKind.Method, binder.ContainingMemberOrLambda.Kind); 7276Assert.Equal(SymbolKind.Local, declaredSymbol.Kind); 7859Assert.Equal(SymbolKind.Local, receiverSymbol.Kind); 7926Assert.Equal(SymbolKind.Local, receiverSymbol.Kind); 8170Assert.Equal(SymbolKind.Local, receiverSymbol.Kind); 8182Assert.Equal(SymbolKind.Local, indexSymbol.Kind); 8237Assert.Equal(SymbolKind.Field, receiverSymbol.Kind); 8295Assert.Equal(SymbolKind.Field, receiverSymbol.Kind);
Semantics\UsingStatementTests.cs (3)
64Assert.Equal(SymbolKind.Local, declaredSymbol.Kind); 1870Assert.Equal(SymbolKind.Local, symbol.Kind); 1897Assert.Equal(SymbolKind.Local, actualSymbol.Kind);
SourceGeneration\GeneratorDriverTests.cs (1)
185context.RegisterSymbolAction(Handle, SymbolKind.NamedType);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (955)
Compilation\CompilationAPITests.cs (1)
1198Assert.Equal(SymbolKind.Assembly, smb.Kind);
Compilation\GetSemanticInfoTests.cs (19)
45Assert.Equal(SymbolKind.Parameter, sym.Symbol.Kind); 75Assert.Equal(SymbolKind.Method, sym.Symbol.Kind); 105Assert.Equal(SymbolKind.Method, sym.Symbol.Kind); 139Assert.Equal(SymbolKind.Method, sym.Symbol.Kind); 1073Assert.Equal(SymbolKind.Method, baseConstructor.Kind); 1092Assert.Equal(SymbolKind.Method, baseConstructor.Kind); 1533Assert.Equal(SymbolKind.Field, candidate.Kind); 1562Assert.Equal(SymbolKind.NamedType, symbol.Kind); 1612Assert.Equal(SymbolKind.TypeParameter, symbol.Kind); 1708Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1710Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind); 1743Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1745Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind); 1778Assert.Equal(SymbolKind.Parameter, symbol.Kind); 1780Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind); 2541Assert.Equal(SymbolKind.Parameter, symbol.Kind); 2727Assert.Equal(SymbolKind.Local, symbol.Kind); 3556Assert.Equal(SymbolKind.Namespace, info.Symbol.Kind); 4790Assert.Equal(SymbolKind.ErrorType, lambda.ReturnType.Kind);
Compilation\GetUnusedImportDirectivesTests.cs (2)
197Assert.Equal(SymbolKind.NamedType, info.Symbol.Kind); 199Assert.Equal(SymbolKind.Namespace, info.Symbol.ContainingSymbol.Kind);
Compilation\IndexedProperties_BindingTests.cs (6)
42IndexedPropertiesBindingChecks(source, reference, SymbolKind.Method, "get_P1"); 63IndexedPropertiesBindingChecks(source, reference, SymbolKind.Property, "P1"); 84IndexedPropertiesBindingChecks(source, reference, SymbolKind.Property, "P1"); 104IndexedPropertiesBindingChecks(source, reference, SymbolKind.Property, "P1"); 130IndexedPropertiesBindingChecks(source, reference, SymbolKind.Property, "P1"); 133private void IndexedPropertiesBindingChecks(string source, MetadataReference reference, SymbolKind symbolKind, string name)
Compilation\SemanticModelAPITests.cs (45)
155Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind); 1342Assert.Equal(SymbolKind.Alias, model.GetDeclaredSymbol(usingSyntax).Kind); 1369Assert.Equal(SymbolKind.Method, symbol.Kind); 1731Assert.Equal(SymbolKind.Alias, aliasSymbol.Kind); 1790Assert.Equal(SymbolKind.Local, local.Kind); 1802Assert.Equal(SymbolKind.Local, info.Symbol.Kind); 1809Assert.Equal(SymbolKind.Local, info2.Symbol.Kind); 1843Assert.Equal(SymbolKind.Local, local.Kind); 1856Assert.Equal(SymbolKind.Local, local.Kind); 1889Assert.Equal(SymbolKind.Label, label.Kind); 2085Assert.Equal(SymbolKind.Method, symbol.Kind); 2102Assert.Equal(SymbolKind.Method, symbol.Kind); 2121Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2123Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 2286Assert.Equal(SymbolKind.Local, symbol.Kind); 2396Assert.Equal(SymbolKind.Local, local.Kind); 2408Assert.Equal(SymbolKind.Local, info.Symbol.Kind); 2579Assert.Equal(SymbolKind.Local, local.Kind); 2593Assert.Equal(SymbolKind.Local, local.Kind); 2607Assert.Equal(SymbolKind.Local, local.Kind); 2612Assert.Equal(SymbolKind.Parameter, param.Kind); 2650Assert.Equal(SymbolKind.Label, label.Kind); 2695SymbolKind expectedSymbolKind, 2802speculatedUsingExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.Namespace, "System.Collections"); 2817speculatedUsingExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException"); 2837speculatedTypeExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.NamedType, "System.ArgumentException"); 2868speculatedTypeExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.NamedType, "System.ArgumentException"); 2871speculatedTypeExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.NamedType, "System.ArgumentException"); 2874speculatedTypeExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.NamedType, "System.ArgumentException"); 2938Assert.Equal(SymbolKind.NamedType, symbol.Kind); 2944Assert.Equal(SymbolKind.NamedType, symbol.Kind); 2978Assert.Equal(SymbolKind.NamedType, symbol.Kind); 2984Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3023Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3028Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3033Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3039Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3051Assert.Equal(SymbolKind.Method, symbol.Kind); 3056Assert.Equal(SymbolKind.Method, symbol.Kind); 3061Assert.Equal(SymbolKind.NamedType, symbol.Kind); 3067Assert.Equal(SymbolKind.Method, symbol.Kind); 3132Assert.Equal(SymbolKind.Parameter, symbol.Kind); 3617Assert.Equal(SymbolKind.NamedType, oldSymbol.Kind); 3624Assert.Equal(SymbolKind.NamedType, newSymbol.Kind); 3850Assert.Equal(SymbolKind.Alias, symbol.Kind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (36)
433Assert.Equal(SymbolKind.Event, symbol.Kind); 455Assert.Equal(SymbolKind.Property, symbol.Kind); 477Assert.Equal(SymbolKind.Property, symbol.Kind); 502Assert.Equal(SymbolKind.Event, symbol.Kind); 524Assert.Equal(SymbolKind.Property, symbol.Kind); 546Assert.Equal(SymbolKind.Property, symbol.Kind); 970Assert.Equal(SymbolKind.TypeParameter, ptsym.Kind); 988Assert.Equal(SymbolKind.Parameter, psym.Kind); 1090Assert.Equal(SymbolKind.NamedType, symbols[0].Kind); 1094Assert.Equal(SymbolKind.Local, symbols[0].Kind); 1131Assert.Equal(SymbolKind.NamedType, symbols[0].Kind); 1139Assert.Equal(SymbolKind.Field, symbols[0].Kind); 1143Assert.Equal(SymbolKind.Alias, symbols[0].Kind); 1180Assert.Equal(SymbolKind.NamedType, symbols[0].Kind); 1388Assert.True(symbolsInC.Any(s => s.Name == "A" && s.Kind == SymbolKind.NamedType)); 1389Assert.True(symbolsInC.Any(s => s.Name == "B" && s.Kind == SymbolKind.NamedType)); 1390Assert.True(symbolsInC.Any(s => s.Name == "C" && s.Kind == SymbolKind.NamedType)); 1391Assert.True(symbolsInC.Any(s => s.Name == "M" && s.Kind == SymbolKind.Method && s.ContainingType.Name == "A")); 1392Assert.True(symbolsInC.Any(s => s.Name == "M" && s.Kind == SymbolKind.Method && s.ContainingType.Name == "B")); 1393Assert.True(symbolsInC.Any(s => s.Name == "M" && s.Kind == SymbolKind.Method && s.ContainingType.Name == "C")); 1394Assert.True(symbolsInC.Any(s => s.Name == "F" && s.Kind == SymbolKind.Method && s.ContainingType.Name == "C")); 1395Assert.True(symbolsInC.Any(s => s.Name == "System" && s.Kind == SymbolKind.Namespace)); 1396Assert.True(symbolsInC.Any(s => s.Name == "Microsoft" && s.Kind == SymbolKind.Namespace)); 1722symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension); 1885symbol.Kind == SymbolKind.Method && (((IMethodSymbol)symbol).IsExtensionMethod || ((IMethodSymbol)symbol).MethodKind == MethodKind.ReducedExtension); 2820Assert.Equal(SymbolKind.Namespace, n1.Kind); 3454Assert.Equal(SymbolKind.Alias, symbol.Kind); 3590Assert.Equal(SymbolKind.Method, symbol.Kind); 3615Assert.Equal(SymbolKind.Method, symbol.Kind); 3639Assert.Equal(SymbolKind.NamedType, enumTypeSymbol.Kind); 3643Assert.Equal(SymbolKind.Field, symbol.Kind); 3671Assert.Equal(SymbolKind.Parameter, info.Symbol.Kind); 3713Assert.Equal(SymbolKind.Label, symbol.Kind); 3849Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind); 4747Assert.Equal(SymbolKind.NamedType, enumSymbol.Kind); 4751Assert.Equal(SymbolKind.Event, eventSymbol.Kind);
Compilation\SemanticModelGetSemanticInfoTests.cs (301)
56Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 58Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 91Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 126Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 160Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 201Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 242Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 282Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 319Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 349Assert.Equal(SymbolKind.Field, symbol.Kind); 379Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 437Assert.Equal(SymbolKind.Field, symbol.Kind); 472Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 512Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 555Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 557Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 603Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 605Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 651Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 653Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 704Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 706Assert.Equal(SymbolKind.Property, sortedCandidates[1].Kind); 736Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 770Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 805Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 1649Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 1693Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 1725Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 2124Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 2157Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2197Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2269Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2304Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2354Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2400Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2443Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2498Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2550Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2618Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 2655Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2700Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2702Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 2741Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2743Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 2791Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2793Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 2837Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2876Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2912Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 2956Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 2992Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 3026Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 3078Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3123Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3163Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3205Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3251Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3290Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3326Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3363Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3400Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3498Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3533Assert.Equal(SymbolKind.Local, sortedCandidates[0].Kind); 3561Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 3595Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3633Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3677Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3711Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3745Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3779Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 3809Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 3870Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 3905Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 4013Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 4044Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 4079Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 4112Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 4141Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 4223Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 4290Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 4292Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 4324Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 4385Assert.Equal(SymbolKind.Namespace, semanticInfo.Type.ContainingSymbol.Kind); 4410Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 4416Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 4453Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 4480Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4547Assert.Equal(SymbolKind.Parameter, symbol.Kind); 4548Assert.True(symbol.ContainingSymbol.Kind == SymbolKind.Property && ((IPropertySymbol)symbol.ContainingSymbol).IsIndexer); 4575Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 4613Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4679Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4717Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4753Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4789Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4820Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 4857Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4884Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 4892Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.ContainingSymbol.Kind); 4928Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 4929Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 4974Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 4976Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 4978Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 4983Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 4985Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 4987Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 5026Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 5028Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 5030Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 5035Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 5037Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 5039Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 5117Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 5163Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 5205Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5245Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 5284Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5326Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5412Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 5454Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 5456Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 5458Assert.Equal(SymbolKind.NamedType, sortedCandidates[2].Kind); 5548Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5580Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 5612Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 5637Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5662Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5698Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 5801Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5868Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 5937Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 6004Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 6123Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6150Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6183Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6254Assert.Equal(SymbolKind.NamedType, symbol.Kind); 6335Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 6372Assert.Equal(SymbolKind.Method, symbol.Kind); 6406Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 6442Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 6525Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6560Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6597Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 6685Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 6881Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 6926Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 7000Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7029Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7053Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 7084Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7112Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7143Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7294Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7322Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7525Assert.Equal(SymbolKind.NamedType, semanticInfo.Type.Kind); 7558Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7595Assert.Equal(SymbolKind.Parameter, sortedCandidates[0].Kind); 7597Assert.Equal(SymbolKind.Parameter, sortedCandidates[1].Kind); 7666Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7705Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 7734Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind); 7759Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 7778Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind); 7797Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind); 7824Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 7889Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 8124Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind); 8148Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind); 8241Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind); 8379Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 8413Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 8566Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8611Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8650Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 8857Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 8899Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 9133Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9311Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 9313Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 9368Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9370Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9427Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9429Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9465Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 9467Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 9469Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 9538Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9540Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9575Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9577Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9624Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9626Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9790Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9792Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9841Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 9896Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 9898Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 9923Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 9935Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 9957Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 9971Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 9993Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10007Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 10029Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10043Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 10065Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 10079Assert.Equal(SymbolKind.Alias, aliasInfo.Kind); 10109Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 10146Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 10187Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 10226Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 10257Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 10292Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 10327Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 10329Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 10361Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 10363Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 10395Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 10397Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 10438Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 10440Assert.Equal(SymbolKind.NamedType, sortedCandidates[1].Kind); 10475Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 10503Assert.Equal(SymbolKind.Parameter, sortedCandidates[0].Kind); 10528Assert.Equal(SymbolKind.Parameter, semanticInfo.CandidateSymbols[0].Kind); 10533Assert.Equal(SymbolKind.Parameter, sortedCandidates[0].Kind); 10567Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 10610Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 10647Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 10684Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 10723Assert.Equal(SymbolKind.Event, sortedCandidates[0].Kind); 10766Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 10808Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 10845Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 11154Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 11156Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 11158Assert.Equal(SymbolKind.Method, sortedCandidates[2].Kind); 11232Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 11234Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 11272Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11309Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11346Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11386Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11433Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 11545Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 11582Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 11644Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11678Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11716Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 11761Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind); 11837Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 11907Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 11979Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12161Assert.Equal(SymbolKind.NamedType, semanticInfo.CandidateSymbols[0].Kind); 12229Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 12297Assert.Equal(SymbolKind.TypeParameter, sortedCandidates[0].Kind); 12365Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 12401Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 12533Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12574Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12616Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12650Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 12682Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 12777Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12809Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 12852Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12928Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 12968Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 13006Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 13047Assert.Equal(SymbolKind.Property, sortedCandidates[0].Kind); 13104Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13139Assert.Equal(SymbolKind.Method, symbol.Kind); 13173Assert.Equal(SymbolKind.Method, symbol.Kind); 13207Assert.Equal(SymbolKind.Method, symbol.Kind); 13238Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 13269Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13329Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 13509Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind); 13883Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 13922Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 13957Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14048Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14087Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14125Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14207Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 14251Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14347Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 14428Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 14517Assert.Equal(SymbolKind.NamedType, sortedCandidates[0].Kind); 14632Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 14671Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 15090Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15123Assert.Equal(SymbolKind.Method, sortedCandidates[0].Kind); 15125Assert.Equal(SymbolKind.Method, sortedCandidates[1].Kind); 15158Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind); 15189Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15220Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15251Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15282Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind); 15309Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind); 15411Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind);
CrossLanguageTests.cs (2)
38Assert.Empty(t.GetMembersUnordered().Where(x => x.Kind == SymbolKind.Method && !x.CanBeReferencedByName)); 39Assert.False(t.GetMembersUnordered().Where(x => x.Kind == SymbolKind.Property).First().CanBeReferencedByName); //there's only one.
DeclarationTests.cs (1)
265Assert.Equal(SymbolKind.NamedType, comp.GlobalNamespace.GetMembers()[0].Kind);
DocumentationComments\CrefTests.cs (11)
742Assert.Equal(SymbolKind.NamedType, GetReferencedSymbol(crefSyntax, compilation).Kind); 787Assert.Equal(SymbolKind.NamedType, GetReferencedSymbol(crefSyntax, compilation).Kind); 817Assert.Equal(SymbolKind.Method, GetReferencedSymbol(crefSyntax, compilation).Kind); 864Assert.Equal(SymbolKind.Method, GetReferencedSymbol(crefSyntax, compilation).Kind); 1813Assert.Equal(SymbolKind.Method, actualSymbol.Kind); 5922InstanceConstructors.Single(ctor => ctor.Parameters.Length == 1 && ctor.GetParameterType(0).Kind == SymbolKind.ArrayType); 6075Assert.Equal(SymbolKind.Method, methodSymbol.Kind); 6282Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind); 6288Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind); 6298Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind); 7066Assert.Equal(SymbolKind.Property, symbol.Kind);
DocumentationComments\DocumentationCommentIDTests.cs (19)
33Assert.Equal(SymbolKind.Alias, symbol.Kind); 49Assert.Equal(SymbolKind.ArrayType, symbol.Kind); 63Assert.Equal(SymbolKind.Assembly, symbol.Kind); 79Assert.Equal(SymbolKind.DynamicType, symbol.Kind); 94Assert.Equal(SymbolKind.ErrorType, symbol.Kind); 109Assert.Equal(SymbolKind.Event, symbol.Kind); 124Assert.Equal(SymbolKind.Field, symbol.Kind); 146Assert.Equal(SymbolKind.Label, symbol.Kind); 167Assert.Equal(SymbolKind.Local, symbol.Kind); 184Assert.Equal(SymbolKind.Method, symbol.Kind); 198Assert.Equal(SymbolKind.NetModule, symbol.Kind); 212Assert.Equal(SymbolKind.NamedType, symbol.Kind); 226Assert.Equal(SymbolKind.Namespace, symbol.Kind); 240Assert.Equal(SymbolKind.Namespace, symbol.Kind); 257Assert.Equal(SymbolKind.Parameter, symbol.Kind); 273Assert.Equal(SymbolKind.PointerType, symbol.Kind); 288Assert.Equal(SymbolKind.Property, symbol.Kind); 311Assert.Equal(SymbolKind.RangeVariable, symbol.Kind); 326Assert.Equal(SymbolKind.TypeParameter, symbol.Kind);
SymbolDisplay\SymbolDisplayTests.cs (4)
2309GetMembers("E").Where(m => m.Kind == SymbolKind.Event).Single(); 2362GetMembers("E").Where(m => m.Kind == SymbolKind.Event).Single(); 5690var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single(); 5894var indexer = type.GetMembers().Where(m => m.Kind == SymbolKind.Property && ((IPropertySymbol)m).IsIndexer).Single();
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
878var mems = tsym.GetMembers().Where(s => s.Kind == SymbolKind.Method);
Symbols\AnonymousTypesSemanticsTests.cs (10)
591Assert.Equal(SymbolKind.Method, method.Kind); 659Assert.Equal(SymbolKind.Method, method.Kind); 680Assert.Equal(SymbolKind.Method, method.Kind); 701Assert.Equal(SymbolKind.Method, method.Kind); 756Assert.Equal(SymbolKind.Property, info.Symbol.Kind); 779Assert.Equal(SymbolKind.RangeVariable, info1.Symbol.Kind); 784Assert.Equal(SymbolKind.Property, info2.Symbol.Kind); 848Assert.Equal(SymbolKind.RangeVariable, info1.Symbol.Kind); 853Assert.Equal(SymbolKind.RangeVariable, info2.Symbol.Kind); 1406var properties = (from m in info0.Type.GetMembers() where m.Kind == SymbolKind.Property select m).ToArray();
Symbols\AssemblyAndNamespaceTests.cs (2)
37Assert.Equal(SymbolKind.Assembly, sym.Kind); 64Assert.Equal(SymbolKind.NetModule, sym.Kind);
Symbols\CompilationCreationTests.cs (115)
140Assert.Equal(SymbolKind.ErrorType, asm1[1].GlobalNamespace.GetTypeMembers("Class4"). 164Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 195Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 216Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 221Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 226Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 254Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 279Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 284Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 289Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 304Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 309Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 314Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 319Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 324Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 370Assert.Equal(SymbolKind.ErrorType, retval15.Kind); 374Assert.Equal(SymbolKind.ErrorType, retval16.Kind); 378Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 393Assert.Equal(SymbolKind.ErrorType, retval18.Kind); 397Assert.Equal(SymbolKind.ErrorType, retval19.Kind); 401Assert.Equal(SymbolKind.ErrorType, retval20.Kind); 405Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 410Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 458Assert.Equal(SymbolKind.ErrorType, asm1[1].GlobalNamespace.GetTypeMembers("Class4"). 475Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 497Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 518Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 523Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 528Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 546Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 571Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 576Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 581Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 596Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 601Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 606Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 611Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 616Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 636Assert.Equal(SymbolKind.ErrorType, retval15.Kind); 640Assert.Equal(SymbolKind.ErrorType, retval16.Kind); 644Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 659Assert.Equal(SymbolKind.ErrorType, retval18.Kind); 663Assert.Equal(SymbolKind.ErrorType, retval19.Kind); 667Assert.Equal(SymbolKind.ErrorType, retval20.Kind); 671Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 676Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 747Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 843Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 864Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 869Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 874Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 984Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 1009Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 1014Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 1019Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 1034Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 1039Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 1044Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 1049Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 1054Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 1107Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 1134Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 1139Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 1195Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 1222Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 1243Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 1248Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 1253Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 1275Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 1300Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 1305Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 1310Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 1325Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 1330Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 1335Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 1340Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 1345Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 1380Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 1407Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 1412Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 1458Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 1517Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 1538Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 1543Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 1548Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 1605Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 1630Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 1635Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 1640Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 1655Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 1660Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 1665Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 1670Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 1675Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 1743Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 1770Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 1775Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 1841Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind); 1868Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind); 1889Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind); 1894Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind); 1899Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind); 1921Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind); 1946Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind); 1951Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind); 1956Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind); 1971Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind); 1976Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind); 1981Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind); 1986Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind); 1991Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind); 2028Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind); 2055Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind); 2060Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind); 2528Assert.NotEqual(SymbolKind.ErrorType, typeC5.Kind);
Symbols\ConversionTests.cs (2)
2142Assert.Equal(SymbolKind.Method, symbol.Kind); 2176Assert.Equal(SymbolKind.Method, symbol.Kind);
Symbols\ExtensionMethodTests.cs (2)
3154Assert.Equal(SymbolKind.Method, firstInvocationSymbol.Kind); 3160Assert.Equal(SymbolKind.Method, secondInvocationSymbol.Kind);
Symbols\IndexerTests.cs (3)
140var typeAProperties = type.GetMembers().Where(m => m.Kind == SymbolKind.Property).Cast<PropertySymbol>().ToArray(); 1232var classCIndexer = classC.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); 1244var classCIndexer = classC.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single();
Symbols\Metadata\MetadataMemberTests.cs (8)
156Assert.Equal(SymbolKind.Assembly, mscorNS.Kind); 163Assert.Equal(SymbolKind.Method, ctor.Kind); 191Assert.Equal(SymbolKind.Assembly, mscorNS.Kind); 204Assert.Equal(SymbolKind.Method, member1.Kind); 243Assert.Equal(SymbolKind.Assembly, mscorNS.Kind); 262Assert.Equal(SymbolKind.Parameter, p1.Kind); 311Assert.Equal(SymbolKind.Method, member1.Kind); 359Assert.Equal(SymbolKind.Parameter, p2.Kind);
Symbols\Metadata\MetadataTypeTests.cs (10)
32Assert.Equal(SymbolKind.Assembly, mscorNS.Kind); 44Assert.Equal(SymbolKind.Namespace, ns.Kind); 88Assert.Equal(SymbolKind.NamedType, class1.Kind); 122Assert.Equal(SymbolKind.Assembly, mscorNS.Kind); 138Assert.Equal(SymbolKind.NamedType, type1.Kind); 186Assert.Equal(SymbolKind.NamedType, type1.Kind); 236Assert.Equal(SymbolKind.NamedType, type1.Kind); 300Assert.Equal(SymbolKind.ArrayType, type2.Kind); 301Assert.Equal(SymbolKind.ArrayType, type3.Kind); 592if (member.Kind != SymbolKind.Namespace)
Symbols\Metadata\PE\BaseTypeResolution.cs (9)
206Assert.NotEqual(SymbolKind.ErrorType, @base.Kind); 227Assert.NotEqual(SymbolKind.ErrorType, base1.Kind); 233Assert.NotEqual(SymbolKind.ErrorType, base2.Kind); 239Assert.NotEqual(SymbolKind.ErrorType, base3.Kind); 245Assert.NotEqual(SymbolKind.ErrorType, base4.Kind); 251Assert.NotEqual(SymbolKind.ErrorType, base5.Kind); 257Assert.NotEqual(SymbolKind.ErrorType, base6.Kind); 263Assert.NotEqual(SymbolKind.ErrorType, base7.Kind); 269Assert.NotEqual(SymbolKind.ErrorType, base8.Kind);
Symbols\Metadata\PE\LoadingEvents.cs (4)
75Assert.Equal(SymbolKind.Event, instanceEvent.Kind); 84Assert.Equal(SymbolKind.Event, staticEvent.Kind); 334var outerInterfaceEvent = outerInterface.GetMembers().Single(m => m.Kind == SymbolKind.Event); 344var innerInterfaceEvent = innerInterface.GetMembers().Single(m => m.Kind == SymbolKind.Event);
Symbols\Metadata\PE\LoadingFields.cs (4)
57Assert.Equal(SymbolKind.Field, f1.Kind); 109Assert.Equal(SymbolKind.NamedType, csFields.GetMembers("FFF").Single().Kind); 110Assert.Equal(SymbolKind.Field, csFields.GetMembers("Fff").Single().Kind); 111Assert.Equal(SymbolKind.Method, csFields.GetMembers("FfF").Single().Kind);
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (1)
72Assert.Equal(SymbolKind.TypeParameter, varC1_T.Kind);
Symbols\Metadata\PE\LoadingIndexers.cs (3)
604var indexer = (PropertySymbol)@class.GetMembers().Where(m => m.Kind == SymbolKind.Property).Single(); 1035Assert.Equal(SymbolKind.Property, property.Kind); 1176var classIndexer = (PropertySymbol)@class.GetMembers().Single(s => s.Kind == SymbolKind.Property);
Symbols\Metadata\PE\LoadingMethods.cs (4)
68Assert.Equal(SymbolKind.Parameter, localM1_1.Kind); 95Assert.Equal(SymbolKind.NamedType, varC108.Kind); 100Assert.Equal(SymbolKind.NamedType, sameName1.Kind); 102Assert.Equal(SymbolKind.Method, sameName2.Kind);
Symbols\Metadata\PE\LoadingProperties.cs (2)
169var outerInterfaceProperty = outerInterface.GetMembers().Single(m => m.Kind == SymbolKind.Property); 179var innerInterfaceProperty = innerInterface.GetMembers().Single(m => m.Kind == SymbolKind.Property);
Symbols\Metadata\PE\MissingTypeReferences.cs (17)
46Assert.Equal(SymbolKind.ErrorType, @base.Kind); 64Assert.Equal(SymbolKind.ErrorType, @base.Kind); 101Assert.Equal(SymbolKind.ErrorType, @base.Kind); 112Assert.Equal(SymbolKind.ErrorType, @base.ContainingSymbol.Kind); 116Assert.Equal(SymbolKind.ErrorType, @base.ContainingSymbol.ContainingSymbol.Kind); 130Assert.Equal(SymbolKind.ErrorType, @base.Kind); 145Assert.Equal(SymbolKind.ErrorType, @base.Kind); 160Assert.Equal(SymbolKind.ErrorType, @base.Kind); 173Assert.Equal(SymbolKind.ErrorType, genericBase.Kind); 177Assert.Equal(SymbolKind.ErrorType, @base.Kind); 194Assert.Equal(SymbolKind.ErrorType, @base.Kind); 210Assert.Equal(SymbolKind.NamedType, genericBase.ContainingSymbol.Kind); 213Assert.Equal(SymbolKind.ErrorType, @base.Kind); 228Assert.Equal(SymbolKind.ErrorType, genericBase.ContainingSymbol.Kind); 231Assert.Equal(SymbolKind.ErrorType, @base.Kind); 250Assert.Equal(SymbolKind.ErrorType, genericBase.ContainingSymbol.Kind); 253Assert.Equal(SymbolKind.ErrorType, @base.Kind);
Symbols\Metadata\PE\NoPia.cs (63)
156Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 164Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 200Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 208Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 213Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 215Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 237Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 239Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 244Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 246Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 270Assert.NotEqual(SymbolKind.ErrorType, param[0].Type.Kind); 271Assert.NotEqual(SymbolKind.ErrorType, param[1].Type.Kind); 275Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 277Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 304Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 311Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 528Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 537Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 542Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 550Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 571Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 573Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 578Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 580Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 604Assert.NotEqual(SymbolKind.ErrorType, param[0].Type.Kind); 605Assert.NotEqual(SymbolKind.ErrorType, param[1].Type.Kind); 612Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 614Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 640Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 646Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 717Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 718Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 719Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMembers("Test3").OfType<MethodSymbol>().Single().ReturnType.Kind); 724Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 736Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 737Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 739Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 780Assert.NotEqual(SymbolKind.ErrorType, varI5_2.GetMembers("Foo").OfType<MethodSymbol>().Single().ReturnType.Kind); 794Assert.NotEqual(SymbolKind.ErrorType, varI7_3.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 809Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMembers("Foo").OfType<MethodSymbol>().Single().ReturnType.Kind); 810Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 858Assert.NotEqual(SymbolKind.ErrorType, varI7_7.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 1018Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1019Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1020Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMembers("Test3").OfType<MethodSymbol>().Single().ReturnType.Kind); 1025Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1037Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1038Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1040Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1147Assert.NotEqual(SymbolKind.ErrorType, varI5_2.GetMembers("Foo").OfType<MethodSymbol>().Single().ReturnType.Kind); 1161Assert.NotEqual(SymbolKind.ErrorType, varI7_3.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 1176Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMembers("Foo").OfType<MethodSymbol>().Single().ReturnType.Kind); 1177Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 1225Assert.NotEqual(SymbolKind.ErrorType, varI7_7.GetMembers("Bar").OfType<MethodSymbol>().Single().ReturnType.Kind); 1239Assert.NotEqual(SymbolKind.ErrorType, varI5.Kind); 1240Assert.NotEqual(SymbolKind.ErrorType, varI6.Kind); 1241Assert.NotEqual(SymbolKind.ErrorType, varI5_Foo.ReturnType.Kind); 1242Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI5_Foo.ReturnType).TypeArguments()[0].Kind); 1249Assert.NotEqual(SymbolKind.ErrorType, varI7_Foo.ReturnType.Kind); 1250Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI7_Foo.ReturnType).TypeArguments()[0].Kind); 1253Assert.NotEqual(SymbolKind.ErrorType, varI7_Bar.ReturnType.Kind); 1254Assert.NotEqual(SymbolKind.ErrorType, ((NamedTypeSymbol)varI7_Bar.ReturnType).TypeArguments()[0].Kind); 1259Assert.NotEqual(SymbolKind.ErrorType, varI1.Kind);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (31)
36Assert.Equal(SymbolKind.ErrorType, localField.Type.BaseType().Kind); 56Assert.Equal(SymbolKind.ErrorType, importedField.Type.Kind); 76Assert.Equal(SymbolKind.ErrorType, importedField.Type.Kind); 95Assert.Equal(SymbolKind.NamedType, importedField.Type.Kind); 98Assert.Equal(SymbolKind.NamedType, outer.Kind); 101Assert.Equal(SymbolKind.ErrorType, inner.Kind); 118Assert.Equal(SymbolKind.NamedType, var1.Type.Kind); 140Assert.Equal(SymbolKind.ErrorType, m.Parameters.Where(arg => arg.Name == "c1").Select(arg => arg).Single().Type.BaseType().Kind); 145Assert.Equal(SymbolKind.ErrorType, m.ReturnType.BaseType().Kind); 165Assert.Equal(SymbolKind.NamedType, var1.Type.Kind); 184Assert.Equal(SymbolKind.ErrorType, importedProperty.Parameters.Single(arg => arg.Name == "x").Type.Kind); 203Assert.Equal(SymbolKind.ErrorType, importedProperty.Type.Kind); 222Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.Where(arg => arg.Name == "x").Select(arg => arg).Single().Type.Kind); 241Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.Where(arg => arg.Name == "x").Select(arg => arg).Single().Type.Kind); 260Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.Where(arg => arg.Name == "x").Select(arg => arg).Single().Type.Kind); 279Assert.Equal(SymbolKind.ErrorType, importedMethod.ReturnType.Kind); 298Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.Where(arg => arg.Name == "x").Select(arg => arg).Single().Type.Kind); 317Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.Single(arg => arg.Name == "x").Type.Kind); 336Assert.Equal(SymbolKind.ErrorType, importedField.Type.Kind); 354Assert.Equal(SymbolKind.NamedType, var1.Type.Kind); 371Assert.Equal(SymbolKind.NamedType, var1.Type.Kind); 391Assert.Equal(SymbolKind.ErrorType, localField.Type.BaseType().Kind); 412Assert.Equal(SymbolKind.NamedType, localField.Type.Kind); 445Assert.Equal(SymbolKind.Parameter, m.Parameters.Where(arg => arg.Name == "c1").Select(arg => arg).Single().Kind); 450Assert.Equal(SymbolKind.NamedType, m.ReturnType.Kind); 468Assert.Equal(SymbolKind.NamedType, classLocalType.Kind); 489Assert.Equal(SymbolKind.ArrayType, localField.Type.Kind); 490Assert.Equal(SymbolKind.ErrorType, ((ArrayTypeSymbol)localField.Type).ElementType.Kind); 505Assert.Equal(SymbolKind.ArrayType, localField.Type.Kind); 521Assert.Equal(SymbolKind.ErrorType, localMethod.ReturnType.Kind); 571Assert.Equal(SymbolKind.ErrorType, m.ReturnType.Kind);
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (5)
102Assert.Equal(SymbolKind.NamedType, methodSymbol.Parameters.Single(arg => arg.Name == "arg").Type.Kind); 306Assert.Equal(SymbolKind.ErrorType, missing.Kind); 374Assert.Equal(SymbolKind.ErrorType, param.First().Type.Kind); 441Assert.Equal(SymbolKind.NamedType, methodSymbol.ReturnType.Kind); 482Assert.Equal(SymbolKind.NamedType, embeddedType.ReturnType.Kind);
Symbols\Metadata\PE\TypeAccessibility.cs (6)
31where n.Kind == SymbolKind.Namespace && n.Name.Equals("System") 71where t.Kind == SymbolKind.Namespace && t.Name.Equals("Runtime") 75where t.Kind == SymbolKind.Namespace && t.Name.Equals("Remoting") 79where t.Kind == SymbolKind.Namespace && t.Name.Equals("Messaging") 93where t.Kind == SymbolKind.Namespace && t.Name.Equals("Security") 97where t.Kind == SymbolKind.Namespace && t.Name.Equals("AccessControl")
Symbols\MissingSpecialMember.cs (3)
537Assert.Equal(SymbolKind.ErrorType, symbol.Kind); // Not available 541Assert.NotEqual(SymbolKind.ErrorType, symbol.Kind); 687Assert.True(symbol.Kind != SymbolKind.ErrorType, $"{wkt} should not be an error type");
Symbols\MockSymbolTests.cs (3)
32Assert.Equal(SymbolKind.ArrayType, ats1.Kind); 40Assert.Equal(SymbolKind.ArrayType, ats2.Kind); 57Assert.Equal(SymbolKind.PointerType, pts1.Kind);
Symbols\Retargeting\NoPia.cs (73)
464Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 472Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 506Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 514Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 519Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 521Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 541Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 543Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 548Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 550Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 573Assert.NotEqual(SymbolKind.ErrorType, param[0].Type.Kind); 574Assert.NotEqual(SymbolKind.ErrorType, param[1].Type.Kind); 578Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 580Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 606Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 612Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 765Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 773Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 807Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 815Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 820Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 822Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 842Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 844Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 849Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 851Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 874Assert.NotEqual(SymbolKind.ErrorType, param[0].Type.Kind); 875Assert.NotEqual(SymbolKind.ErrorType, param[1].Type.Kind); 879Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 881Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 907Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 913Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1069Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1077Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1111Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1119Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1124Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1126Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1146Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1148Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1153Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1155Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1178Assert.NotEqual(SymbolKind.ErrorType, param[0].Type.Kind); 1179Assert.NotEqual(SymbolKind.ErrorType, param[1].Type.Kind); 1183Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1185Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1211Assert.Equal(SymbolKind.ErrorType, param[0].Type.Kind); 1217Assert.Equal(SymbolKind.ErrorType, param[1].Type.Kind); 1349Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1350Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1351Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMembers("Test3").OfType<MethodSymbol>().Single().ReturnType.Kind); 1356Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1370Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1371Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1373Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1415Assert.Equal(SymbolKind.ErrorType, assemblies1[0].GlobalNamespace.GetMember<MethodSymbol>("C.Test1").ReturnType.Kind); 1423Assert.Equal(SymbolKind.ErrorType, assemblies2[0].GlobalNamespace.GetMember<MethodSymbol>("C.Test1").ReturnType.Kind); 1460Assert.Equal(SymbolKind.ErrorType, assemblies1[0].GlobalNamespace.GetMember<MethodSymbol>("C.Test1").ReturnType.Kind); 1468Assert.Equal(SymbolKind.ErrorType, assemblies2[0].GlobalNamespace.GetMember<MethodSymbol>("C.Test1").ReturnType.Kind); 1902Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1903Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1904Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMembers("Test3").OfType<MethodSymbol>().Single().ReturnType.Kind); 1909Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1923Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1924Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1926Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1952Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1953Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1954Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMembers("Test3").OfType<MethodSymbol>().Single().ReturnType.Kind); 1959Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind); 1973Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test1").OfType<MethodSymbol>().Single().ReturnType.Kind); 1974Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test2").OfType<MethodSymbol>().Single().ReturnType.Kind); 1976Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMembers("Test4").OfType<MethodSymbol>().Single().ReturnType.Kind);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (5)
85case SymbolKind.Method: 92case SymbolKind.Property: 95case SymbolKind.Event: 98case SymbolKind.ErrorType: 311return type.GetMembers().Where(s => s.Kind == SymbolKind.Property).Cast<PropertySymbol>().Single(p => p.Parameters.Length == parameterCount);
Symbols\Retargeting\RetargetingTests.cs (12)
1173case SymbolKind.Field: 1176case SymbolKind.NamedType: 1179case SymbolKind.Method: 1182case SymbolKind.Parameter: 1185case SymbolKind.Property: 1188case SymbolKind.TypeParameter: 1300case SymbolKind.NamedType: 1305case SymbolKind.Field: 1307case SymbolKind.Method: 1309case SymbolKind.Parameter: 1311case SymbolKind.Property: 1313case SymbolKind.TypeParameter:
Symbols\Source\BaseClassTests.cs (11)
40Assert.Equal(SymbolKind.ErrorType, x.BaseType().Kind); 41Assert.Equal(SymbolKind.ErrorType, y.BaseType().Kind); 60Assert.Equal(SymbolKind.ErrorType, x.BaseType().Kind); 61Assert.Equal(SymbolKind.ErrorType, y.BaseType().Kind); 186Assert.Equal(SymbolKind.ErrorType, a.Interfaces()[0].Kind); 1321Assert.NotEqual(SymbolKind.ErrorType, d.BaseType().Kind); 1340Assert.Equal(SymbolKind.ArrayType, garg.Kind); 1392Assert.Equal(SymbolKind.ErrorType, a2.BaseType().Kind); 1395Assert.Equal(SymbolKind.ErrorType, b2.BaseType().Kind); 1415Assert.Equal(SymbolKind.ErrorType, abase.Kind); 1417Assert.Equal(SymbolKind.ErrorType, bbase.Kind);
Symbols\Source\CustomModifierCopyTests.cs (4)
698var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); 731var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); 772var classIndexer = (PropertySymbol)@class.GetMembers().Where(s => s.Kind == SymbolKind.Property).Single(); 2126if (s.Kind != SymbolKind.Property)
Symbols\Source\DeclaringSyntaxNodeTests.cs (28)
93if (symbol.Kind == SymbolKind.Namespace && ((INamespaceSymbol)symbol).IsGlobalNamespace) 134private void CheckDeclaringSyntax<TNode>(CSharpCompilation comp, SyntaxTree tree, string name, SymbolKind kind) 356if (member.Kind == SymbolKind.Property) 523if (memb.Kind == SymbolKind.Method && ((IMethodSymbol)memb).MethodKind == MethodKind.Constructor) 577if (memb.Kind == SymbolKind.Method) 604CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc1", SymbolKind.Local); 605CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc2", SymbolKind.Local); 606CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc3", SymbolKind.Local); 607CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc4", SymbolKind.Local); 608CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc5", SymbolKind.Local); 609CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc6", SymbolKind.Local); 610CheckDeclaringSyntax<VariableDeclaratorSyntax>(comp, tree, "loc7", SymbolKind.Local); 611CheckDeclaringSyntax<ForEachStatementSyntax>(comp, tree, "loc8", SymbolKind.Local); 639CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab1", SymbolKind.Label); 640CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab2", SymbolKind.Label); 641CheckDeclaringSyntax<LabeledStatementSyntax>(comp, tree, "lab3", SymbolKind.Label); 642CheckDeclaringSyntax<SwitchLabelSyntax>(comp, tree, "case 4:", SymbolKind.Label); 643CheckDeclaringSyntax<SwitchLabelSyntax>(comp, tree, "case 3:", SymbolKind.Label); 644CheckDeclaringSyntax<SwitchLabelSyntax>(comp, tree, "default", SymbolKind.Label); 664CheckDeclaringSyntax<UsingDirectiveSyntax>(comp, tree, "ConsoleAlias", SymbolKind.Alias); 665CheckDeclaringSyntax<UsingDirectiveSyntax>(comp, tree, "ListOfIntAlias", SymbolKind.Alias); 666CheckDeclaringSyntax<UsingDirectiveSyntax>(comp, tree, "GooAlias", SymbolKind.Alias); 690CheckDeclaringSyntax<QueryClauseSyntax>(comp, tree, "range1", SymbolKind.RangeVariable); 691CheckDeclaringSyntax<QueryClauseSyntax>(comp, tree, "range2", SymbolKind.RangeVariable); 692CheckDeclaringSyntax<QueryContinuationSyntax>(comp, tree, "range3", SymbolKind.RangeVariable); 693CheckDeclaringSyntax<QueryClauseSyntax>(comp, tree, "range4", SymbolKind.RangeVariable); 694CheckDeclaringSyntax<QueryClauseSyntax>(comp, tree, "range5", SymbolKind.RangeVariable); 695CheckDeclaringSyntax<JoinIntoClauseSyntax>(comp, tree, "range6", SymbolKind.RangeVariable);
Symbols\Source\DelegateTests.cs (2)
129Assert.Equal(SymbolKind.NamedType, v.Kind); 207Assert.Equal(SymbolKind.NamedType, d.Kind);
Symbols\Source\EventTests.cs (6)
83Assert.Equal(SymbolKind.Event, @event.Kind); 101Assert.Equal(SymbolKind.Field, associatedField.Kind); 122Assert.Equal(SymbolKind.Event, @event.Kind); 139Assert.Equal(SymbolKind.Field, associatedField.Kind); 160Assert.Equal(SymbolKind.Event, @event.Kind); 195Assert.Equal(SymbolKind.Event, @event.Kind);
Symbols\Source\ExternAliasTests.cs (1)
365Assert.Equal(SymbolKind.Alias, alias1.Kind);
Symbols\Source\FieldTests.cs (1)
68Assert.Equal(SymbolKind.Field, sym.Kind);
Symbols\Source\MethodTests.cs (7)
41Assert.Equal(SymbolKind.NamedType, x.Type.Kind); 43Assert.Equal(SymbolKind.Parameter, x.Kind); 123Assert.Equal(SymbolKind.NamedType, x.Type.Kind); 125Assert.Equal(SymbolKind.Parameter, x.Kind); 147Assert.Equal(SymbolKind.NamedType, x.Type.Kind); 149Assert.Equal(SymbolKind.Parameter, x.Kind); 448Assert.Equal(SymbolKind.Method, method.Kind);
Symbols\Source\PropertyTests.cs (2)
401if (m.Kind == SymbolKind.Field) 420if (m.Kind == SymbolKind.Field)
Symbols\Source\SourcePlusMetadataTests.cs (8)
29Assert.Equal(SymbolKind.NamedType, x.BaseType().Kind); 31Assert.Equal(SymbolKind.NamedType, y.BaseType().Kind); 46Assert.Equal(SymbolKind.NamedType, x.BaseType().Kind); 64Assert.Equal(SymbolKind.NamedType, y.BaseType().Kind); 66Assert.Equal(SymbolKind.NamedType, z.BaseType().Kind); 84Assert.Equal(SymbolKind.NamedType, a.BaseType().Kind); 255Assert.Equal(SymbolKind.NamedType, key.Kind); 256Assert.Equal(SymbolKind.NamedType, nam.Kind);
Symbols\Source\UsingAliasTests.cs (12)
52Assert.Equal(SymbolKind.Alias, alias1.Kind); 112Assert.Equal(SymbolKind.Alias, alias1.Kind); 169Assert.Equal(SymbolKind.Alias, alias1.Kind); 227Assert.Equal(SymbolKind.Alias, alias1.Kind); 488Assert.Equal(SymbolKind.Alias, symbols[0].Kind); 509Assert.Equal(SymbolKind.Alias, symbols[0].Kind); 546Assert.Equal(SymbolKind.Alias, model.GetAliasInfo(exprSyntaxToBind).Kind); 566Assert.Equal(SymbolKind.Alias, model.GetAliasInfo(exprSyntaxToBind).Kind); 585Assert.Equal(SymbolKind.Alias, model.GetAliasInfo(exprSyntaxToBind).Kind); 605Assert.Equal(SymbolKind.Alias, model.GetAliasInfo(exprSyntaxToBind).Kind); 705Assert.Equal(SymbolKind.ErrorType, alias.Target.Kind); 748Assert.Equal(SymbolKind.ErrorType, alias.Target.Kind);
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
22701if (m01.Kind == SymbolKind.Field)
Symbols\SymbolErrorTests.cs (3)
16894Assert.Equal(SymbolKind.ErrorType, fieldType.Type.Kind); 16921Assert.Equal(SymbolKind.ErrorType, fieldType.Kind); 16958Assert.Equal(SymbolKind.ErrorType, fieldType.Kind);
Symbols\TypeTests.cs (24)
470Assert.Equal(SymbolKind.Field, field1.Kind); 485Assert.Equal(SymbolKind.Field, field1.Kind); 495Assert.Equal(SymbolKind.Method, method.Kind); 544Assert.Equal(SymbolKind.ArrayType, sym1.Kind); 573Assert.Equal(SymbolKind.ArrayType, sym2.Kind); 592Assert.Equal(SymbolKind.ArrayType, sym1.Kind); 598Assert.Equal(SymbolKind.ArrayType, sym2.Kind); 604Assert.Equal(SymbolKind.ArrayType, sym3.Kind); 631Assert.Equal(SymbolKind.Field, m.Kind); 641Assert.Equal(SymbolKind.Field, obj.Kind); 645Assert.NotEqual(SymbolKind.ErrorType, objType.Kind); 649Assert.Equal(SymbolKind.Field, dyn.Kind); 653Assert.NotEqual(SymbolKind.ErrorType, dynType.Kind); 683Assert.Equal(SymbolKind.Field, symbol.Kind); 855Assert.Equal(SymbolKind.NamedType, igoo.Kind); 868Assert.Equal(SymbolKind.NamedType, classA.Kind); 880Assert.Equal(SymbolKind.NamedType, structS.Kind); 907Assert.Equal(SymbolKind.Field, varA.Kind); 909Assert.Equal(SymbolKind.NamedType, varA.Type.Kind); 1243Assert.Equal(SymbolKind.ErrorType, typeAb.Kind); 1250Assert.Equal(SymbolKind.ErrorType, typeBi.Kind); 1257Assert.Equal(SymbolKind.ErrorType, typeCi.Kind); 1264Assert.Equal(SymbolKind.ErrorType, typeDi.TypeArguments()[2].Kind); 1480Assert.Equal(SymbolKind.Field, varX.Kind);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\FieldAndValueKeywordTests.cs (1)
1283var actualFields = comp.GetMember<NamedTypeSymbol>("Derived").GetMembers().Where(m => m.Kind == SymbolKind.Field).ToTestDisplayStrings();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (28)
CompilationTestUtils.cs (1)
222get { return this.MemberGroup.WhereAsArray(s => s.Kind == SymbolKind.Method).SelectAsArray(s => (IMethodSymbol)s); }
CSharpTrackingDiagnosticAnalyzer.cs (1)
22protected override bool IsOnCodeBlockSupported(SymbolKind symbolKind, MethodKind methodKind, bool returnsVoid)
EmitMetadataTestBase.cs (7)
74var fields = t.GetMembers().Where(m => m.Kind == SymbolKind.Field).OrderBy(f => f.Name).Cast<FieldSymbol>(); 112SymbolKind actualParentKind; 135private static void GetAttributeParentNameAndKind(MetadataReader metadataReader, EntityHandle token, out string name, out SymbolKind kind) 141kind = SymbolKind.Assembly; 146kind = SymbolKind.NamedType; 151kind = SymbolKind.Method; 162public SymbolKind ParentKind;
Extensions.cs (15)
444if (typeSym.Kind == SymbolKind.NamedType && 723return type.Kind == SymbolKind.ErrorType; 755case SymbolKind.Method: 757case SymbolKind.Property: 759case SymbolKind.Event: 814case SymbolKind.Field: 816case SymbolKind.Method: 818case SymbolKind.Property: 820case SymbolKind.Event: 822case SymbolKind.Local: 824case SymbolKind.Parameter: 826case SymbolKind.ErrorType: 848case SymbolKind.NamedType: 851case SymbolKind.Method: 863if (sym.Kind == SymbolKind.Namespace)
FunctionPointerUtilities.cs (1)
28Assert.Equal(SymbolKind.FunctionPointerType, symbol.Kind);
NullableAttributesVisitor.cs (2)
103case SymbolKind.Parameter: 104case SymbolKind.TypeParameter:
TestAttributesVisitor.cs (1)
100return containingSymbol?.Kind == SymbolKind.Namespace ? null : containingSymbol;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (6)
Metadata\WinMdDumpTest.cs (6)
58case SymbolKind.NamedType: 87case SymbolKind.Namespace: 95case SymbolKind.Method: 107case SymbolKind.Field: 123case SymbolKind.Property: 165case SymbolKind.Event:
Microsoft.CodeAnalysis.CSharp.Workspaces (74)
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
49if (symbolInfo.Symbol?.Kind == SymbolKind.Discard)
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (1)
55else if (symbolInfo.Symbol?.Kind == SymbolKind.Namespace)
Recommendations\CSharpRecommendationServiceRunner.cs (10)
622if (leftHandBinding.GetBestOrAllSymbols().FirstOrDefault().MatchesKind(SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Alias)) 719symbol.Kind is SymbolKind.NamedType or SymbolKind.Namespace or SymbolKind.Alias) 725if (symbol.Kind is SymbolKind.Method && 741if (symbol.Kind is SymbolKind.NamedType or SymbolKind.Namespace or SymbolKind.TypeParameter)
Rename\CSharpRenameRewriterLanguageService.cs (18)
548if (symbol != null && _renamedSymbol.Kind != SymbolKind.Local && _renamedSymbol.Kind != SymbolKind.RangeVariable && 766.Where(s => s.MatchesKind(SymbolKind.Local, SymbolKind.Parameter) && s.Name == token.ValueText); 775(matchingLocal.IsKind(SymbolKind.Local) && ((ILocalSymbol)matchingLocal).Type.IsDelegateType()) || 776(matchingLocal.IsKind(SymbolKind.Parameter) && ((IParameterSymbol)matchingLocal).Type.IsDelegateType()); 813if (renamedSymbol.Kind is SymbolKind.Parameter or 814SymbolKind.Local or 815SymbolKind.RangeVariable) 839else if (renamedSymbol.Kind == SymbolKind.Label) 848else if (renamedSymbol.Kind == SymbolKind.Method) 866else if (renamedSymbol.Kind == SymbolKind.Alias) 898else if (renamedSymbol.Kind == SymbolKind.TypeParameter) 987var implicitReferencesMightConflict = renameSymbol.Kind == SymbolKind.Property && 992(renameSymbol.Kind == SymbolKind.Method && 1057if (symbol.Kind == SymbolKind.Method) 1079else if (symbol.Kind == SymbolKind.Property && symbol.Name == "Current") 1108if (symbol.Kind == SymbolKind.Property)
Simplification\CSharpSimplificationService.Expander.cs (7)
561symbol.Kind == SymbolKind.Method && 649if (symbol.Kind is SymbolKind.NamedType or 650SymbolKind.Namespace) 667if (symbol.Kind is SymbolKind.Method or 668SymbolKind.Field or 669SymbolKind.Property) 743if (newNode.Kind() == SyntaxKind.IdentifierName && symbol.Kind == SymbolKind.Method)
Simplification\Reducers\CSharpExtensionMethodReducer.cs (2)
57if (targetSymbol.Symbol != null && targetSymbol.Symbol.Kind == SymbolKind.Method) 122if (newSymbol.Kind == SymbolKind.Method && oldSymbol.Equals(((IMethodSymbol)newSymbol).GetConstructedReducedFrom()))
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (2)
145(symbol.Kind != SymbolKind.Namespace && symbol.Kind != SymbolKind.NamedType))
Simplification\Simplifiers\ExpressionSimplifier.cs (2)
376if (type?.Kind == SymbolKind.DynamicType) 420if (rightSymbol != null && (rightSymbol.IsStatic || rightSymbol.Kind == SymbolKind.NamedType))
Simplification\Simplifiers\NameSimplifier.cs (2)
85if (symbol.Kind == SymbolKind.Method && name.Kind() == SyntaxKind.GenericName) 272if (!name.IsVar && symbol.Kind == SymbolKind.NamedType && !name.IsLeftSideOfQualifiedName())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (7)
441case SymbolKind.Field: 442case SymbolKind.Local: 443case SymbolKind.Method: 444case SymbolKind.Parameter: 445case SymbolKind.Property: 446case SymbolKind.RangeVariable: 447case SymbolKind.FunctionPointerType:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
172if (symbolInfo.Symbol != null && symbolInfo.Symbol.Kind == SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1069return typeInfo.Type?.Kind == SymbolKind.ArrayType; 1077if (symbol?.Kind == SymbolKind.Field)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (2)
101if (conflict?.IsKind(SymbolKind.NamedType) == true) 305if (semanticModel.GetSymbolInfo(n, cancellationToken).Symbol.IsKind(SymbolKind.Local) == true)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
81var members = GetMembers(namedType).Where(s => s.Kind != SymbolKind.Property || PropertyGenerator.CanBeGenerated((IPropertySymbol)s))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Editing\CSharpImportAdder.cs (2)
56if (symbol != null && symbol.Kind != SymbolKind.Namespace && model.GetSymbolInfo(namespacePart).Symbol is INamespaceSymbol) 216if (symbol?.Kind == SymbolKind.NamedType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1013if (conditionOrType.GetBestOrAllSymbols().FirstOrDefault() is { Kind: SymbolKind.NamedType }) 3045case SymbolKind.NamedType: 3047case SymbolKind.Alias:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
114if (targetType.Kind == SymbolKind.DynamicType)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
47var typeSymbol = firstSymbol != null && firstSymbol.Kind == SymbolKind.Alias
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (2)
50visibleSymbols = visibleSymbols.WhereAsArray(s => !s.MatchesKind(SymbolKind.Local, SymbolKind.Parameter));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
619if (method.TypeArguments.Any(static t => t.Kind == SymbolKind.ErrorType)) 660if (returnType.Kind == SymbolKind.TypeParameter) 662if (inferredType.Kind != SymbolKind.TypeParameter) 681case SymbolKind.ArrayType: 684case SymbolKind.PointerType: 687case SymbolKind.NamedType: 1810SemanticModel.GetSymbolInfo(identifierName.Identifier).Symbol?.Kind == SymbolKind.Parameter)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SymbolEditorTests.cs (2)
1034var property = typeC.GetMembers().First(m => m.Kind == SymbolKind.Property); 1044var iproperty = typeI.GetMembers().First(m => m.Kind == SymbolKind.Property);
Microsoft.CodeAnalysis.EditorFeatures (2)
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
156if (RenameSymbol.Kind == SymbolKind.NamedType &&
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
236if (sourceSymbol.Kind == SymbolKind.Field &&
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeFixes\CodeFixServiceTests.cs (1)
1196}, SymbolKind.NamedType);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
1048}, SymbolKind.NamedType);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (6)
Peek\PeekHelpers.cs (6)
57case SymbolKind.Event: 58case SymbolKind.Field: 59case SymbolKind.Method: 60case SymbolKind.Property: 64case SymbolKind.NamedType: 65case SymbolKind.Namespace:
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (18)
CodeFixes\CodeFixServiceTests.vb (1)
201context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
77context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType)
Diagnostics\DiagnosticServiceTests.vb (12)
1257context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.Method) 1463End Sub, SymbolKind.NamedType) 1544context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType) 1569context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType) 1604End Sub, SymbolKind.NamedType) 1621context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType) 1645Private Shared ReadOnly Property SymbolKindsOfInterest As SymbolKind() 1745context.RegisterSymbolAction(Sub(s) Return, SymbolKind.NamedType) 1777context.RegisterSymbolAction(AddressOf compilationAnalyzer.AnalyzeSymbol, SymbolKind.NamedType) 1888End Sub, SymbolKind.Method) 2458Assert.Equal(SymbolKind.Method, analyzedMethod.Kind) 2522context.RegisterSymbolAction(Sub(symbolContext) AnalyzedMethodSymbols.Add(symbolContext.Symbol), SymbolKind.Method)
FindReferences\FindReferencesTests.LinkedFiles.vb (3)
73references = references.Where(Function(r) r.Definition.IsKind(SymbolKind.NamedType)) 115references = references.Where(Function(r) r.Definition.IsKind(SymbolKind.NamedType)) 129references = references.Where(Function(r) r.Definition.IsKind(SymbolKind.NamedType))
FindReferences\FindReferencesTests.vb (1)
461referencedSymbol.Definition.Kind = SymbolKind.Namespace
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (5)
DkmUtilities.cs (4)
283else if (symbol.Kind == SymbolKind.Field && ((IFieldSymbolInternal)symbol).IsVolatile) 295private static DkmEvaluationResultCategory GetResultCategory(SymbolKind kind) 299case SymbolKind.Method: 301case SymbolKind.Property:
PDB\MethodDebugInfo.Native.cs (1)
656if (type.Kind == SymbolKind.ErrorType)
Microsoft.CodeAnalysis.Features (253)
AddImport\SymbolReferenceFinder.cs (2)
299if (symbol?.Kind is SymbolKind.Property or SymbolKind.Field)
ChangeSignature\AbstractChangeSignatureService.cs (8)
146if (!symbol.MatchesKind(SymbolKind.Method, SymbolKind.Property)) 277if (symbol.Definition.Kind == SymbolKind.NamedType) 293if (symbol.Definition.Kind == SymbolKind.Field) 945.Where(s => s.IsKind(SymbolKind.Local) || s.IsKind(SymbolKind.Parameter)) 950.Where(s => s.IsKind(SymbolKind.Property) || s.IsKind(SymbolKind.Field));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (8)
229if (suppressionTargetInfo.TargetMemberNode != null && suppressionTargetInfo.TargetSymbol.Kind != SymbolKind.Namespace) 356protected static string GetScopeString(SymbolKind targetSymbolKind) 360case SymbolKind.Event: 361case SymbolKind.Field: 362case SymbolKind.Method: 363case SymbolKind.Property: 366case SymbolKind.NamedType: 369case SymbolKind.Namespace:
CodeLens\CodeLensFindReferenceProgress.cs (1)
123var isConstructorInvocation = _queriedSymbol.Kind == SymbolKind.NamedType &&
CodeLens\CodeLensReferencesService.cs (1)
225if (current.Kind != SymbolKind.Method)
Completion\CommonCompletionUtilities.cs (3)
126case SymbolKind.Method: 127case SymbolKind.Property: 128case SymbolKind.NamedType:
Completion\Providers\AbstractContextVariableArgumentProvider.cs (4)
41if (symbol.IsKind(SymbolKind.Parameter, out IParameterSymbol? parameter)) 43else if (symbol.IsKind(SymbolKind.Local, out ILocalSymbol? local)) 61if (symbol.IsKind(SymbolKind.Field, out IFieldSymbol? field)) 63else if (symbol.IsKind(SymbolKind.Property, out IPropertySymbol? property))
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (3)
149if (generatedMember.Kind == SymbolKind.Method) 153else if (generatedMember.Kind == SymbolKind.Property) 157else if (generatedMember.Kind == SymbolKind.Event)
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (2)
112member.MatchesKind(SymbolKind.Field, SymbolKind.Property) &&
Completion\Providers\AbstractOverrideCompletionProvider.cs (3)
73SymbolKind.Event => ((IEventSymbol)symbol).Type, 74SymbolKind.Method => ((IMethodSymbol)symbol).ReturnType, 75SymbolKind.Property => ((IPropertySymbol)symbol).Type,
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (9)
107symbol.IsKind(SymbolKind.TypeParameter)) 184if (symbol.MatchesKind(SymbolKind.Local, SymbolKind.Parameter, SymbolKind.RangeVariable)) 189if (symbol.MatchesKind(SymbolKind.Field, SymbolKind.Property)) 194if (symbol.MatchesKind(SymbolKind.Event, SymbolKind.Method)) 260static bool SymbolMatches(SymbolAndSelectionInfo info, string? name, SymbolKind? kind, bool isGeneric)
Completion\Providers\AbstractSymbolCompletionProvider.cs (2)
60if (symbol.Kind == SymbolKind.NamedType) 72if (symbol.Kind == SymbolKind.Local)
Completion\Providers\SymbolCompletionItem.cs (2)
353internal static SymbolKind? GetKind(CompletionItem item) 354=> item.TryGetProperty("SymbolKind", out var kind) ? (SymbolKind?)int.Parse(kind) : null;
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
295var parameterNamingRule = await document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false);
Debugging\AbstractBreakpointResolver.cs (6)
232SymbolKind.Method => ((IMethodSymbol)symbol).PartialImplementationPart, 233SymbolKind.Property => ((IPropertySymbol)symbol).PartialImplementationPart, 243var kind = methodOrProperty.Kind; 244if (kind is not (SymbolKind.Method or SymbolKind.Property)) 271if (methodOrProperty.IsKind(SymbolKind.Method))
DocumentHighlighting\AbstractDocumentHighlightsService.cs (4)
141case SymbolKind.Method: 215if (symbol.Kind == SymbolKind.Alias && 279case SymbolKind.Namespace: 282case SymbolKind.NamedType:
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (13)
322SymbolKind.Event => GetDisplayName((IEventSymbol)symbol), 323SymbolKind.Field => GetDisplayName((IFieldSymbol)symbol), 324SymbolKind.Method => GetDisplayName((IMethodSymbol)symbol), 325SymbolKind.NamedType => GetDisplayName((INamedTypeSymbol)symbol), 326SymbolKind.Parameter => FeaturesResources.parameter, 327SymbolKind.Local => FeaturesResources.local_variable, 328SymbolKind.Property => GetDisplayName((IPropertySymbol)symbol), 329SymbolKind.TypeParameter => FeaturesResources.type_parameter, 2439case SymbolKind.Field: 2442case SymbolKind.Event: 2445case SymbolKind.Property: 2451case SymbolKind.Method: 2458case SymbolKind.NamedType when oldMember is INamedTypeSymbol { DelegateInvokeMethod: { } oldInvokeMethod }:
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (5)
199=> symbol.Kind == SymbolKind.NamedType; 203return symbol.Kind is SymbolKind.Event or 204SymbolKind.Field or 205SymbolKind.Method or 206SymbolKind.Property;
ExtractInterface\AbstractExtractInterfaceService.cs (6)
96if (type == null || type.Kind != SymbolKind.NamedType) 378case SymbolKind.Event: 388case SymbolKind.Method: 402case SymbolKind.Property: 444if (m.Kind == SymbolKind.Event || m.IsOrdinaryMethod()) 449if (m.Kind == SymbolKind.Property)
ExtractMethod\MethodExtractor.Analyzer.cs (2)
795foreach (var pair in symbolMap.Where(p => p.Key.Kind == SymbolKind.TypeParameter)) 919foreach (var pair in symbolMap.Where(p => p.Key.Kind == SymbolKind.Field))
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
46if (symbol is { Kind: not SymbolKind.Namespace })
FindUsages\FindUsagesHelpers.cs (1)
54return definition.Kind == SymbolKind.Parameter
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
107var parameterNamingRule = rules.Where(rule => rule.SymbolSpecification.AppliesTo(SymbolKind.Parameter, Accessibility.NotApplicable)).First();
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
609var fieldNamingRule = await _semanticDocument.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, _cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.State.cs (1)
302!symbol.IsKind(SymbolKind.NamedType) ||
GoToBase\FindBaseHelpers.cs (3)
27if (symbol.Kind is SymbolKind.Property or SymbolKind.Method or SymbolKind.Event)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (3)
251var resource = fieldOrProperty.Kind == SymbolKind.Field 286if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private)) 322if (rule.SymbolSpecification.AppliesTo(SymbolKind.Property, Accessibility.Public))
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (3)
577if (declaredSymbol.IsKind(SymbolKind.Property) 578|| declaredSymbol.IsKind(SymbolKind.Method) 579|| declaredSymbol.IsKind(SymbolKind.Event))
LanguageServiceIndexFormat\SymbolMoniker.cs (7)
23if (symbol.Kind is SymbolKind.Local or 24SymbolKind.RangeVariable or 25SymbolKind.Label or 26SymbolKind.Alias) 38if (symbol.Kind != SymbolKind.Namespace && symbol.ContainingAssembly == null) 53if (symbol.Kind == SymbolKind.Namespace) 60if (symbol.Kind == SymbolKind.Parameter)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
61public SymbolKind Kind => _symbol.Kind;
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (10)
34where m.Kind is SymbolKind.Event or 35SymbolKind.Field or 36SymbolKind.Method or 37SymbolKind.NamedType or 38SymbolKind.Property 47SymbolKind.Field => new WrappedFieldSymbol((IFieldSymbol)m, docCommentFormattingService), 48SymbolKind.Event => new WrappedEventSymbol((IEventSymbol)m, canImplementImplicitly, docCommentFormattingService), 49SymbolKind.Method => new WrappedMethodSymbol((IMethodSymbol)m, canImplementImplicitly, docCommentFormattingService), 50SymbolKind.NamedType => new WrappedNamedTypeSymbol((INamedTypeSymbol)m, canImplementImplicitly, docCommentFormattingService), 51SymbolKind.Property => new WrappedPropertySymbol((IPropertySymbol)m, canImplementImplicitly, docCommentFormattingService),
MetadataAsSource\MetadataAsSourceFileService.cs (7)
83if (symbol.Kind == SymbolKind.Namespace) 288case SymbolKind.Event: 289case SymbolKind.Field: 290case SymbolKind.Method: 291case SymbolKind.NamedType: 292case SymbolKind.Property: 293case SymbolKind.Parameter:
MetadataAsSource\MetadataAsSourceHelpers.cs (1)
59topLevelNamedType.Kind != SymbolKind.NamedType)
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
82var allDestinations = selectedMembers.All(m => m.IsKind(SymbolKind.Field))
PullMemberUp\MemberAndDestinationValidator.cs (3)
47_ => member.IsKind(SymbolKind.Property) || member.IsKind(SymbolKind.Event) || member.IsKind(SymbolKind.Field),
PullMemberUp\MembersPuller.cs (1)
287if (memberResult.MakeMemberDeclarationAbstract && !memberResult.Member.IsKind(SymbolKind.Field))
QuickInfo\CommonSemanticQuickInfoProvider.cs (2)
172s1.Kind == SymbolKind.NamedType ? -1 : 173s2.Kind == SymbolKind.NamedType ? 1 : 0)];
Rename\SymbolicRenameInfo.cs (7)
166if (symbol.Kind == SymbolKind.Alias && symbol.IsExtern) 170if (symbol.Kind == SymbolKind.NamedType && 187symbol.Kind != SymbolKind.Local && 188!(symbol.Kind == SymbolKind.Parameter && 189symbol.ContainingSymbol.Kind == SymbolKind.Method && 200if (symbol.Kind == SymbolKind.Property && symbol.ContainingType.IsAnonymousType) 206if (symbol.Kind == SymbolKind.Method && ((IMethodSymbol)symbol).MethodKind == MethodKind.UserDefinedOperator)
Shared\Extensions\ISymbolExtensions_2.cs (21)
22case SymbolKind.Alias: 25case SymbolKind.Assembly: 28case SymbolKind.ArrayType: 31case SymbolKind.DynamicType: 34case SymbolKind.Event: 38case SymbolKind.Field: 48case SymbolKind.Label: 51case SymbolKind.Local: 52case SymbolKind.Discard: 55case SymbolKind.NamedType: 56case SymbolKind.ErrorType: 94case SymbolKind.Method: 117case SymbolKind.Namespace: 120case SymbolKind.NetModule: 123case SymbolKind.Parameter: 128case SymbolKind.PointerType: 131case SymbolKind.FunctionPointerType: 134case SymbolKind.Property: 150case SymbolKind.Preprocessing: 153case SymbolKind.RangeVariable: 156case SymbolKind.TypeParameter:
Shared\Extensions\ISymbolExtensions_Sorting.cs (12)
165if (s1.Kind == SymbolKind.NamedType || s2.Kind == SymbolKind.NamedType) 169: s1.Kind == SymbolKind.NamedType ? -1 : 1; 172if (s1.Kind == SymbolKind.Method || s2.Kind == SymbolKind.Method) 176: s1.Kind == SymbolKind.Method ? -1 : 1; 179if (s1.Kind == SymbolKind.Property || s2.Kind == SymbolKind.Property) 183: s1.Kind == SymbolKind.Property ? -1 : 1; 186if (s1.Kind == SymbolKind.Event || s2.Kind == SymbolKind.Event) 190: s1.Kind == SymbolKind.Event ? -1 : 1;
Shared\Utilities\ExtractTypeHelpers.cs (5)
202case SymbolKind.Event: 205case SymbolKind.Method: 210case SymbolKind.Property: 214case SymbolKind.Field: 238type.Kind != SymbolKind.TypeParameter &&
Snippets\SnippetFunctionService.cs (1)
64var enumFields = typeSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.IsStatic);
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
62context.RegisterSymbolAction(AnalyzeFieldSymbol, SymbolKind.Field); 85}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
36private static readonly ImmutableArray<SymbolKind> _symbolKinds = [SymbolKind.Event, SymbolKind.Method, SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Property];
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (5)
767case SymbolKind.NamedType: 768case SymbolKind.Method: 769case SymbolKind.Field: 770case SymbolKind.Property: 771case SymbolKind.Event:
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (11)
193compilationStartContext.RegisterSymbolAction(AnalyzeSymbolDeclaration, SymbolKind.Method, SymbolKind.Field, SymbolKind.Property, SymbolKind.Event); 225}, SymbolKind.NamedType); 432case SymbolKind.Method: 433case SymbolKind.Property: 744case SymbolKind.Method: 845case SymbolKind.Field: 848case SymbolKind.Property: 856case SymbolKind.Event:
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
606(symbol.IsStatic && symbol.Kind == SymbolKind.Local) ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
71}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
225}, SymbolKind.NamedType);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (6)
113case SymbolKind.Namespace: 114case SymbolKind.NamedType: 115case SymbolKind.Field: 116case SymbolKind.Parameter: 117case SymbolKind.Local: 121if (symbol.Kind == SymbolKind.Property && isTopLevel)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
83if (member.Kind == SymbolKind.Field)
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
287if (symbolInfo.Symbol.Kind != SymbolKind.Method)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
549if (parameterType.Kind == SymbolKind.TypeParameter)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
135symbolInfo.CandidateSymbols.All(symbol => symbol.IsKind(SymbolKind.NamedType) &&
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
129if (symbol.Kind == SymbolKind.Property)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 82var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 83var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 365if (type.Kind == SymbolKind.ArrayType)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
195if (semanticInfo.GetAllSymbols().Any(static s => s.Kind is SymbolKind.Local or SymbolKind.Parameter) &&
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (4)
109document.Document, state, SymbolKind.Property, state.DetermineMaximalAccessibility(), cancellationToken).ConfigureAwait(false)) 125Document document, State state, SymbolKind kind, Accessibility accessibility, CancellationToken cancellationToken) 191document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 207document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (6)
145.Where(m => m.Kind != SymbolKind.Method); 316CheckSurroundingContext(SymbolKind.Field, cancellationToken); 317CheckSurroundingContext(SymbolKind.Property, cancellationToken); 323SymbolKind symbolKind, CancellationToken cancellationToken) 354if (symbolKind == SymbolKind.Field) 368SymbolKind symbolKind,
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (8)
27new SymbolKindOrTypeKind(SymbolKind.Field), 28new SymbolKindOrTypeKind(SymbolKind.Local), 29new SymbolKindOrTypeKind(SymbolKind.Parameter), 30new SymbolKindOrTypeKind(SymbolKind.RangeVariable), 38[new SymbolKindOrTypeKind(SymbolKind.Field)]), 71var kinds = ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field), new SymbolKindOrTypeKind(SymbolKind.Parameter), new SymbolKindOrTypeKind(SymbolKind.Local));
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (1)
18this Document document, SymbolKind symbolKind, Accessibility accessibility, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
69if (symbol.Kind == SymbolKind.Field)
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (10)
119candidateMembers.Where(s => s.Kind == SymbolKind.NamedType).ToImmutableArray() : 120candidateMembers.Where(s => s.Kind != SymbolKind.NamedType).ToImmutableArray(); 171if (containingSymbol.Kind == SymbolKind.NamedType) 203singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Namespace); 217singleResult = candidateMembers.FirstOrDefault(s => s.Kind == SymbolKind.Event); 222s.Kind is not SymbolKind.Namespace and 223not SymbolKind.NamedType); 824s.Kind == SymbolKind.NamedType && 832s.Kind is SymbolKind.Namespace or 833SymbolKind.NamedType);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\References\FindUsagesLSPContext.cs (1)
255if (symbol == null || symbol.Locations.IsEmpty || symbol.Kind == SymbolKind.Namespace)
Microsoft.CodeAnalysis.Test.Utilities (81)
Compilation\CompilationDifference.cs (1)
169var actual = EmitResult.Baseline.SynthesizedMembers.Single(e => e.Key.ToString() == typeName).Value.Where(s => s.Kind == SymbolKind.Field).Select(s => (IFieldSymbol)s.GetISymbol()).Select(f => f.Name + ": " + f.Type);
Compilation\CompilationExtensions.cs (6)
235if (declaration.DeclaredSymbol.Kind == SymbolKind.Method && compilation.Language == LanguageNames.VisualBasic) 257case SymbolKind.Field: 258case SymbolKind.Event: 259case SymbolKind.Method: 260case SymbolKind.NamedType: 261case SymbolKind.Property:
Compilation\ControlFlowGraphVerifier.cs (1)
1686Assert.True(false, $"{(symbol.Kind == SymbolKind.Local ? "Local" : "Method")} without owning region {symbol.ToTestDisplayString()} in [{getBlockId(block)}]\n{finalGraph()}");
CompilationVerifier.cs (1)
747.Where(s => s.Kind == SymbolKind.Field)
Diagnostics\CommonDiagnosticAnalyzers.cs (32)
767}, SymbolKind.NamedType); 789context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Namespace); 964cc.RegisterSymbolAction(c => ReportDiagnostic(c.ReportDiagnostic, ActionKind.Symbol), SymbolKind.NamedType); 1004}, SymbolKind.NamedType); 1044}, SymbolKind.NamedType); 1179}, SymbolKind.NamedType); 1211}, SymbolKind.NamedType); 1538}, SymbolKind.NamedType); 1573if (context.OwningSymbol.Kind != SymbolKind.Method || 1591if (context.OwningSymbol.Kind != SymbolKind.Method || 1602}, SymbolKind.NamedType); 1606if (context.OwningSymbol.Kind != SymbolKind.Method) 1619if (context.OwningSymbol.Kind != SymbolKind.Method) 1700compilationStartContext.RegisterSymbolAction(symbolContext => namedTypes.Add(symbolContext.Symbol), SymbolKind.NamedType); 1816}, SymbolKind.NamedType); 1859context.RegisterSymbolAction(SymbolAction, SymbolKind.Parameter); 1871private readonly SymbolKind _symbolKind; 1876public SymbolStartAnalyzer(bool topLevelAction, SymbolKind symbolKind, OperationKind? operationKindOpt = null, int? analyzerId = null) 2430}, SymbolKind.NamedType); 2441}, SymbolKind.NamedType); 2451}, SymbolKind.NamedType); 2545SymbolKind.NamedType); 2611SymbolKind.Field); 2751SymbolKind.NamedType, SymbolKind.Method); 2767}, SymbolKind.NamedType); 2940context.RegisterSymbolAction(context => HandleCallback(context.Symbol.Locations[0], context.Compilation, context.ReportDiagnostic, context.CancellationToken), SymbolKind.NamedType); 3016context.RegisterSymbolAction(symbolContext => AnalyzedSymbols.Add(symbolContext.Symbol), SymbolKind.NamedType, SymbolKind.Method); 3036}, SymbolKind.NamedType); 3131}, SymbolKind.NamedType); 3148}, SymbolKind.NamedType);
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
97SymbolKind.Field
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (8)
72SymbolKind.Event, 73SymbolKind.Field, 74SymbolKind.Method, 75SymbolKind.NamedType, 76SymbolKind.Namespace, 77SymbolKind.Property); 102SymbolKind.NamedType); 286SymbolKind.NamedType);
Diagnostics\TestDiagnosticAnalyzer.cs (2)
17protected static readonly ImmutableArray<SymbolKind> AllSymbolKinds = GetAllEnumValues<SymbolKind>();
Diagnostics\TrackingDiagnosticAnalyzer.cs (29)
30public readonly SymbolKind? SymbolKind; 39SymbolKind = symbol == null ? (SymbolKind?)null : symbol.Kind; 84SymbolKind.Event, SymbolKind.Field, SymbolKind.Method, SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Parameter, SymbolKind.Property 107protected virtual bool IsOnCodeBlockSupported(SymbolKind symbolKind, MethodKind methodKind, bool returnsVoid) 112public void VerifyOnCodeBlockCalledForAllSymbolAndMethodKinds(HashSet<SymbolKind> symbolKindsWithNoCodeBlocks = null, bool allowUnexpectedCalls = false) 117new { SymbolKind = SymbolKind.Event, MethodKind = InvalidMethodKind, ReturnsVoid = false }, 118new { SymbolKind = SymbolKind.Field, MethodKind = InvalidMethodKind, ReturnsVoid = false }, 119new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Constructor, ReturnsVoid = true }, 120new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Conversion, ReturnsVoid = false }, 121new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Destructor, ReturnsVoid = true }, // C# only 122new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventAdd, ReturnsVoid = true }, 123new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventRemove, ReturnsVoid = true }, 124new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.EventRaise, ReturnsVoid = true }, // VB only 125new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.ExplicitInterfaceImplementation, ReturnsVoid = true }, // C# only 126new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Ordinary, ReturnsVoid = false }, 127new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.Ordinary, ReturnsVoid = true }, 128new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertyGet, ReturnsVoid = false }, 129new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.PropertySet, ReturnsVoid = true }, 130new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.StaticConstructor, ReturnsVoid = true }, 131new { SymbolKind = SymbolKind.Method, MethodKind = MethodKind.UserDefinedOperator, ReturnsVoid = false }, 132new { SymbolKind = SymbolKind.Property, MethodKind = InvalidMethodKind, ReturnsVoid = false }, 133new { SymbolKind = SymbolKind.NamedType, MethodKind = InvalidMethodKind, ReturnsVoid = false }, 134new { SymbolKind = SymbolKind.Namespace, MethodKind = InvalidMethodKind, ReturnsVoid = false }
Microsoft.CodeAnalysis.UnitTests (3)
CorLibTypesTests.cs (2)
82Assert.Equal(SymbolKind.ErrorType, symbol.Kind); 86Assert.NotEqual(SymbolKind.ErrorType, symbol.Kind);
Diagnostics\AnalysisContextInfoTests.cs (1)
79c.RegisterSymbolAction(b => ThrowIfMatch(nameof(c.RegisterSymbolAction), new AnalysisContextInfo(b.Compilation, b.Symbol)), SymbolKind.NamedType);
Microsoft.CodeAnalysis.VisualBasic (1135)
Analysis\FlowAnalysis\AbstractFlowPass.vb (8)
110Debug.Assert(_info.Symbol.Kind = SymbolKind.Field OrElse 111_info.Symbol.Kind = SymbolKind.Property OrElse 112_info.Symbol.Kind = SymbolKind.Method OrElse 113_info.Symbol.Kind = SymbolKind.Parameter) 239Return If(Me.symbol.Kind = SymbolKind.Method, DirectCast(Me.symbol, MethodSymbol).Parameters, ImmutableArray(Of ParameterSymbol).Empty) 253Return Me.symbol.Kind = SymbolKind.Method AndAlso DirectCast(Me.symbol, MethodSymbol).Locations.Length = 1 263Return If(Me.symbol.Kind = SymbolKind.Method, DirectCast(Me.symbol, MethodSymbol), Nothing) 273Return If(Me.symbol.Kind = SymbolKind.Method, DirectCast(Me.symbol, MethodSymbol).ReturnType, Nothing)
Analysis\FlowAnalysis\AlwaysAssignedWalker.vb (1)
47If v.Exists AndAlso v.Symbol.Kind <> SymbolKind.Field Then
Analysis\FlowAnalysis\DataFlowPass.vb (21)
275If variable IsNot Nothing AndAlso variable.Kind = SymbolKind.Local Then 357If symbol.Kind = SymbolKind.Local AndAlso DirectCast(symbol, LocalSymbol).DeclarationKind = LocalDeclarationKind.AmbiguousLocals Then 373If symbol.Kind = SymbolKind.Local AndAlso DirectCast(symbol, LocalSymbol).DeclarationKind = LocalDeclarationKind.AmbiguousLocals Then 497If symbol.Kind = SymbolKind.Local Then 724If parentSymbol.Kind = SymbolKind.Local AndAlso DirectCast(parentSymbol, LocalSymbol).IsFunctionValue Then 782If parentSymbol.Kind = SymbolKind.Local AndAlso DirectCast(parentSymbol, LocalSymbol).IsFunctionValue Then 838If eventOrProperty Is Nothing OrElse eventOrProperty.Kind <> SymbolKind.Event Then 860If member.Kind = SymbolKind.Field Then 892Case SymbolKind.Local 895Case SymbolKind.RangeVariable 898Case SymbolKind.Field 901Case SymbolKind.Parameter 1101Case SymbolKind.Parameter 1104Case SymbolKind.RangeVariable 1107Case SymbolKind.Local 1111Case SymbolKind.Field 1156If sym.Kind = SymbolKind.Parameter Then 1162If sym.Kind = SymbolKind.RangeVariable Then 1167Debug.Assert(sym.Kind = SymbolKind.Local OrElse sym.Kind = SymbolKind.Field) 1174If sym.Kind = SymbolKind.Local Then
Analysis\FlowAnalysis\DataFlowsInWalker.vb (4)
35If var.Kind <> SymbolKind.Local OrElse Not DirectCast(var, LocalSymbol).IsStatic Then 113Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 116Debug.Assert(local.Kind <> SymbolKind.RangeVariable) 118If local.Kind = SymbolKind.Field Then
Analysis\FlowAnalysis\DataFlowsOutWalker.vb (8)
46If var.Kind <> SymbolKind.Local OrElse Not DirectCast(var, LocalSymbol).IsStatic Then 72If Not Me.State.IsAssigned(slot) AndAlso variable.Kind <> SymbolKind.RangeVariable AndAlso 73(variable.Kind <> SymbolKind.Local OrElse Not DirectCast(variable, LocalSymbol).IsStatic) Then 147Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 149If Not _dataFlowsOut.Contains(local) AndAlso local.Kind <> SymbolKind.RangeVariable AndAlso Not IsInside Then 150If local.Kind = SymbolKind.Field Then 177Dim isByRefParameter As Boolean = variable.Kind = SymbolKind.Parameter AndAlso DirectCast(variable, ParameterSymbol).IsByRef 178Dim isStaticLocal As Boolean = variable.Kind = SymbolKind.Local AndAlso DirectCast(variable, LocalSymbol).IsStatic
Analysis\FlowAnalysis\DefinitelyAssignedWalker.vb (1)
76symbol.Kind <> SymbolKind.Field Then
Analysis\FlowAnalysis\ReadWriteWalker.vb (4)
102ElseIf variable.Kind <> SymbolKind.RangeVariable Then 159Case SymbolKind.Local 164Case SymbolKind.Parameter 169Case SymbolKind.RangeVariable
Analysis\FlowAnalysis\UnassignedVariablesWalker.vb (2)
42Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 44If local.Kind = SymbolKind.Field Then
Analysis\InitializerRewriter.vb (1)
88If member.Kind = SymbolKind.Method Then
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (10)
51Debug.Assert(info.Symbol.Kind = SymbolKind.Method) 69Dim type As TypeSymbol = If(variable.Kind = SymbolKind.Local, TryCast(variable, LocalSymbol).Type, TryCast(variable, ParameterSymbol).Type) 96If symbol.Kind = SymbolKind.Parameter Then 101If symbol.Kind = SymbolKind.Local Then 132Dim type As TypeSymbol = If(variable.Kind = SymbolKind.Local, TryCast(variable, LocalSymbol).Type, TryCast(variable, ParameterSymbol).Type) 163If symbol.Kind = SymbolKind.Field Then 174ElseIf symbol.Kind = SymbolKind.Parameter OrElse symbol.Kind = SymbolKind.Local Then 199Case SymbolKind.Local 203Case SymbolKind.Parameter
Binding\Binder.vb (4)
400Case SymbolKind.Method 403Case SymbolKind.NamedType 517If Not candidate.IsShared OrElse candidate.Kind <> SymbolKind.Property Then 955symbol.Kind <> SymbolKind.Property AndAlso
Binding\Binder_Attributes.vb (8)
178If symbol.Kind = SymbolKind.Namespace Then 181ElseIf symbol.Kind = SymbolKind.TypeParameter Then 184ElseIf symbol.Kind <> SymbolKind.NamedType Then 246If errorType.CandidateSymbols.Length = 1 AndAlso errorType.CandidateSymbols(0).Kind = SymbolKind.NamedType Then 460Case SymbolKind.Field 466Case SymbolKind.Property 616Case SymbolKind.Field 619Case SymbolKind.Property
Binding\Binder_Constraints.vb (4)
18Debug.Assert((containingSymbol.Kind = SymbolKind.NamedType) OrElse (containingSymbol.Kind = SymbolKind.Method)) 48Debug.Assert((containingSymbol.Kind = SymbolKind.NamedType) OrElse (containingSymbol.Kind = SymbolKind.Method))
Binding\Binder_Conversions.vb (1)
699If targetType.Kind <> SymbolKind.NamedType Then
Binding\Binder_Delegates.vb (1)
943If sym.Kind = SymbolKind.Event Then
Binding\Binder_Expressions.vb (53)
660If symbols.Count = 1 AndAlso symbols(0).Kind = SymbolKind.ErrorType Then 1907Case SymbolKind.Method 1911Case SymbolKind.Field, SymbolKind.Property 1919Case SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Parameter 2237Case SymbolKind.Method, SymbolKind.Property 2241Case SymbolKind.Field 2585Case SymbolKind.Field, SymbolKind.Method, SymbolKind.Property, SymbolKind.Event 2723Case SymbolKind.Field, SymbolKind.Property 2728Case SymbolKind.Local, SymbolKind.Parameter, SymbolKind.RangeVariable 3092((lookupResult.Symbols(0).Kind <> SymbolKind.Method AndAlso lookupResult.Symbols(0).Kind <> SymbolKind.Property) OrElse 3139Case SymbolKind.Method 3152Case SymbolKind.Property 3164Case SymbolKind.Event 3197Case SymbolKind.Field 3244Case SymbolKind.Local 3281Case SymbolKind.RangeVariable 3286Case SymbolKind.Parameter 3298Case SymbolKind.NamedType, SymbolKind.ErrorType 3339Case SymbolKind.TypeParameter 3345Case SymbolKind.Namespace 3351Case SymbolKind.Alias 3358Case SymbolKind.NamedType, SymbolKind.ErrorType 3364Case SymbolKind.Namespace 3424If candidate.Kind = SymbolKind.Namespace AndAlso 3439If candidate Is Nothing OrElse candidate.Kind = SymbolKind.ErrorType Then 3516Case SymbolKind.Method 3520Case SymbolKind.Property 3524Case SymbolKind.Field 4006Case SymbolKind.Method 4008Case SymbolKind.Field 4012Case SymbolKind.Property 4014Case SymbolKind.Parameter 4016Case SymbolKind.Local 4018Case SymbolKind.RangeVariable 4629Return ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(ContainingMember, MethodSymbol).IsAsync 4633Return ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(ContainingMember, MethodSymbol).IsIterator 4740If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Method Then 4792If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Property Then 4838If lookupResult.Kind = LookupResultKind.Good AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Method Then 4960ElseIf ContainingMember.Kind = SymbolKind.Method Then
Binding\Binder_Imports.vb (5)
86If aliasTarget.Kind <> SymbolKind.Namespace Then 118If aliasTarget.Kind <> SymbolKind.ErrorType Then 168If importedSymbol.Kind <> SymbolKind.Namespace Then 181If importedSymbol.Kind <> SymbolKind.ErrorType Then 191If importedSymbol.Kind = SymbolKind.NamedType Then
Binding\Binder_Initializers.vb (3)
142Debug.Assert(firstFieldOrProperty.Kind = SymbolKind.Field) 149ElseIf firstFieldOrProperty.Kind = SymbolKind.Field Then 233Debug.Assert(fieldSymbol.Type.Kind = SymbolKind.ArrayType)
Binding\Binder_Invocation.vb (16)
58If Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.Constructor Then 288ElseIf targetType.Kind = SymbolKind.NamedType AndAlso targetType.TypeKind = TypeKind.Delegate Then 552Dim kind As SymbolKind = result.Symbols(0).Kind 554If kind = SymbolKind.Method OrElse kind = SymbolKind.Property Then 896If methodOrProperty.Kind = SymbolKind.Method Then 1730If underlyingSymbol.Kind = SymbolKind.Method Then 2272Debug.Assert(candidate.UnderlyingSymbol.Kind = SymbolKind.Method) 2290Dim candidateIsAProperty As Boolean = (candidateSymbol.Kind = SymbolKind.Property) 2302If targetType.Kind <> SymbolKind.ArrayType Then 2304If targetType.Kind <> SymbolKind.ErrorType Then 2691Dim candidateIsAProperty As Boolean = (candidate.Candidate.UnderlyingSymbol.Kind = SymbolKind.Property) 3127Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Event 3130Case SymbolKind.Method
Binding\Binder_Lookup.vb (22)
130If options = LookupOptions.LabelsOnly AndAlso sym.Kind = SymbolKind.Label Then 149If sym.Kind = SymbolKind.Local AndAlso DirectCast(sym, LocalSymbol).IsFunctionValue Then 167If unwrappedSym.Kind = SymbolKind.NamedType AndAlso unwrappedSym.EmbeddedSymbolKind = EmbeddedSymbolKind.EmbeddedAttribute AndAlso 181Case SymbolKind.NamedType, SymbolKind.ErrorType 187Case SymbolKind.TypeParameter, SymbolKind.Namespace 192Case SymbolKind.Alias 201Case SymbolKind.Method 244ElseIf sym.Kind = SymbolKind.Method Then 252If unwrappedSym.Kind = SymbolKind.Method AndAlso unwrappedSym.ContainingSymbol IsNot Nothing Then 289sym.Kind <> SymbolKind.Method Then 436If sym.Kind = SymbolKind.Namespace Then 760If sym.Kind <> SymbolKind.Field Then 804If sym.Kind <> SymbolKind.Field Then 868Dim lookingForOverloadsOfKind As SymbolKind? = Nothing 1155result.Symbols(0).Kind <> SymbolKind.Method) Then 1533FilterSymbolsInLookupResult(currentResult, SymbolKind.Event, leaveInsteadOfRemoving:=leaveEventsOnly.Value) 1546FilterSymbolsInLookupResult(lookupResult, SymbolKind.Method, leaveInsteadOfRemoving:=True) 1584Private Shared Sub FilterSymbolsInLookupResult(result As LookupResult, kind As SymbolKind, leaveInsteadOfRemoving As Boolean) 1685lookupResult.Symbols(0).Kind <> SymbolKind.Method Then 1758If leaveEventsOnly.HasValue AndAlso (newSymbol.Kind = SymbolKind.Event) <> leaveEventsOnly.Value Then
Binding\Binder_ObjectInitializer.vb (2)
28extendedErrorType.CandidateSymbols(0).Kind = SymbolKind.NamedType Then 898Return y.Kind = SymbolKind.Method
Binding\Binder_Query.vb (1)
731Dim result As Boolean = (lookup.IsGood AndAlso lookup.Symbols(0).Kind = SymbolKind.RangeVariable)
Binding\Binder_Statements.vb (28)
1006ElseIf Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).IsGenericMethod Then 1826Debug.Assert(symbol.Kind = SymbolKind.Local OrElse symbol.Kind = SymbolKind.RangeVariable OrElse 1827(symbol.Kind = SymbolKind.Parameter AndAlso 1855Case SymbolKind.Local, SymbolKind.RangeVariable 1856If symbol.Kind = SymbolKind.Parameter Then 1858ElseIf symbol.Kind <> SymbolKind.RangeVariable Then 1868Case SymbolKind.Parameter 1870If symbol.Kind = SymbolKind.Parameter Then 1872ElseIf symbol.Kind <> SymbolKind.RangeVariable Then 1889Case SymbolKind.TypeParameter 1908If symbol.Kind = SymbolKind.Parameter Then 1910ElseIf symbol.Kind <> SymbolKind.RangeVariable Then 2997result.Symbols(0).Kind = SymbolKind.Local Then 4090(collectionType.Kind <> SymbolKind.ArrayType AndAlso 4091collectionType.Kind <> SymbolKind.NamedType AndAlso 4092collectionType.Kind <> SymbolKind.TypeParameter) Then 4237If sym.Kind = SymbolKind.Method Then 4250If sym.Kind = SymbolKind.Property Then 4291If result.Symbols(0).Kind = SymbolKind.Method AndAlso 4696If structureType.Kind = SymbolKind.NamedType Then 4700If member.Kind = SymbolKind.Field AndAlso 5041Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5052Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5082Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5150Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod) 5162Debug.Assert(Me.ContainingMember.Kind = SymbolKind.Method AndAlso DirectCast(Me.ContainingMember, MethodSymbol).MethodKind = MethodKind.LambdaMethod)
Binding\Binder_Symbols.vb (8)
231If symbol IsNot Nothing AndAlso symbol.Kind = SymbolKind.Alias Then 278If sym.Kind = SymbolKind.Alias Then 304If diagBag.AccumulatesDiagnostics AndAlso typeSymbol.Kind = SymbolKind.NamedType AndAlso binder.SourceModule.AnyReferencedAssembliesAreLinked Then 567lookupResult.SingleSymbol.Kind = SymbolKind.Alias Then 717While currentSymbol IsNot Nothing AndAlso currentSymbol.Kind = SymbolKind.NamedType 976Dim isLeftUnboundGenericType As Boolean = leftSymbol.Kind = SymbolKind.NamedType AndAlso DirectCast(leftSymbol, NamedTypeSymbol).IsUnboundGenericType 992If lookupResult.HasSingleSymbol AndAlso lookupResult.SingleSymbol.Kind = SymbolKind.NamedType Then 1053Dim isLeftUnboundGenericType As Boolean = leftSymbol.Kind = SymbolKind.NamedType AndAlso DirectCast(leftSymbol, NamedTypeSymbol).IsUnboundGenericType
Binding\Binder_Utils.vb (1)
862Debug.Assert(Not (container.Kind = SymbolKind.Method AndAlso DirectCast(container, MethodSymbol).MethodKind = MethodKind.DelegateInvoke))
Binding\Binder_XmlLiterals.vb (2)
985Case SymbolKind.Method 992Case SymbolKind.Property
Binding\BinderBuilder.vb (10)
202nsSymbol = DirectCast(binder.NamespaceSymbol.GetMembers(nsSymbol.Name).First(Function(s) s.Kind = SymbolKind.Namespace), NamespaceSymbol) 232If containingSymbol.Kind = SymbolKind.Namespace Then 242While containingSymbol.Kind <> SymbolKind.Namespace 248Debug.Assert(containingSymbol IsNot Nothing AndAlso containingSymbol.Kind = SymbolKind.Namespace) 276Case SymbolKind.Parameter 424Debug.Assert((fieldOrProperty.Kind = SymbolKind.Field) OrElse (fieldOrProperty.Kind = SymbolKind.Property)) 425Debug.Assert(additionalFieldsOrProperties.All(Function(s) s.Kind = SymbolKind.Field OrElse s.Kind = SymbolKind.Property)) 430If fieldOrProperty.Kind = SymbolKind.Field Then
Binding\BinderFactory.vb (4)
325fieldOrProperty = containingNamedTypeBinder.ContainingType.FindMember(identifier.ValueText, SymbolKind.Field, identifier.Span, _tree) 337fieldOrProperty = containingNamedTypeBinder.ContainingType.FindMember(identifier.ValueText, SymbolKind.Property, identifier.Span, _tree) 357Dim field = containingType.FindMember(identifier.ValueText, SymbolKind.Field, identifier.Span, _tree) 647(symbol.Kind = SymbolKind.Method) Then
Binding\DeclarationInitializerBinder.vb (6)
40Debug.Assert((symbol.Kind = SymbolKind.Field) OrElse (symbol.Kind = SymbolKind.Property) OrElse (symbol.Kind = SymbolKind.Parameter)) 41Debug.Assert(additionalSymbols.All(Function(s) s.Kind = symbol.Kind AndAlso (s.Kind = SymbolKind.Field OrElse s.Kind = SymbolKind.Property))) 42Debug.Assert(symbol.Kind <> SymbolKind.Parameter OrElse additionalSymbols.IsEmpty)
Binding\DocumentationCommentBinder.vb (5)
51Debug.Assert(binderContainingMember.Kind = SymbolKind.Namespace) 186Case SymbolKind.Method, SymbolKind.Property 206Case SymbolKind.Method 223Case SymbolKind.Property
Binding\DocumentationCommentCrefBinder.vb (20)
119Case SymbolKind.Method 151Case SymbolKind.Property 225If result IsNot Nothing AndAlso result.Kind = SymbolKind.Alias AndAlso Not preserveAliases Then 384Case SymbolKind.Field 387Case SymbolKind.Method 390Case SymbolKind.Property 680If singleSymbol.Kind = SymbolKind.Alias Then 693If containingSymbol.Kind <> SymbolKind.NamedType Then 706If containingSymbol.Kind = SymbolKind.NamedType Then 761Case SymbolKind.Namespace 764Case SymbolKind.Alias 768Case SymbolKind.NamedType, SymbolKind.ArrayType 771Case SymbolKind.Property 782Case SymbolKind.Field 793Case SymbolKind.Method 850Case SymbolKind.Method 855Case SymbolKind.NamedType, SymbolKind.ErrorType 860Case SymbolKind.Alias
Binding\DocumentationCommentCrefBinder_Compat.vb (11)
176Case SymbolKind.Namespace 179Case SymbolKind.Alias 185Case SymbolKind.NamedType, SymbolKind.ArrayType 188Case SymbolKind.Property 199Case SymbolKind.Field 210Case SymbolKind.Method 395Case SymbolKind.Method 400Case SymbolKind.NamedType, SymbolKind.ErrorType 405Case SymbolKind.Alias
Binding\DocumentationCommentParamBinder.vb (4)
28Case SymbolKind.NamedType 37Case SymbolKind.Method 40Case SymbolKind.Property 43Case SymbolKind.Event
Binding\DocumentationCommentTypeParamBinder.vb (2)
41Case SymbolKind.NamedType 44Case SymbolKind.Method
Binding\DocumentationCommentTypeParamRefBinder.vb (1)
47If symbol.Kind = SymbolKind.TypeParameter Then
Binding\ForOrForEachBlockBinder.vb (2)
88result.Symbols(0).Kind <> SymbolKind.NamedType AndAlso 89result.Symbols(0).Kind <> SymbolKind.TypeParameter) Then
Binding\ImportedTypesAndNamespacesMembersBinder.vb (6)
71currentResult.SingleSymbol.Kind = SymbolKind.Namespace AndAlso 78Dim lookupResultIsNamespace As Boolean = (lookupResult.Symbols(0).Kind = SymbolKind.Namespace) 79Dim currentResultIsNamespace As Boolean = (currentResult.Symbols(0).Kind = SymbolKind.Namespace) 119If lookupResult.IsGood AndAlso lookupResult.Symbols.Count > 1 AndAlso lookupResult.Symbols(0).Kind = SymbolKind.Namespace Then 136If importedSym.NamespaceOrType.Kind = SymbolKind.NamedType Then 150If importedSym.NamespaceOrType.Kind = SymbolKind.NamedType Then
Binding\InitializerSemanticModel.vb (4)
45If Me.MemberSymbol.Kind = SymbolKind.Field Then 102Case SymbolKind.Field 132Case SymbolKind.Property 145Case SymbolKind.Parameter
Binding\LookupResult.vb (16)
517Case SymbolKind.Method 521Case SymbolKind.Property 740If symbol1.Kind <> SymbolKind.Field OrElse symbol2.Kind <> SymbolKind.Field OrElse symbol1.ContainingType.TypeKind <> TypeKind.Enum Then 876If sym.Kind = SymbolKind.Namespace Then 920Debug.Assert(Me.Symbols(0).Kind <> SymbolKind.Namespace OrElse other.Symbol.Kind <> SymbolKind.Namespace) ' namespaces are supposed to be merged 926Debug.Assert(candidate.Kind <> SymbolKind.Namespace OrElse other.Symbol.Kind <> SymbolKind.Namespace) ' namespaces are supposed to be merged 927If candidate.Kind = SymbolKind.Namespace Then 956Debug.Assert(first.Kind <> SymbolKind.Namespace OrElse second.Kind <> SymbolKind.Namespace) ' namespaces are supposed to be merged 967If first.Kind = SymbolKind.Namespace Then 973ElseIf second.Kind = SymbolKind.Namespace Then 993Debug.Assert(type.Kind = SymbolKind.NamedType) 1000If sibling.Kind = SymbolKind.Namespace Then
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (1)
145If member.Kind = SymbolKind.Method Then
BoundTree\BoundArrayCreation.vb (1)
25If Type.Kind = SymbolKind.ArrayType Then
BoundTree\BoundAssignmentOperator.vb (1)
95DirectCast(Left, BoundFieldAccess).FieldSymbol.AssociatedSymbol.Kind = SymbolKind.Property AndAlso
BoundTree\BoundExpressionExtensions.vb (1)
620If symbol.Kind = SymbolKind.Namespace AndAlso DirectCast(symbol, NamespaceSymbol).NamespaceKind = NamespaceKindNamespaceGroup Then
Compilation\ClsComplianceChecker.vb (46)
290Debug.Assert(symbol.Kind = SymbolKind.NamedType OrElse symbol.Kind = SymbolKind.Field OrElse symbol.Kind = SymbolKind.Property OrElse symbol.Kind = SymbolKind.Event OrElse symbol.Kind = SymbolKind.Method) 305If symbol.Kind = SymbolKind.NamedType Then 310ElseIf symbol.Kind = SymbolKind.Event Then 327ElseIf symbol.IsMustOverride AndAlso symbol.Kind <> SymbolKind.NamedType Then 416Case SymbolKind.Field 419Case SymbolKind.Property 422Case SymbolKind.Method 469If symbol.Kind <> SymbolKind.Namespace Then 477If IsAccessibleIfContainerIsAccessible(member) AndAlso (Not member.IsOverrides OrElse Not (member.Kind = SymbolKind.Method OrElse member.Kind = SymbolKind.Property)) Then 486If IsAccessibleOutsideAssembly(member) AndAlso IsTrue(GetDeclaredOrInheritedCompliance(member)) AndAlso (Not member.IsOverrides OrElse Not (member.Kind = SymbolKind.Method OrElse member.Kind = SymbolKind.Property)) Then 520Dim isMethodOrProperty As Boolean = symbol.Kind = SymbolKind.Method OrElse symbol.Kind = SymbolKind.Property 546If symbol.Kind = SymbolKind.Namespace Then 571If symbol.Kind = SymbolKind.Namespace Then 657Debug.Assert(symbol.Kind = SymbolKind.NamedType OrElse Not (TypeOf symbol Is TypeSymbol), "Type kinds without declarations are handled elsewhere.") 659Debug.Assert(symbol.Kind <> If(Me._compilation.Options.OutputKind = OutputKind.NetModule, SymbolKind.Assembly, SymbolKind.NetModule) OrElse 660(symbol.Kind = SymbolKind.Assembly AndAlso Me._compilation.Assembly IsNot symbol), 663If symbol.Kind = SymbolKind.Namespace Then 666ElseIf symbol.Kind = SymbolKind.Method Then 675Debug.Assert(symbol.Kind <> SymbolKind.Alias) 676Debug.Assert(symbol.Kind <> SymbolKind.Label) 677Debug.Assert(symbol.Kind <> SymbolKind.Namespace) 678Debug.Assert(symbol.Kind <> SymbolKind.Parameter) 679Debug.Assert(symbol.Kind <> SymbolKind.RangeVariable) 689ElseIf symbol.Kind = SymbolKind.Assembly OrElse symbol.Kind = SymbolKind.NetModule Then 696Case SymbolKind.Assembly, SymbolKind.NetModule, SymbolKind.NamedType 708Debug.Assert(symbol.Kind <> SymbolKind.Assembly) 709Debug.Assert(symbol.Kind <> SymbolKind.NetModule) 731If symbol.IsFromCompilation(Me._compilation) OrElse symbol.Kind <> SymbolKind.NamedType Then 826Debug.Assert(symbol.Kind = SymbolKind.ErrorType) 845Return symbol.Kind = SymbolKind.NamedType AndAlso (DirectCast(symbol, NamedTypeSymbol)).IsImplicitClass 916Return arrayType.ElementType.Kind = SymbolKind.ArrayType 922Case SymbolKind.Method 924Case SymbolKind.Property 944Case SymbolKind.Method 946Case SymbolKind.Property
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (11)
431needDiagnostic = bindResult(0).Kind <> SymbolKind.TypeParameter 717Case SymbolKind.Field 723Case SymbolKind.Method 729Case SymbolKind.Property 732Case SymbolKind.Event 735Case SymbolKind.NamedType 766Case SymbolKind.NamedType 779Case SymbolKind.Field, 780SymbolKind.Event, 781SymbolKind.Property, 782SymbolKind.Method
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (6)
98Case SymbolKind.Field 101Case SymbolKind.Event 106Case SymbolKind.Method 119Case SymbolKind.NamedType 135Case SymbolKind.Property 654If symbol.Kind = SymbolKind.TypeParameter Then
Compilation\DocumentationComments\DocumentationCommentCompiler.vb (5)
117Debug.Assert(symbol.Kind = SymbolKind.Event OrElse 118symbol.Kind = SymbolKind.Field OrElse 119symbol.Kind = SymbolKind.Method OrElse 120symbol.Kind = SymbolKind.NamedType OrElse 121symbol.Kind = SymbolKind.Property)
Compilation\DocumentationComments\DocumentationCommentWalker.vb (1)
189If symbol.Kind = SymbolKind.TypeParameter Then
Compilation\MethodCompiler.vb (8)
137If symbol.Kind = SymbolKind.Method AndAlso symbol.IsImplicitlyDeclared AndAlso 390If symbol.Kind = SymbolKind.NamedType Then 397If symbol.Kind = SymbolKind.Method Then 469Debug.Assert(fieldOrProperty.Kind = SymbolKind.Field) 656Case SymbolKind.NamedType 659Case SymbolKind.Method 760If member.IsShared OrElse Not member.IsFromCompilation(_compilation) OrElse member.Kind <> SymbolKind.Method Then 864If member.Kind = SymbolKind.Method Then
Compilation\NamespaceScopeBuilder.vb (2)
38ElseIf target.Kind <> SymbolKind.ErrorType AndAlso Not target.ContainingAssembly.IsLinked Then 53Debug.Assert(target.Kind <> SymbolKind.ErrorType)
Compilation\SemanticModel.vb (24)
446Debug.Assert(item.Kind <> SymbolKind.Namespace) 463Debug.Assert(item.Kind <> SymbolKind.Namespace) 479Debug.Assert(item.Kind <> SymbolKind.Namespace) 1080If candidateSymbols.Length = 1 AndAlso candidateSymbols(0).Kind = SymbolKind.NamedType Then 1213Case SymbolKind.Method, SymbolKind.Field, SymbolKind.Property 1395Dim anyAliases As Boolean = symbols.Any(Function(sym) sym.Kind = SymbolKind.Alias) 1536ElseIf symbol.Kind = SymbolKind.Namespace AndAlso DirectCast(symbol, NamespaceSymbol).NamespaceKind = NamespaceKindNamespaceGroup Then 1608Debug.Assert(item.Kind <> SymbolKind.Namespace OrElse DirectCast(item, NamespaceSymbol).NamespaceKind <> NamespaceKindNamespaceGroup) 1655Debug.Assert(item.Kind <> SymbolKind.Namespace) 1688Debug.Assert(item.Kind <> SymbolKind.Namespace OrElse DirectCast(item, NamespaceSymbol).NamespaceKind <> NamespaceKindNamespaceGroup) 1721Debug.Assert(item.Kind <> SymbolKind.Namespace OrElse DirectCast(item, NamespaceSymbol).NamespaceKind <> NamespaceKindNamespaceGroup) 1748Debug.Assert(item.Kind <> SymbolKind.Namespace) 1867(result.Kind = SymbolKind.Method AndAlso DirectCast(result, MethodSymbol).MethodKind = MethodKind.Constructor) Then 1987ElseIf result.HasSingleSymbol AndAlso result.SingleSymbol.Kind = SymbolKind.Namespace AndAlso 2855If symbol.Kind = SymbolKind.Method Then 2857ElseIf symbol.Kind = SymbolKind.Property Then 3529Case SymbolKind.Namespace 3535Case SymbolKind.NamedType 3545Case SymbolKind.Method 3551Case SymbolKind.Event 3557Case SymbolKind.Property 3563Case SymbolKind.Field
Compilation\SyntaxTreeSemanticModel.vb (12)
526Case SymbolKind.ArrayType, 527SymbolKind.TypeParameter, 528SymbolKind.NamedType 617If symbol.Kind = SymbolKind.TypeParameter Then 646If resultSymbol.Kind = SymbolKind.Namespace AndAlso 716Case SymbolKind.Method 726Case SymbolKind.Property 736Case SymbolKind.Event 1063Case SymbolKind.Method 1065Case SymbolKind.Event 1075Case SymbolKind.Property 1077Case SymbolKind.NamedType
Compilation\SynthesizedMetadataCompiler.vb (1)
52Case SymbolKind.NamedType
Compilation\VisualBasicCompilation.vb (2)
1567If (Not lookupResult.IsGoodOrAmbiguous) OrElse lookupResult.Symbols(0).Kind <> SymbolKind.Method Then 2022Return If(within0.Kind = SymbolKind.Assembly,
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.vb (2)
110If containingSymbol.Kind = SymbolKind.NamedType Then 120ElseIf containingSymbol.Kind = SymbolKind.Method Then
Emit\EditAndContinue\EmitHelpers.vb (1)
151If type.Kind = SymbolKind.ErrorType Then
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (2)
178If member.Kind <> SymbolKind.Property Then 204Debug.Assert(members.Length = 1 AndAlso members(0).Kind = SymbolKind.Method)
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (1)
112If member.Kind = SymbolKind.Field Then
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (12)
225Case SymbolKind.NetModule 228Case SymbolKind.Namespace 287Case SymbolKind.Namespace 302Case SymbolKind.NamedType 330Case SymbolKind.NamedType, 331SymbolKind.ErrorType 334Case SymbolKind.Method 490Case SymbolKind.ArrayType 493Case SymbolKind.NamedType, 494SymbolKind.ErrorType 497Case SymbolKind.TypeParameter 508If symbol.Kind = SymbolKind.NamedType Then
Emit\NamedTypeSymbolAdapter.vb (5)
282If member.Kind = SymbolKind.Method Then 476If member.Kind = SymbolKind.Method Then 908If member.Kind = SymbolKind.Event Then 980If member.Kind = SymbolKind.Method Then 997If member.Kind = SymbolKind.Property Then
Emit\NoPia\EmbeddedEvent.vb (1)
113If m.Kind = SymbolKind.Method Then
Emit\NoPia\EmbeddedType.vb (4)
236Case SymbolKind.Field 238Case SymbolKind.Method 240Case SymbolKind.Property 242Case SymbolKind.Event
Emit\NoPia\EmbeddedTypesManager.vb (3)
224If member.Kind <> SymbolKind.NamedType Then 431Case SymbolKind.Property 433Case SymbolKind.Event
Emit\PEAssemblyBuilder.vb (1)
157Dim subnamespace = DirectCast(result.GetMembers(partName).FirstOrDefault(Function(m) m.Kind = SymbolKind.Namespace), NamespaceSymbol)
Emit\PEModuleBuilder.vb (16)
209Case SymbolKind.Namespace 217Case SymbolKind.Namespace, SymbolKind.NamedType 225Case SymbolKind.NamedType 233Case SymbolKind.NamedType 236Case SymbolKind.Method 245Case SymbolKind.Property, 246SymbolKind.Field 249Case SymbolKind.Event 364If sym.Kind = SymbolKind.NamedType Then 373Debug.Assert(sym.Kind = SymbolKind.Namespace) 504If symbol.Kind = SymbolKind.NamedType Then 660Case SymbolKind.Namespace 668Case SymbolKind.Namespace, SymbolKind.NamedType 676Case SymbolKind.NamedType
Emit\SymbolAdapter.vb (2)
80Debug.Assert(Me.Kind <> SymbolKind.Assembly) 120If Me.Kind = SymbolKind.Assembly Then
Emit\SymbolTranslator.vb (7)
133If namedTypeSymbol.OriginalDefinition.Kind = SymbolKind.ErrorType Then 137If diagInfo Is Nothing AndAlso namedTypeSymbol.Kind = SymbolKind.ErrorType Then 254Case SymbolKind.ArrayType 256Case SymbolKind.NamedType, SymbolKind.ErrorType 258Case SymbolKind.TypeParameter 461Return container.Kind = SymbolKind.Method AndAlso (DirectCast(container, MethodSymbol)).IsGenericMethod OrElse
Emit\TypeParameterSymbolAdapter.vb (9)
63If AdaptedTypeParameterSymbol.ContainingSymbol.Kind = SymbolKind.Method Then 74If AdaptedTypeParameterSymbol.ContainingSymbol.Kind = SymbolKind.Method Then 92If AdaptedTypeParameterSymbol.ContainingSymbol.Kind = SymbolKind.NamedType Then 104If AdaptedTypeParameterSymbol.ContainingSymbol.Kind = SymbolKind.NamedType Then 144Dim kind As SymbolKind = AdaptedTypeParameterSymbol.ContainingSymbol.Kind 147If kind = SymbolKind.NamedType Then 150If kind = SymbolKind.Method Then 157If kind = SymbolKind.NamedType Then 160If kind = SymbolKind.Method Then
Errors\MessageProvider.vb (2)
98If symbol.Kind = SymbolKind.Assembly OrElse symbol.Kind = SymbolKind.Namespace Then
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (2)
529Case SymbolKind.Event 535Case SymbolKind.Field
Lowering\AsyncRewriter\AsyncRewriter.vb (3)
382If returnType.Kind = SymbolKind.NamedType AndAlso 554If result.Symbols(0).Kind = SymbolKind.Method Then 613If result.Symbols(0).Kind = SymbolKind.Property Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (4)
617Debug.Assert(leftSymbol.Kind = SymbolKind.Field OrElse leftSymbol.Kind = SymbolKind.Property) 619Dim memberRef As BoundExpression = If(leftSymbol.Kind = SymbolKind.Field, 626If(leftSymbol.Kind = SymbolKind.Field,
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (3)
146If nonLambda?.Kind = SymbolKind.Method Then 155Case SymbolKind.Property 160Case SymbolKind.Event
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (2)
256local.ContainingSymbol.Kind <> SymbolKind.Method, 409If variableOrParameter.Kind = SymbolKind.Local Then
Lowering\LambdaRewriter\LambdaRewriter.vb (5)
269Debug.Assert(captured.Kind <> SymbolKind.Local OrElse 563If _innermostFramePointer.Kind = SymbolKind.Parameter AndAlso _topLevelMethod.MethodKind = MethodKind.Constructor AndAlso 596If variable.Kind <> SymbolKind.Local Then 646Case SymbolKind.Parameter 658Case SymbolKind.Local
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (2)
201(fromMember.Kind = SymbolKind.Field OrElse (fromMember.Kind = SymbolKind.Method AndAlso
Lowering\LocalRewriter\LocalRewriter_FieldOrPropertyInitializer.vb (2)
79If symbol.Kind = SymbolKind.Field Then 102If symbol.Kind = SymbolKind.Field Then
Lowering\LocalRewriter\LocalRewriter_With.vb (1)
175If member.Kind = SymbolKind.Field Then
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (2)
315Debug.Assert(localOrParameter.Kind = SymbolKind.Local OrElse localOrParameter.Kind = SymbolKind.Parameter)
Lowering\StateMachineRewriter\StateMachineRewriter.vb (4)
172Debug.Assert(variable.Kind = SymbolKind.Local OrElse variable.Kind = SymbolKind.Parameter) 175Case SymbolKind.Local 189Case SymbolKind.Parameter
Lowering\SynthesizedSubmissionFields.vb (1)
57If hostObjectTypeSymbol IsNot Nothing AndAlso hostObjectTypeSymbol.Kind <> SymbolKind.ErrorType Then
Lowering\WithExpressionRewriter.vb (1)
324If Not (state.DoNotUseByRefLocal OrElse (value.Kind = BoundKind.ArrayAccess AndAlso value.Type.Kind = SymbolKind.TypeParameter)) Then
Semantics\AccessCheck.vb (30)
103Case SymbolKind.ArrayType 106Case SymbolKind.NamedType 109Case SymbolKind.Alias 112Case SymbolKind.ErrorType 116Case SymbolKind.TypeParameter, SymbolKind.Parameter, SymbolKind.Local, SymbolKind.RangeVariable, 117SymbolKind.Label, SymbolKind.Namespace, SymbolKind.Assembly, SymbolKind.NetModule 121Case SymbolKind.Method, SymbolKind.Property, SymbolKind.Event, SymbolKind.Field 154If typeArgs(i).Kind <> SymbolKind.TypeParameter Then 496Case SymbolKind.TypeParameter 498Case SymbolKind.NamedType, SymbolKind.ErrorType 599Case SymbolKind.TypeParameter, SymbolKind.ErrorType 601Case SymbolKind.ArrayType 603Case SymbolKind.NamedType 661If container IsNot Nothing AndAlso container.Kind = SymbolKind.Namespace Then 867If Not (exposingMember.Kind = SymbolKind.NamedType AndAlso IsTypeNestedIn(exposedType, DirectCast(exposingMember, NamedTypeSymbol))) Then 871Debug.Assert(exposingMember.Kind = SymbolKind.NamedType) 993Debug.Assert(member.Kind <> SymbolKind.Namespace, "How can a Member be a namespace ?") 998If member.Kind = SymbolKind.NamedType Then 1171If member.Kind = SymbolKind.NamedType Then
Semantics\Conversions.vb (64)
708Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 876Debug.Assert(targetType.Kind <> SymbolKind.ErrorType) 890Debug.Assert(targetType.Kind <> SymbolKind.ErrorType) 913Debug.Assert(source.Kind <> SymbolKind.ErrorType) 915Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 943Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1000If sourceType.Kind <> SymbolKind.ErrorType Then 1019Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1441Debug.Assert(booleanType.Kind <> SymbolKind.ErrorType) 1725Debug.Assert(source.Kind <> SymbolKind.ErrorType) 1726Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1790Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1819If sourceType.Kind <> SymbolKind.ErrorType Then 1829Debug.Assert(source.Kind <> SymbolKind.ErrorType) 1831Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1846Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 1875If sourceType.Kind <> SymbolKind.ErrorType Then 1887If sourceKind = SymbolKind.ArrayType AndAlso destinationKind = SymbolKind.ArrayType Then 1911If sourceKind <> SymbolKind.TypeParameter AndAlso destinationKind <> SymbolKind.TypeParameter Then 1978Debug.Assert(src.Kind <> SymbolKind.TypeParameter) 1979Debug.Assert(dst.Kind <> SymbolKind.TypeParameter) 1995If destinationKind = SymbolKind.TypeParameter AndAlso 2017If sourceKind = SymbolKind.TypeParameter AndAlso 2051If type.Kind = SymbolKind.TypeParameter Then 2068Return If(valueType.Kind = SymbolKind.ErrorType, Nothing, valueType) 2087Debug.Assert(source.Kind <> SymbolKind.ErrorType) 2088Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 2111Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 2130Debug.Assert(sourceType.Kind <> SymbolKind.ErrorType) 2196Debug.Assert(source.Kind <> SymbolKind.ErrorType) 2198Debug.Assert(destination.Kind <> SymbolKind.ErrorType) 2470If dstUnderlying Is destination OrElse dstUnderlying.Kind = SymbolKind.ErrorType Then 2486If dstUnderlyingElement.Kind = SymbolKind.ErrorType Then 2492If arrayElement.Kind = SymbolKind.ErrorType Then 3030If srcElem.Kind = SymbolKind.ErrorType OrElse dstElem.Kind = SymbolKind.ErrorType Then 3119ElseIf srcElem.Kind = SymbolKind.TypeParameter AndAlso 3120dstElem.Kind = SymbolKind.TypeParameter Then 3155ElseIf srcElem.Kind = SymbolKind.TypeParameter OrElse 3156dstElem.Kind = SymbolKind.TypeParameter Then 3188If srcElem.Kind = SymbolKind.TypeParameter OrElse 3189dstElem.Kind = SymbolKind.TypeParameter Then 3212If srcElem.Kind = SymbolKind.TypeParameter Then 3220If dstElem.Kind = SymbolKind.TypeParameter Then 3281ElseIf dstElem.Kind = SymbolKind.TypeParameter AndAlso 3284If srcElem.Kind = SymbolKind.TypeParameter Then 3307ElseIf srcElem.Kind = SymbolKind.TypeParameter AndAlso Not srcElem.IsReferenceType Then 3310If dstElem.Kind = SymbolKind.TypeParameter Then 3368If underlying.Kind <> SymbolKind.ErrorType Then 3482If srcUnderlying.Kind = SymbolKind.ErrorType OrElse Not srcUnderlying.IsValueType OrElse srcUnderlying.IsNullableType() Then 3490If dstUnderlying.Kind = SymbolKind.ErrorType OrElse Not dstUnderlying.IsValueType OrElse dstUnderlying.IsNullableType() Then 3632If shouldBeArray.Kind = SymbolKind.ArrayType Then 3678If source.Kind = SymbolKind.TypeParameter Then 3686If destination.Kind = SymbolKind.TypeParameter Then 3695If source.Kind = SymbolKind.TypeParameter OrElse destination.Kind = SymbolKind.TypeParameter Then 3759If valueType.Kind <> SymbolKind.ErrorType Then 3775If constraint.Kind = SymbolKind.ErrorType Then 3854If constraint.Kind = SymbolKind.TypeParameter Then 3919If valueType.Kind <> SymbolKind.ErrorType AndAlso IsDerivedFrom(valueType, source, useSiteInfo) Then 3940If constraint.Kind = SymbolKind.ErrorType Then 3990ElseIf constraint.Kind = SymbolKind.TypeParameter Then
Semantics\Operators.vb (8)
438ElseIf (sourceType.Kind = SymbolKind.NamedType OrElse sourceType.Kind = SymbolKind.TypeParameter) AndAlso 439(targetType.Kind = SymbolKind.NamedType OrElse targetType.Kind = SymbolKind.TypeParameter) Then 2866If type1 IsNot Nothing AndAlso type1.Kind = SymbolKind.NamedType AndAlso Not type1.IsInterfaceType() Then 2885If type2 IsNot Nothing AndAlso type2.Kind = SymbolKind.NamedType AndAlso Not type2.IsInterfaceType() Then 2918If member.Kind = SymbolKind.Method Then 2945If type.Kind = SymbolKind.TypeParameter Then
Semantics\OverloadResolution.vb (15)
2893If candidateSymbol.Kind = SymbolKind.Method Then 2919Dim candidateIsAProperty As Boolean = (candidate.Candidate.UnderlyingSymbol.Kind = SymbolKind.Property) 2934If targetType.Kind <> SymbolKind.ArrayType Then 3024If targetType.Kind = SymbolKind.ErrorType Then 3099If targetType.Kind = SymbolKind.ErrorType Then 4545If leftType.Kind = SymbolKind.NamedType AndAlso rightType.Kind = SymbolKind.NamedType Then 4681If symbol.ContainingSymbol.Kind = SymbolKind.NamedType Then 4707Case SymbolKind.TypeParameter 4711Case SymbolKind.ArrayType 4716Case SymbolKind.NamedType, SymbolKind.ErrorType 4807paramType.Kind = SymbolKind.ArrayType Then 4822If paramForGenericityCheck.ContainingSymbol.Kind = SymbolKind.Method Then 4834paramType.Kind = SymbolKind.ArrayType Then
Semantics\TypeInference\TypeArgumentInference.vb (19)
929If targetType.Kind <> SymbolKind.ArrayType Then 971If targetType.Kind = SymbolKind.ErrorType Then 1069Case SymbolKind.TypeParameter 1089Case SymbolKind.ArrayType 1093Case SymbolKind.NamedType 1296Case SymbolKind.TypeParameter 1311Case SymbolKind.ArrayType 1315Case SymbolKind.NamedType 1425ElseIf parameterType.Kind = SymbolKind.NamedType Then 1432Dim argumentTypeAsNamedType = If(argumentType.Kind = SymbolKind.NamedType, DirectCast(argumentType.GetTupleUnderlyingTypeOrSelf(), NamedTypeSymbol), Nothing) 1772Dim fixedTypeAsNamedType = If(fixedType.Kind = SymbolKind.NamedType, DirectCast(fixedType, NamedTypeSymbol), Nothing) 1788Dim baseSearchTypeKind As SymbolKind = baseSearchType.Kind 1790If baseSearchTypeKind <> SymbolKind.NamedType AndAlso baseSearchTypeKind <> SymbolKind.TypeParameter AndAlso 1791Not (baseSearchTypeKind = SymbolKind.ArrayType AndAlso DirectCast(baseSearchType, ArrayTypeSymbol).IsSZArray) Then 1841Case SymbolKind.TypeParameter 1873Case SymbolKind.TypeParameter 2172lambdaReturnType IsNot Nothing AndAlso lambdaReturnType.Kind = SymbolKind.NamedType AndAlso 2173returnType IsNot Nothing AndAlso returnType.Kind = SymbolKind.NamedType Then
SymbolDisplay\SymbolDisplayVisitor.Members.vb (3)
331If associatedPropertyOrEvent.Kind = SymbolKind.Property Then 618Dim isConst = symbol.Kind = SymbolKind.Field AndAlso DirectCast(symbol, IFieldSymbol).IsConst 700symbol.Kind <> SymbolKind.Method OrElse
SymbolDisplay\SymbolDisplayVisitor.Types.vb (2)
30While underlyingNonArrayType.Kind = SymbolKind.ArrayType 498If typeArg.Kind = SymbolKind.TypeParameter Then
SymbolDisplay\SymbolDisplayVisitor.vb (2)
379containingSymbol.Kind = SymbolKind.Namespace AndAlso 394symbol.Kind = SymbolKind.Field AndAlso
Symbols\AliasSymbol.vb (3)
92''' <returns><see cref="SymbolKind.Alias"/></returns> 93Public Overrides ReadOnly Property Kind As SymbolKind 95Return SymbolKind.Alias
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (1)
120If m.Kind = SymbolKind.Field Then
Symbols\ArrayTypeSymbol.vb (4)
243''' Returns <see cref="SymbolKind"/> of the symbol. 245''' <returns><see cref="SymbolKind.ArrayType"/></returns> 246Public Overrides ReadOnly Property Kind As SymbolKind 248Return SymbolKind.ArrayType
Symbols\AssemblySymbol.vb (3)
168Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 170Return SymbolKind.Assembly 704Return candidate IsNot Nothing AndAlso (candidate.Kind <> SymbolKind.ErrorType OrElse Not (TypeOf candidate Is MissingMetadataTypeSymbol))
Symbols\Attributes\AttributeData.vb (18)
214Debug.Assert(targetSymbol.Kind = SymbolKind.Assembly OrElse targetSymbol.Kind = SymbolKind.NamedType OrElse targetSymbol.Kind = SymbolKind.Method) 284Debug.Assert(targetSymbol.Kind = SymbolKind.Assembly OrElse targetSymbol.Kind = SymbolKind.NamedType OrElse targetSymbol.Kind = SymbolKind.Method) 333If targetSymbol.Kind = SymbolKind.NamedType OrElse targetSymbol.Kind = SymbolKind.Method Then 344ElseIf targetSymbol.Kind = SymbolKind.Assembly Then 421If members.Length = 1 AndAlso members(0).Kind = SymbolKind.Property Then 547Case SymbolKind.Assembly 560Case SymbolKind.Event 566Case SymbolKind.Field 574Case SymbolKind.Method 589Case SymbolKind.NetModule 594Case SymbolKind.NamedType 604Case SymbolKind.Parameter 612Case SymbolKind.Property
Symbols\Attributes\SourceAttributeData.vb (2)
172If parameterType.Kind <> SymbolKind.NamedType AndAlso parameterType.Kind <> SymbolKind.ErrorType Then
Symbols\BaseTypeAnalysis.vb (2)
55Debug.Assert(current.Head.Kind = SymbolKind.NamedType) 195If current Is Nothing OrElse current.Kind = SymbolKind.ErrorType Then
Symbols\ConstraintsHelper.vb (5)
438If type.Kind = SymbolKind.NamedType Then 770Case SymbolKind.ErrorType 773Case SymbolKind.TypeParameter 801Case SymbolKind.ErrorType 804Case SymbolKind.TypeParameter
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (14)
215Case SymbolKind.Field 223Case SymbolKind.Method 248Case SymbolKind.Property 265Case SymbolKind.NamedType 277Case SymbolKind.Field 286Case SymbolKind.Method 307Debug.Assert(symbol.Kind = SymbolKind.NamedType OrElse 308symbol.Kind = SymbolKind.Property OrElse 309symbol.Kind = SymbolKind.Method OrElse 310symbol.Kind = SymbolKind.Field) 339Case SymbolKind.Field 342Case SymbolKind.Method 345Case SymbolKind.NamedType 348Case SymbolKind.Property
Symbols\ErrorTypeSymbol.vb (2)
103Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 105Return SymbolKind.ErrorType
Symbols\EventSymbol.vb (2)
130Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 132Return SymbolKind.[Event]
Symbols\ExtendedErrorTypeSymbol.vb (2)
57candidateSymbols(0).Kind = SymbolKind.Namespace AndAlso 66Debug.Assert(item.Kind <> SymbolKind.Namespace OrElse DirectCast(item, NamespaceSymbol).NamespaceKind <> NamespaceKindNamespaceGroup)
Symbols\FieldSymbol.vb (2)
177Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 179Return SymbolKind.Field
Symbols\LabelSymbol.vb (2)
90Public Overrides ReadOnly Property Kind As SymbolKind 92Return SymbolKind.Label
Symbols\MemberSignatureComparer.vb (9)
55Case SymbolKind.Method 57Case SymbolKind.Property 59Case SymbolKind.Event 72Case SymbolKind.Method 74Case SymbolKind.Property 76Case SymbolKind.Event 87Case SymbolKind.Method, SymbolKind.Property, SymbolKind.Event
Symbols\MergedNamespaceSymbol.vb (1)
216If (childSym.Kind = SymbolKind.Namespace) Then
Symbols\Metadata\PE\MetadataDecoder.vb (5)
195Case SymbolKind.TypeParameter 198Case SymbolKind.ArrayType 202Case SymbolKind.NamedType, SymbolKind.ErrorType 277Debug.Assert(newresult Is result OrElse (newresult.Kind = SymbolKind.ErrorType))
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
535If m.Kind <> SymbolKind.Method Then
Symbols\Metadata\PE\PEModuleSymbol.vb (1)
384Return candidate.Kind <> SymbolKind.ErrorType OrElse Not (TypeOf candidate Is MissingMetadataTypeSymbol)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (18)
173While s.Kind <> SymbolKind.Namespace 389If (Not member.IsShared AndAlso member.Kind = SymbolKind.Field) Then 520Return GetMembers(Of FieldSymbol)(GetMembers(), SymbolKind.Field, offset:=0) 527Dim index = GetIndexOfFirstMember(members, SymbolKind.Method) 532If member.Kind <> SymbolKind.Method Then 548If index >= members.Length OrElse members(index).Kind <> SymbolKind.Method Then 569If index = members.Length OrElse members(index).Kind <> SymbolKind.Method Then 601Return GetMembers(Of PropertySymbol)(GetMembers(), SymbolKind.Property) 605Return GetMembers(Of EventSymbol)(GetMembers(), SymbolKind.Event) 628Case SymbolKind.Field 630Case SymbolKind.Method 638Case SymbolKind.Property 640Case SymbolKind.Event 642Case SymbolKind.NamedType 922If _container.Kind = SymbolKind.Namespace AndAlso _arity = 0 Then 1103If member.Kind = SymbolKind.Property Then 1546Private Shared Function GetIndexOfFirstMember(members As ImmutableArray(Of Symbol), kind As SymbolKind) As Integer 1560Private Overloads Shared Iterator Function GetMembers(Of TSymbol As Symbol)(members As ImmutableArray(Of Symbol), kind As SymbolKind, Optional offset As Integer = -1) As IEnumerable(Of TSymbol)
Symbols\Metadata\PE\PETypeParameterSymbol.vb (4)
101Return If(Me.ContainingSymbol.Kind = SymbolKind.Method, 185If _containingSymbol.Kind = SymbolKind.Method Then 316Dim typeParameters = If(_containingSymbol.Kind = SymbolKind.Method, 329Dim inherited = (_containingSymbol.Kind = SymbolKind.Method) AndAlso DirectCast(_containingSymbol, MethodSymbol).IsOverrides
Symbols\Metadata\PE\SymbolFactory.vb (1)
81If arg.Key.Kind = SymbolKind.ErrorType AndAlso
Symbols\Metadata\PE\TupleTypeDecoder.vb (6)
127Case SymbolKind.ErrorType 131Case SymbolKind.DynamicType, 132SymbolKind.TypeParameter, 133SymbolKind.PointerType 137Case SymbolKind.NamedType 162Case SymbolKind.ArrayType
Symbols\MetadataOrSourceAssemblySymbol.vb (2)
83(corType.Kind = SymbolKind.ErrorType AndAlso 84_lazySpecialTypes(CInt(typeId)).Kind = SymbolKind.ErrorType))
Symbols\MethodSymbol.vb (3)
321If Me.IsAccessor AndAlso Me.AssociatedSymbol.Kind = SymbolKind.Property Then 458Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 460Return SymbolKind.Method
Symbols\MissingMetadataTypeSymbol.vb (1)
152If symbol.Kind = SymbolKind.Namespace AndAlso
Symbols\MissingNamespaceSymbol.vb (1)
63If _containingSymbol.Kind = SymbolKind.NetModule Then
Symbols\ModuleSymbol.vb (2)
108Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 110Return SymbolKind.NetModule
Symbols\NamedTypeSymbol.vb (6)
306If member.Kind = SymbolKind.Method Then 418If candidate.Kind = SymbolKind.Method Then 426If candidate.Kind = SymbolKind.Method Then 659Public Overrides ReadOnly Property Kind As SymbolKind ' Cannot seal this method because of the ErrorSymbol. 661Return SymbolKind.NamedType 1523If(ContainingSymbol?.Kind = SymbolKind.Namespace, False) AndAlso
Symbols\NamedTypeSymbolExtensions.vb (4)
24Friend Function FindMember(container As NamedTypeSymbol, symbolName As String, kind As SymbolKind, nameSpan As TextSpan, tree As SyntaxTree) As Symbol 36If kind = SymbolKind.Method Then 59If child.Kind = SymbolKind.Field OrElse child.Kind = SymbolKind.Property Then
Symbols\NamespaceOrTypeSymbol.vb (2)
33Return Kind = SymbolKind.Namespace 203If member.Kind = SymbolKind.Method Then
Symbols\NamespaceSymbol.vb (6)
130Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 132Return SymbolKind.Namespace 209If member.Kind = SymbolKind.Namespace Then 402If sym.Kind = SymbolKind.Namespace Then 498If member.Kind = SymbolKind.Method Then 519If member.Kind = SymbolKind.Method Then
Symbols\ObsoleteAttributeHelpers.vb (1)
158If symbol.IsAccessor() AndAlso (DirectCast(symbol, MethodSymbol).AssociatedSymbol).Kind = SymbolKind.Property Then
Symbols\ParameterSymbol.vb (2)
192Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 194Return SymbolKind.Parameter
Symbols\PreprocessingSymbol.vb (2)
40Public Overrides ReadOnly Property Kind As SymbolKind 42Return SymbolKind.Preprocessing
Symbols\PropertySymbol.vb (3)
215((fromMember.Kind = SymbolKind.Method AndAlso DirectCast(fromMember, MethodSymbol).IsAnyConstructor) OrElse 352Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 354Return SymbolKind.Property
Symbols\Retargeting\RetargetingNamespaceSymbol.vb (1)
75If s.Kind = SymbolKind.NamedType AndAlso DirectCast(s, NamedTypeSymbol).IsExplicitDefinitionOfNoPiaLocalType Then
Symbols\Retargeting\RetargetingSymbolTranslator.vb (14)
71Dim containingType = If(container.Kind = SymbolKind.Method, 129Debug.Assert(symbol.Kind <> SymbolKind.NamedType OrElse DirectCast(symbol, NamedTypeSymbol).PrimitiveTypeCode = PrimitiveTypeCode.NotPrimitive) 174If type.Kind = SymbolKind.ErrorType Then 248If type.ContainingSymbol.Kind <> SymbolKind.NamedType AndAlso 398If newDefinition.Kind = SymbolKind.ErrorType AndAlso Not newDefinition.IsGenericType Then 548Case SymbolKind.TypeParameter 551Case SymbolKind.ArrayType 554Case SymbolKind.ErrorType, SymbolKind.NamedType 794If underlyingSymbol.Kind = SymbolKind.Method Then 800Debug.Assert(underlyingSymbol.Kind = SymbolKind.Method) 987If retargetedMember.Kind = SymbolKind.Method Then 1055If retargetedMember.Kind = SymbolKind.Event Then 1105If retargetedMember.Kind = SymbolKind.Property Then
Symbols\Source\ImplementsHelper.vb (15)
26Case SymbolKind.Method 28Case SymbolKind.Property 30Case SymbolKind.Event 101If implementingSym.Kind = SymbolKind.Method Then 103ElseIf implementingSym.Kind = SymbolKind.Property Then 124Dim implementingSymIsEvent = (implementingSym.Kind = SymbolKind.Event) 134Debug.Assert(implementedMember.Kind = SymbolKind.Event) 201If implementingSym.Kind = SymbolKind.Event Then 344If coClassContext AndAlso (implementingSym.Kind = SymbolKind.Event) <> (foundMember.Kind = SymbolKind.Event) Then 365ElseIf foundMember.Kind = SymbolKind.Property Then 428Case SymbolKind.Method 434Case SymbolKind.Property 440Case SymbolKind.Event 470If implementedSym.Kind = SymbolKind.Property Then
Symbols\Source\LambdaSymbol.vb (6)
131Case SymbolKind.Field 133Case SymbolKind.Property 135Case SymbolKind.Method 228Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Method
Symbols\Source\LocalSymbol.vb (6)
105Debug.Assert(container.Kind = SymbolKind.Method OrElse 106container.Kind = SymbolKind.Field OrElse 107container.Kind = SymbolKind.Property, 155Debug.Assert((Me.IsFunctionValue AndAlso _container.Kind = SymbolKind.Method AndAlso DirectCast(_container, MethodSymbol).MethodKind = MethodKind.LambdaMethod) OrElse type.Equals(ComputeType())) 186Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 188Return SymbolKind.Local
Symbols\Source\OverloadingHelper.vb (6)
28Public Sub SetMetadataNameForAllOverloads(name As String, kind As SymbolKind, container As NamedTypeSymbol) 29Debug.Assert(kind = SymbolKind.Method OrElse kind = SymbolKind.Property) 79kind As SymbolKind, 148Private Function GetBaseMemberMetadataName(name As String, kind As SymbolKind, container As NamedTypeSymbol) As String 189Private Function IsCandidateMember(member As Symbol, kind As SymbolKind) As Boolean
Symbols\Source\OverrideHidingHelper.vb (19)
131If sym1.Kind = SymbolKind.Property Then 149Case SymbolKind.Method 159Case SymbolKind.Property 248If member.Kind = SymbolKind.Event Then 283Case SymbolKind.Method 284If hidingMember.IsOverloads AndAlso hiddenMember.Kind = SymbolKind.Method Then 297Case SymbolKind.Property 298If hidingMember.IsOverloads AndAlso hiddenMember.Kind = SymbolKind.Property Then 358(member.Kind = SymbolKind.Method AndAlso DirectCast(member, MethodSymbol).IsUserDefinedOperator() <> DirectCast(hiddenMember, MethodSymbol).IsUserDefinedOperator()) OrElse 363If member.Kind = SymbolKind.NamedType AndAlso 364hiddenMember.Kind = SymbolKind.NamedType AndAlso 433(hidingMember.Kind = SymbolKind.Property OrElse hidingMember.Kind = SymbolKind.Method) AndAlso 492If sym.Kind <> SymbolKind.Method Then 513Case SymbolKind.Method 515Case SymbolKind.Property 517Case SymbolKind.Event 700If overridingSym.Kind = SymbolKind.Property Then 917member.Kind = SymbolKind.Property Then
Symbols\Source\RangeVariableSymbol.vb (2)
34Public Overrides ReadOnly Property Kind As SymbolKind 36Return SymbolKind.RangeVariable
Symbols\Source\SourceDeclareMethodSymbol.vb (1)
59OverloadingHelper.SetMetadataNameForAllOverloads(_name, SymbolKind.Method, m_containingType)
Symbols\Source\SourceFile.vb (1)
69Debug.Assert(Not memberImports.Any(Function(i) i.NamespaceOrType.Kind = SymbolKind.ErrorType))
Symbols\Source\SourceMemberContainerTypeSymbol.vb (28)
298If member.Kind <> SymbolKind.NamedType Then 443Case SymbolKind.Method 447Case SymbolKind.Property 451Case SymbolKind.Event 666Case SymbolKind.TypeParameter 811Case SymbolKind.ArrayType 820Case SymbolKind.NamedType 947Case SymbolKind.ErrorType 1151haveExtensionMethods = (sym.Kind = SymbolKind.Method AndAlso DirectCast(sym, MethodSymbol).IsExtensionMethod) 2278If member.Kind = SymbolKind.Property Then 2303If (member.Kind = SymbolKind.Property) Then 2367If fieldOrProperty.Kind = SymbolKind.Property Then 2406Case SymbolKind.Method 2412Case SymbolKind.Property 2442If (symbol.Kind = SymbolKind.Method AndAlso checkMethods) OrElse (symbol.IsPropertyAndNotWithEvents AndAlso checkProperties) Then 2465Case SymbolKind.Method 2476Case SymbolKind.Property 2776Debug.Assert(symbols.Where(Function(sym) sym.Kind = SymbolKind.Method AndAlso 2856If candidates.Count = 1 AndAlso candidates(0).Kind = SymbolKind.Event Then 3100ElseIf ((firstSymbol.Kind <> SymbolKind.Method) AndAlso (Not firstSymbol.IsPropertyAndNotWithEvents)) OrElse 3216If member.Kind = SymbolKind.Field Then 3339If Not (_containingSymbol.Kind = SymbolKind.Namespace AndAlso Me.AllowsExtensionMethods() AndAlso Me.AnyMemberHasAttributes) Then 3521For Each memberKind In {SymbolKind.Method, SymbolKind.Property} 3530If canDeclareOperators AndAlso memberKind = SymbolKind.Method AndAlso 3588If canDeclareOperators AndAlso memberKind = SymbolKind.Method AndAlso 3610If member.Kind <> SymbolKind.Method Then 3738If nextMember.Kind <> SymbolKind.Method Then
Symbols\Source\SourceMemberFieldSymbol.vb (1)
229(varType.Kind = SymbolKind.TypeParameter AndAlso varType.IsReferenceType)) Then
Symbols\Source\SourceMemberMethodSymbol.vb (2)
108OverloadingHelper.SetMetadataNameForAllOverloads(_name, SymbolKind.Method, m_containingType) 959If symbol.Kind = SymbolKind.Property Then
Symbols\Source\SourceMethodSymbol.vb (7)
1057container.FindMember(propertyIdentifier.ValueText, SymbolKind.Property, propertyIdentifier.Span, tree), 1088container.FindMember(eventIdentifier.ValueText, SymbolKind.Event, eventIdentifier.Span, tree), 1124Return container.FindMember(propertyIdentifier.ValueText, SymbolKind.Property, propertyIdentifier.Span, tree) 1128Return container.FindMember(eventIdentifier.ValueText, SymbolKind.Event, eventIdentifier.Span, tree) 1132Return container.FindMember(delegateIdentifier.ValueText, SymbolKind.NamedType, delegateIdentifier.Span, tree) 1136SymbolKind.Method, GetMethodLocationFromSyntax(syntax), tree), MethodSymbol) 1753If Me.IsAccessor() AndAlso Me.AssociatedSymbol.Kind = SymbolKind.Event Then
Symbols\Source\SourceModuleSymbol.vb (5)
312Case SymbolKind.Namespace 316Case SymbolKind.NamedType 1157Case SymbolKind.Property 1177Case SymbolKind.NamedType 1189Case SymbolKind.Namespace
Symbols\Source\SourceNamedTypeSymbol.vb (9)
81If containingSymbol.Kind = SymbolKind.Namespace AndAlso 94If containingSymbol.Kind = SymbolKind.NamedType Then 500Case SymbolKind.Namespace 507Case SymbolKind.NamedType 535If s.Kind = SymbolKind.Namespace Then 2236If ContainingSymbol.Kind = SymbolKind.Namespace AndAlso attrData.IsTargetAttribute(AttributeDescription.CaseInsensitiveExtensionAttribute) Then 2362If member.Kind = SymbolKind.Event AndAlso 2436If Not m.IsShared And m.Kind = SymbolKind.Field Then 2609If member.Kind = SymbolKind.Method Then
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (13)
101If m.Kind = SymbolKind.Method Then 374Dim memberKind As SymbolKind = member.Kind 378Case SymbolKind.Field, SymbolKind.NamedType 380Case SymbolKind.Method 392Case SymbolKind.Property 447Case SymbolKind.Event 450Case SymbolKind.Method 493If target.Kind <> SymbolKind.Property OrElse Not DirectCast(target, PropertySymbol).IsDefault Then 545Case SymbolKind.Method 564Case SymbolKind.Property 1326If attributeSource.Kind = SymbolKind.Method Then 1367If attributeSource.Kind = SymbolKind.Method Then
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (5)
213If current.Kind = SymbolKind.NamedType Then 228Case SymbolKind.Namespace, SymbolKind.NamedType 242Case SymbolKind.NamedType 262Case SymbolKind.Namespace
Symbols\Source\SourceParameterSymbol.vb (5)
186If containingSymbol.Kind = SymbolKind.Method AndAlso DirectCast(containingSymbol, MethodSymbol).MethodKind = MethodKind.DeclareMethod Then 203Case SymbolKind.Property 206Case SymbolKind.Method 450If container.Kind = SymbolKind.Method Then 495ContainingSymbol.Kind = SymbolKind.Method AndAlso
Symbols\Source\SourcePropertySymbol.vb (1)
415OverloadingHelper.SetMetadataNameForAllOverloads(_name, SymbolKind.Property, _containingType)
Symbols\SubstitutedNamedType.vb (10)
362Case SymbolKind.NamedType 365Case SymbolKind.Method 368Case SymbolKind.Property 375Case SymbolKind.Event 384Case SymbolKind.Field 445Case SymbolKind.NamedType 448Case SymbolKind.Method 482Case SymbolKind.Property 485Case SymbolKind.Event 488Case SymbolKind.Field
Symbols\SubstitutedTypeParameterSymbol.vb (1)
89Return If(_containingSymbol.Kind = SymbolKind.Method,
Symbols\Symbol.vb (30)
146Public MustOverride ReadOnly Property Kind As SymbolKind 208Case SymbolKind.Namespace 210Case SymbolKind.NamedType 251Case SymbolKind.ErrorType 253Case SymbolKind.Assembly 256Case SymbolKind.NetModule 592Case SymbolKind.Local 595Case SymbolKind.Label, 596SymbolKind.Alias 600Case SymbolKind.Namespace, 601SymbolKind.Field, 602SymbolKind.RangeVariable, 603SymbolKind.Property, 604SymbolKind.Event, 605SymbolKind.Parameter, 606SymbolKind.TypeParameter, 607SymbolKind.ErrorType, 608SymbolKind.Preprocessing 611Case SymbolKind.NamedType 617Case SymbolKind.Method 627Case SymbolKind.Assembly, SymbolKind.NetModule, SymbolKind.ArrayType 657If Me.Kind = SymbolKind.Method Then 735If Me.Kind = SymbolKind.Assembly Then 740Dim [module] = If(Me.Kind = SymbolKind.NetModule, Me, Me.ContainingModule) 997Case SymbolKind.Field 1000Case SymbolKind.Method 1003Case SymbolKind.Property 1319Private ReadOnly Property ISymbol_Kind As SymbolKind Implements ISymbol.Kind, ISymbolInternal.Kind
Symbols\Symbol_Attributes.vb (17)
61Case SymbolKind.Assembly 64Case SymbolKind.Event 67Case SymbolKind.Field 70Case SymbolKind.Method 91Case SymbolKind.Property 94Case SymbolKind.NamedType 119Case SymbolKind.NetModule 122Case SymbolKind.Parameter 125Case SymbolKind.TypeParameter 255Dim sourceAssembly = DirectCast(If(Me.Kind = SymbolKind.Assembly, Me, Me.ContainingAssembly), SourceAssemblySymbol) 519Debug.Assert(Me.Kind = SymbolKind.Method OrElse Me.Kind = SymbolKind.Property) 529Me.Kind = SymbolKind.Event AndAlso DirectCast(Me, SourceEventSymbol).AssociatedField IsNot Nothing Then 545If Me.Kind = SymbolKind.Method Then 587Case SymbolKind.Assembly, SymbolKind.NamedType, SymbolKind.Method
Symbols\SymbolExtensions.vb (43)
30Case SymbolKind.Namespace 33Case SymbolKind.NamedType 53Case SymbolKind.Field, SymbolKind.Local, SymbolKind.Parameter, SymbolKind.RangeVariable 56Case SymbolKind.Method 69Case SymbolKind.Property 76Case SymbolKind.Event 100If target.Kind = SymbolKind.Namespace Then 138If kind = SymbolKind.Method Then 140ElseIf kind <> SymbolKind.Property Then 165Case SymbolKind.Method 171Case SymbolKind.Property 196Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Method, SymbolKind.Event 209Case SymbolKind.Method, SymbolKind.Property, SymbolKind.Event 243Return symbol.Kind = SymbolKind.Method AndAlso IsAccessor(DirectCast(symbol, MethodSymbol)) 248Return symbol.Kind = SymbolKind.Property AndAlso DirectCast(symbol, PropertySymbol).IsWithEvents 257Return symbol.Kind = SymbolKind.Property AndAlso Not DirectCast(symbol, PropertySymbol).IsWithEvents 280Return this.Kind = SymbolKind.Method AndAlso DirectCast(this, MethodSymbol).IsReducedExtensionMethod 289Case SymbolKind.Method 291Case SymbolKind.Property 293Case SymbolKind.Event 306Case SymbolKind.Method 308Case SymbolKind.NamedType, SymbolKind.ErrorType 322Case SymbolKind.Method 324Case SymbolKind.Field 326Case SymbolKind.Property 328Case SymbolKind.Parameter 341Case SymbolKind.Method 343Case SymbolKind.Property 376Return symbol.Kind = SymbolKind.Method AndAlso DirectCast(symbol, MethodSymbol).IsUserDefinedOperator() 404Dim upperLevelType = If(symbol.Kind = SymbolKind.NamedType, DirectCast(symbol, NamedTypeSymbol), symbol.ContainingType) 456While If(member?.Kind = SymbolKind.Method, False) AndAlso DirectCast(member, MethodSymbol).MethodKind = MethodKind.AnonymousFunction 466Case SymbolKind.Method 469Case SymbolKind.Property 472Case SymbolKind.Event
Symbols\Tuples\TupleTypeSymbol.vb (16)
138Public Overrides ReadOnly Property Kind As SymbolKind 140Return SymbolKind.NamedType 661If member.Kind <> SymbolKind.Field Then 709Case SymbolKind.Method 714Case SymbolKind.Field 783Case SymbolKind.NamedType 786Case SymbolKind.Property 791Case SymbolKind.Event 889Dim kind As SymbolKind = symbol.Kind 891Case SymbolKind.[Event] 903Case SymbolKind.Field 909Case SymbolKind.Method 912Case SymbolKind.Property 950Debug.Assert(Not GetMembers().Any(Function(m) m.Kind = SymbolKind.NamedType)) 956Debug.Assert(Not GetMembers().Any(Function(m) m.Kind = SymbolKind.NamedType)) 962Debug.Assert(Not GetMembers().Any(Function(m) m.Kind = SymbolKind.NamedType))
Symbols\TypeParameterSymbol.vb (2)
140Public NotOverridable Overrides ReadOnly Property Kind As SymbolKind 142Return SymbolKind.TypeParameter
Symbols\TypeSubstitution.vb (7)
563(targetGenericDefinition.Kind = SymbolKind.Method AndAlso 566Debug.Assert((targetGenericDefinition.Kind = SymbolKind.Method AndAlso 569((targetGenericDefinition.Kind = SymbolKind.NamedType OrElse targetGenericDefinition.Kind = SymbolKind.ErrorType) AndAlso 596If memberDefinition.Kind = SymbolKind.Method Then 758If targetGenericDefinition.Kind = SymbolKind.Method Then 814If targetGenericDefinition.Kind = SymbolKind.Method Then
Symbols\TypeSymbol.vb (4)
378If Me.Kind <> SymbolKind.ErrorType Then 686Case SymbolKind.Method 692Case SymbolKind.Property 698Case SymbolKind.Event
Symbols\TypeSymbolExtensions.vb (12)
134Return type.Kind = SymbolKind.NamedType AndAlso DirectCast(type, NamedTypeSymbol).IsInterface 158Return type.Kind = SymbolKind.ErrorType 164Return type.Kind = SymbolKind.ArrayType 191type.Kind = SymbolKind.NamedType AndAlso 212type.Kind = SymbolKind.NamedType AndAlso 227Return type.Kind = SymbolKind.TypeParameter 371If this.Kind = SymbolKind.ArrayType Then 381While this.Kind = SymbolKind.ArrayType 490If this.Kind = SymbolKind.TypeParameter Then 497If this.Kind = SymbolKind.NamedType AndAlso Not DirectCast(this, NamedTypeSymbol).IsInterface Then 524If possiblyArrayType.Kind = SymbolKind.ArrayType Then 1234If container.Kind <> SymbolKind.Namespace Then
Symbols\UnboundGenericType.vb (1)
501If member.Kind = SymbolKind.NamedType Then
Symbols\WellKnownMembers.vb (19)
355If type.Kind <> SymbolKind.NamedType Then 427Dim targetSymbolKind As SymbolKind 434targetSymbolKind = SymbolKind.Method 439targetSymbolKind = SymbolKind.Method 442targetSymbolKind = SymbolKind.Method 446targetSymbolKind = SymbolKind.Field 449targetSymbolKind = SymbolKind.Property 467Case SymbolKind.Method 487Case SymbolKind.Property 499Case SymbolKind.Field 530If type.Kind <> SymbolKind.ArrayType Then 548If type.Kind <> SymbolKind.ArrayType Then 558If type.Kind <> SymbolKind.ArrayType Then 580If type.Kind <> SymbolKind.NamedType Then 599If type.Kind <> SymbolKind.NamedType Then 650If type.Kind <> SymbolKind.TypeParameter Then 656If typeParam.ContainingSymbol.Kind <> SymbolKind.Method Then 664If type.Kind <> SymbolKind.TypeParameter Then 670If typeParam.ContainingSymbol.Kind <> SymbolKind.NamedType Then
Utilities\TypeUnification.vb (8)
93Case SymbolKind.ArrayType 106Case SymbolKind.NamedType, SymbolKind.ErrorType 150Case SymbolKind.TypeParameter 241Case SymbolKind.ArrayType 243Case SymbolKind.NamedType, SymbolKind.ErrorType 257Case SymbolKind.TypeParameter
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (6)
452Case SymbolKind.Field, 453SymbolKind.Local, 454SymbolKind.Method, 455SymbolKind.Parameter, 456SymbolKind.Property, 457SymbolKind.RangeVariable
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\InvocationExpressionSyntaxExtensions.vb (2)
50Return symbol IsNot Nothing AndAlso symbol.MatchesKind(SymbolKind.Property, SymbolKind.Method) AndAlso Not symbol.IsAnonymousFunction
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (3)
283If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (2)
248If symbol?.Kind = SymbolKind.Field OrElse symbol?.Kind = SymbolKind.Property Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (16)
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicCommonGenerationServiceMethods.vb (2)
31Return symbol.Kind = SymbolKind.Namespace Or symbol.Kind = SymbolKind.NamedType Or AreSpecialOptionsActive(semanticModel)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (4)
206If symbol.IsKind(SymbolKind.Method) OrElse symbol.IsKind(SymbolKind.Property) OrElse symbol.IsKind(SymbolKind.Event) Then 215If modifiedIdentifierNode IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Field) AndAlso GetType(T) Is GetType(FieldDeclarationSyntax) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
49If Symbol IsNot Nothing AndAlso Symbol.Kind <> SymbolKind.Namespace AndAlso nsSymbol IsNot Nothing Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (2)
799Case SymbolKind.NamedType 801Case SymbolKind.Alias
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SymbolExtensions.vb (2)
12If symbol.Kind <> SymbolKind.Namespace OrElse symbol.Name <> "My" Then 24If symbol.Kind <> SymbolKind.Property OrElse symbol.Name <> "Forms" Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
43While underlyingNonArrayType.Kind = SymbolKind.ArrayType
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
614Case SymbolKind.Field 616Case SymbolKind.Local 986SemanticModel.GetSymbolInfo(identifier.Identifier).Symbol?.Kind = SymbolKind.Parameter Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\SymbolExtensions.vb (1)
15If symbol.IsKind(SymbolKind.Property) AndAlso symbol.IsImplicitlyDeclared Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
10982context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType) 11006context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitBufferManager.vb (1)
320If refAssemblyOrModule.MatchesKind(SymbolKind.Assembly) Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (85)
Attributes\AttributeTests_MarshalAs.vb (4)
27For Each typeSym As NamedTypeSymbol In c.GlobalNamespace.GetMembers().Where(Function(s) s.Kind = SymbolKind.NamedType) 28Dim fields = typeSym.GetMembers().Where(Function(s) s.Kind = SymbolKind.Field) 49For Each typeSym As NamedTypeSymbol In c.GlobalNamespace.GetMembers().Where(Function(s) s.Kind = SymbolKind.NamedType) 50Dim methods = typeSym.GetMembers().Where(Function(s) s.Kind = SymbolKind.Method)
Attributes\AttributeTests_Tuples.vb (7)
253Case SymbolKind.Method 257Case SymbolKind.Field 268Case SymbolKind.Method 272Case SymbolKind.NamedType 275Case SymbolKind.Field 277Case SymbolKind.Property 279Case SymbolKind.Event
CodeGen\CodeGenAsyncTests.vb (3)
6190Where member.Kind = SymbolKind.Field 9267Case SymbolKind.Method 9270Case SymbolKind.Field
CodeGen\CodeGenClosureLambdaTests.vb (1)
3497}, c.GetMembers().Where(Function(member) member.Kind = SymbolKind.NamedType).Select(Function(member) member.ToString()))
CodeGen\CodeGenScriptTests.vb (1)
245If symbol.Kind = SymbolKind.NamedType Then
CodeGen\CodeGenTuples.vb (34)
5750Assert.Equal(SymbolKind.ErrorType, mTuple.TupleUnderlyingType.Kind) 6893Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.TupleUnderlyingType.Kind) 6897Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 6927Assert.Equal(SymbolKind.NamedType, tuple.TupleUnderlyingType.Kind) 6930Assert.Equal(SymbolKind.NamedType, tuple.Kind) 6946Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.TupleUnderlyingType.Kind) 6950Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 6966Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.TupleUnderlyingType.Kind) 6970Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 6987Assert.Equal(SymbolKind.ErrorType, tupleWithSomeNames.TupleUnderlyingType.Kind) 6991Assert.Equal(SymbolKind.NamedType, tupleWithSomeNames.Kind) 7009Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7153Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7157Assert.Equal(SymbolKind.NamedType, types(0).Kind) 7158Assert.Equal(SymbolKind.ErrorType, types(1).Kind) 7249Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.TupleUnderlyingType.Kind) 7253Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7278Assert.Equal(SymbolKind.NamedType, tuple.TupleUnderlyingType.Kind) 7281Assert.Equal(SymbolKind.NamedType, tuple.Kind) 7296Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.TupleUnderlyingType.Kind) 7300Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7314Assert.Equal(SymbolKind.ErrorType, tupleWithoutNames.TupleUnderlyingType.Kind) 7318Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7334Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7435Assert.Equal(SymbolKind.NamedType, tupleWithoutNames.Kind) 7439Assert.Equal(SymbolKind.NamedType, types(0).Kind) 7440Assert.Equal(SymbolKind.ErrorType, types(1).Kind) 9040Assert.Equal(SymbolKind.Field, sym.Symbol.Kind) ' Incorrectly returns Local 9227Where m.Kind = SymbolKind.Field 9274Where m.Kind = SymbolKind.Field 15033Assert.Equal(SymbolKind.NamedType, m1Tuple.Kind) 15210If members1(i).Kind = SymbolKind.Method Then 15224ElseIf members1(i).Kind = SymbolKind.Property Then 16291Assert.Equal(SymbolKind.NamedType, m1Tuple.Kind)
CodeGen\CodeGenVBCore.vb (12)
2861Case SymbolKind.NamedType 2863Case SymbolKind.Namespace 3039Case SymbolKind.Field, 3040SymbolKind.Property 3042Case SymbolKind.Method 3053Case SymbolKind.NamedType 3165Case SymbolKind.Namespace 3180Case SymbolKind.NamedType 3183Where x.Kind <> SymbolKind.NamedType 3240Case SymbolKind.Namespace 3259Case SymbolKind.NamedType 3267Where x.Kind <> SymbolKind.NamedType
Emit\CompilationEmitTests.vb (22)
2572Case SymbolKind.Assembly 2575Case SymbolKind.NamedType 2578Case SymbolKind.Method 2621Public ParentKind As SymbolKind 2666.ParentKind = SymbolKind.NamedType, 2684.ParentKind = SymbolKind.NamedType, 2724.ParentKind = SymbolKind.Method, 2770.ParentKind = SymbolKind.NamedType, 2831.ParentKind = SymbolKind.Method, 2890.ParentKind = SymbolKind.NamedType, 2908.ParentKind = SymbolKind.NamedType, 2956.ParentKind = SymbolKind.Method, 2974.ParentKind = SymbolKind.Method, 3028.ParentKind = SymbolKind.Method, 3046.ParentKind = SymbolKind.Method, 3095.ParentKind = SymbolKind.NamedType, 3113.ParentKind = SymbolKind.NamedType, 3165.ParentKind = SymbolKind.Assembly, 3181.ParentKind = SymbolKind.Assembly, 3197.ParentKind = SymbolKind.NamedType, 3215.ParentKind = SymbolKind.Method, 3614.ParentKind = SymbolKind.NamedType,
Emit\EmitMetadata.vb (1)
178Where(Function(m) m.Kind = SymbolKind.Field).
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (12)
Binders\EENamedTypeBinder.vb (2)
63If symbol.Kind = SymbolKind.TypeParameter Then 67Debug.Assert(symbols(i).Kind = SymbolKind.TypeParameter)
CompilationContext.vb (6)
784If typeSymbol.Kind = SymbolKind.ErrorType Then 822If namespaceOrTypeSymbol.Kind = SymbolKind.ErrorType Then 853If namespaceOrTypeSymbol.Kind = SymbolKind.ErrorType Then 1018If member.Kind <> SymbolKind.Field Then 1205If member.Kind <> SymbolKind.Field Then 1232If member.Kind <> SymbolKind.Field Then
EvaluationContext.vb (1)
520If member.Kind <> SymbolKind.Field Then
SymbolExtensions.vb (1)
29While containingSymbol IsNot Nothing AndAlso containingSymbol.Kind <> SymbolKind.Namespace
Symbols\EETypeParameterSymbol.vb (2)
24Debug.Assert(container.Kind = SymbolKind.NamedType OrElse container.Kind = SymbolKind.Method)
Microsoft.CodeAnalysis.VisualBasic.Features (37)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
132If typeSymbol IsNot Nothing AndAlso typeSymbol.IsKind(SymbolKind.NamedType) AndAlso DirectCast(typeSymbol, ITypeSymbol).TypeKind = TypeKind.Delegate Then
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
370Any(Function(x) x.MatchesKind(SymbolKind.Event) AndAlso x.Name = handlesClauseItem.EventMember.Identifier.ValueText) Then
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (2)
352(symbol.Kind = SymbolKind.Method OrElse symbol.Kind = SymbolKind.Property) Then
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (2)
60If member.MatchesKind(SymbolKind.Field, SymbolKind.Property) AndAlso
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
241ElseIf symbol.Kind = SymbolKind.Method Then
Completion\CompletionProviders\EnumCompletionProvider.vb (3)
68If member.Kind = SymbolKind.Field AndAlso DirectCast(member, IFieldSymbol).IsConst AndAlso member.IsEditorBrowsable(options.MemberDisplayOptions.HideAdvancedMembers, syntaxContext.SemanticModel.Compilation) Then 105If symbol.Kind <> SymbolKind.Field Then 150If symbols(0).Symbol.Kind = SymbolKind.Field Then
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (2)
113If symbol.Kind = SymbolKind.Alias Then 292Return symbol.MatchesKind(SymbolKind.NamedType) AndAlso symbol.GetAllTypeArguments().Any()
Completion\CompletionProviders\OverrideCompletionProvider.vb (2)
172Dim filteredMembers = members.Where(Function(m) m.Kind = SymbolKind.Property) 184Return members.WhereAsArray(Function(m) Not m.IsKind(SymbolKind.Event))
Debugging\ProximityExpressionsGetter.vb (1)
81If info.Symbol.Kind = SymbolKind.Local Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (6)
794If oldSymbol.Kind = SymbolKind.Parameter Then 796ElseIf oldSymbol.Kind = SymbolKind.TypeParameter Then 1995Case SymbolKind.Method 2008Case SymbolKind.NamedType 2030Case SymbolKind.Method 2040Case SymbolKind.Field
ExtractMethod\Extensions.vb (2)
140Dim methodSymbols = model.GetSymbolInfo(invocation, cancellationToken).GetAllSymbols().Where(Function(s) s.Kind = SymbolKind.Method).Cast(Of IMethodSymbol)() 469Return type Is Nothing OrElse type.Kind = SymbolKind.ErrorType
GenerateType\VisualBasicGenerateTypeService.vb (4)
140Not leftSymbol.IsKind(SymbolKind.Namespace) OrElse 174If leftSymbol IsNot Nothing And leftSymbol.IsKind(SymbolKind.Namespace) Then 337If symbol IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Method) Then 365Return If(memberGroup.ElementAt(0).IsKind(SymbolKind.Method), DirectCast(memberGroup.ElementAt(0), IMethodSymbol), Nothing)
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (1)
170If method IsNot Nothing AndAlso method.ContainingSymbol.IsKind(SymbolKind.Method) Then
NavigationBar\VisualBasicNavigationBarItemService.vb (5)
162Where member.IsShared AndAlso member.Kind = Global.Microsoft.CodeAnalysis.SymbolKind.Field 270If symbol.Kind = SymbolKind.Method Then 282If symbol.Kind = SymbolKind.Property Then 287If symbol.Kind = SymbolKind.Event Then 291If symbol.Kind = SymbolKind.Field AndAlso Not symbol.IsImplicitlyDeclared Then
SignatureHelp\GenericNameSignatureHelpProvider.Method.vb (1)
31If result.Kind <> SymbolKind.NamedType OrElse Not DirectCast(result, INamedTypeSymbol).IsScriptClass Then
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (1)
87Dim allowedEvents = events.WhereAsArray(Function(s) s.Kind = SymbolKind.Event AndAlso Equals(s.ContainingType, containingType)).
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicCommonGenerationServiceMethods.vb (2)
31Return symbol.Kind = SymbolKind.Namespace Or symbol.Kind = SymbolKind.NamedType Or AreSpecialOptionsActive(semanticModel)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (465)
Binding\Binder_Expressions_Tests.vb (14)
2866Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind) 2880Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind) 2912Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind) 2926Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind) 3066Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3112Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3158Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3207Assert.Equal(SymbolKind.Field, symbol.Kind) 3261Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3309Assert.Equal(SymbolKind.Field, symbol.Kind) 3353Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3406Assert.Equal(SymbolKind.NamedType, symbol.Kind) 3452Assert.Equal(SymbolKind.Field, symbol.Kind) 3496Assert.Equal(SymbolKind.Field, symbol.Kind)
Binding\ImplicitVariableTests.vb (12)
889symbolKind:=SymbolKind.Local) 899symbolKind:=SymbolKind.Method) 921symbolKind:=SymbolKind.Method, 935symbolKind:=SymbolKind.Method, 1025Assert.Equal(SymbolKind.Local, l1.Kind) 1030Assert.Equal(SymbolKind.Local, l2.Kind) 1067Assert.Equal(SymbolKind.Local, l2.Kind) 1072Assert.Equal(SymbolKind.Local, l1.Kind) 1239Private Sub VerifySemanticInfo(semanticInfo As SemanticInfoSummary, expectedType As TypeSymbol, symbolKind? As SymbolKind, expectedSymbol As String) 1259Private Sub VerifySemanticInfoSummary(semanticInfo As SemanticInfoSummary, expectedType As TypeSymbol, symbolKind? As SymbolKind) 1280VerifySemanticInfoSummary(semanticInfo, objectSymbol, SymbolKind.Local) 1283Private Sub VerifyImplicitDeclarationBindExpression(code As XCData, expression As String, expectedTypeName As String, Optional symbolKind? As SymbolKind = Nothing, Optional expectedSymbol As String = Nothing)
Binding\MethodBodyBindingTests.vb (2)
338Assert.Equal(SymbolKind.Local, sym1.Kind) 343Assert.Equal(SymbolKind.Local, sym2.Kind)
Compilation\CompilationAPITests.vb (4)
1068Assert.Equal(smb.Kind, SymbolKind.Assembly) 1488Assert.Equal(CInt(SymbolKind.NamedType), CInt(tupleWithoutNames.Kind)) 1504Assert.Equal(SymbolKind.NamedType, tupleWithNames.Kind) 2577If children1(i).Kind = SymbolKind.Namespace Then
Compilation\MyTemplateTests.vb (1)
297Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind)
Compilation\SemanticModelAPITests.vb (38)
75Assert.Equal(SymbolKind.Local, syminfo.Symbol.Kind) 82Assert.Equal(SymbolKind.Local, syminfo.Symbol.Kind) 123Assert.Equal(SymbolKind.Local, infoP.Symbol.Kind) 163Assert.Equal(SymbolKind.Local, infoP.Symbol.Kind) 284Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 341Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 502Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind) 511Assert.Equal(SymbolKind.Method, speculativeSymbolInfo.Symbol.Kind) 543Assert.Equal(SymbolKind.NamedType, oldSymbol.Kind) 551Assert.Equal(SymbolKind.NamedType, newSymbol.Kind) 777Assert.Equal(SymbolKind.Local, local.Kind) 789Assert.Equal(SymbolKind.Local, argSymbolInfo.Symbol.Kind) 796Assert.Equal(SymbolKind.Local, argSymbolInfo.Symbol.Kind) 834Assert.Equal(SymbolKind.Local, local.Kind) 849Assert.Equal(SymbolKind.Local, local.Kind) 908Assert.Equal(SymbolKind.Local, local.Kind) 948Assert.Equal(SymbolKind.Label, label.Kind) 1018Assert.Equal(SymbolKind.Local, local.Kind) 1054Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind) 1094Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind) 1449Assert.Equal(SymbolKind.Local, local.Kind) 1461Assert.Equal(SymbolKind.Local, argSymbolInfo.Symbol.Kind) 1598Assert.Equal(SymbolKind.Local, local.Kind) 1614Assert.Equal(SymbolKind.Local, local.Kind) 1630Assert.Equal(SymbolKind.Local, local.Kind) 1635Assert.Equal(SymbolKind.Parameter, param.Kind) 1674Assert.Equal(SymbolKind.Label, label.Kind) 1714Private Shared Sub TestGetSpeculativeSemanticModelForTypeSyntax_Common(model As SemanticModel, position As Integer, speculatedTypeSyntax As TypeSyntax, bindingOption As SpeculativeBindingOption, expectedSymbolKind As SymbolKind, expectedTypeDisplayString As String) 1773speculatedTypeExpression, SpeculativeBindingOption.BindAsTypeOrNamespace, SymbolKind.Namespace, "System.Collections") 1793speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException") 1824speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException") 1829speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "N.I") 1865speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException") 1868speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException") 1871speculatedTypeExpression, SpeculativeBindingOption.BindAsExpression, SymbolKind.NamedType, "System.ArgumentException") 1918speculatedMemberName, SpeculativeBindingOption.BindAsExpression, SymbolKind.Method, "I.Method2") 4071Assert.Equal(SymbolKind.Local, getterSymbol.Kind) 4080Assert.Equal(SymbolKind.Property, setterSymbol.Kind)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (15)
484Assert.Equal(SymbolKind.Local, bindInfo1.Symbol.Kind) 530Assert.Equal(SymbolKind.Local, bindInfo1.Symbol.Kind) 1424Assert.Equal(SymbolKind.Parameter, symbol.Kind) 1523Assert.Equal(SymbolKind.ErrorType, aliasSymbol.Target.Kind) 2019Assert.Equal(SymbolKind.Field, varSymbol1.Kind) 2029Assert.Equal(SymbolKind.Field, varSymbol2.Kind) 2039Assert.Equal(SymbolKind.Field, varSymbol3.Kind) 2049Assert.Equal(SymbolKind.Field, varSymbol4.Kind) 2059Assert.Equal(SymbolKind.Field, varSymbol5.Kind) 2069Assert.Equal(SymbolKind.Parameter, varSymbol6.Kind) 2079Assert.Equal(SymbolKind.Local, varSymbol7.Kind) 2090Assert.Equal(SymbolKind.Local, varSymbol8.Kind) 2544Assert.Equal(SymbolKind.Parameter, symbol.Kind) 2861Assert.Equal(SymbolKind.Local, sym.Kind) 2868Assert.Equal(SymbolKind.Local, sym.Kind)
Compilation\SemanticModelLookupSymbolsAPITests.vb (1)
106Assert.Equal(SymbolKind.Local, syms(0).Kind)
DeclaringSyntaxNodeTests.vb (29)
80If symbol.Kind = SymbolKind.Namespace AndAlso DirectCast(symbol, NamespaceSymbol).IsGlobalNamespace Then 102Private Sub CheckDeclaringSyntax(Of TNode As VisualBasicSyntaxNode)(comp As VisualBasicCompilation, tree As SyntaxTree, name As String, kind As SymbolKind) 514If memb.Kind = SymbolKind.Method AndAlso (DirectCast(memb, MethodSymbol)).MethodKind = MethodKind.Constructor Then 545fld.AssociatedSymbol.Kind = SymbolKind.Event) Then 581fld.AssociatedSymbol.Kind = SymbolKind.Event) Then 597If memb.Kind = SymbolKind.Method Then 635CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc1", SymbolKind.Local) 636CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc2", SymbolKind.Local) 637CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc3", SymbolKind.Local) 638CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc4", SymbolKind.Local) 639CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc5", SymbolKind.Local) 640CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc6", SymbolKind.Local) 641CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc7", SymbolKind.Local) 643CheckDeclaringSyntax(Of ModifiedIdentifierSyntax)(comp, tree, "loc9", SymbolKind.Local) 667CheckDeclaringSyntax(Of LabelStatementSyntax)(comp, tree, "lab1", SymbolKind.Label) 668CheckDeclaringSyntax(Of LabelStatementSyntax)(comp, tree, "lab2", SymbolKind.Label) 669CheckDeclaringSyntax(Of LabelStatementSyntax)(comp, tree, "lab3", SymbolKind.Label) 689CheckDeclaringSyntax(Of SimpleImportsClauseSyntax)(comp, tree, "ConsoleAlias", SymbolKind.Alias) 690CheckDeclaringSyntax(Of SimpleImportsClauseSyntax)(comp, tree, "GooAlias", SymbolKind.Alias) 691CheckDeclaringSyntax(Of SimpleImportsClauseSyntax)(comp, tree, "ListOfIntAlias", SymbolKind.Alias) 715CheckDeclaringSyntax(Of CollectionRangeVariableSyntax)(comp, tree, "range1", SymbolKind.RangeVariable) 716CheckDeclaringSyntax(Of ExpressionRangeVariableSyntax)(comp, tree, "range2", SymbolKind.RangeVariable) 717CheckDeclaringSyntax(Of ExpressionRangeVariableSyntax)(comp, tree, "range3", SymbolKind.RangeVariable) 718CheckDeclaringSyntax(Of CollectionRangeVariableSyntax)(comp, tree, "range4", SymbolKind.RangeVariable) 719CheckDeclaringSyntax(Of CollectionRangeVariableSyntax)(comp, tree, "range5", SymbolKind.RangeVariable) 720CheckDeclaringSyntax(Of CollectionRangeVariableSyntax)(comp, tree, "range6", SymbolKind.RangeVariable) 721CheckDeclaringSyntax(Of ExpressionRangeVariableSyntax)(comp, tree, "range7", SymbolKind.RangeVariable) 722CheckDeclaringSyntax(Of CollectionRangeVariableSyntax)(comp, tree, "range8", SymbolKind.RangeVariable) 723CheckDeclaringSyntax(Of AggregationRangeVariableSyntax)(comp, tree, "range9", SymbolKind.RangeVariable)
Diagnostics\DiagnosticAnalyzerTests.vb (3)
312context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.NamedType) 506context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.Field) 1644Dim analyzers = New DiagnosticAnalyzer() {New SymbolStartAnalyzer(topLevelAction:=False, SymbolKind.NamedType)}
Diagnostics\GetDiagnosticsTests.vb (1)
729SymbolKind.NamedType)
ExtensionMethods\SemanticModelTests.vb (5)
60Assert.Equal(SymbolKind.Method, method.Kind) 128Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 188Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1343Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1392Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind)
FlowAnalysis\FlowTestBase.vb (3)
43Case SymbolKind.Method 46Case SymbolKind.NamedType 50Case SymbolKind.[Namespace]
Semantics\AnonymousTypesTests.vb (3)
1497Assert.Equal(SymbolKind.Parameter, symbol2.Kind) 1542Assert.Equal(SymbolKind.Parameter, symbol2.Kind) 1587Assert.Equal(SymbolKind.Parameter, symbol2.Kind)
Semantics\BinaryOperators.vb (1)
1107If m.Kind = SymbolKind.Method Then
Semantics\GetExtendedSemanticInfoTests.vb (209)
121Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 156Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 193Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 237Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 280Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 323Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 371Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 373Assert.Equal(SymbolKind.NamedType, sortedCandidates(1).Kind) 420Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 422Assert.Equal(SymbolKind.NamedType, sortedCandidates(1).Kind) 469Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 471Assert.Equal(SymbolKind.NamedType, sortedCandidates(1).Kind) 511Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 550Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 598Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 654Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 802Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 804Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 806Assert.Equal(SymbolKind.Method, sortedCandidates(2).Kind) 861Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 863Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 865Assert.Equal(SymbolKind.Method, sortedCandidates(2).Kind) 914Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 962Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 1008Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 1059Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 1110Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 1157Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1203Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1253Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 1297Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 1342Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 1422Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 1525Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1540Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1555Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1570Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 1587Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 1629Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 1673Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 1675Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 1716Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 1757Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 1855Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 1934Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 2119Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 2213Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 2255Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 2287Assert.Equal(SymbolKind.Alias, semanticInfo.Alias.Kind) 2330Assert.Equal(SymbolKind.Alias, semanticInfo.Alias.Kind) 2370Assert.Equal(SymbolKind.Alias, semanticInfo.Alias.Kind) 2409Assert.Equal(SymbolKind.Alias, semanticInfo.Alias.Kind) 2447Assert.Equal(SymbolKind.Alias, semanticInfo.Alias.Kind) 2478Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 2521Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 2602Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 2642Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 2644Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 2646Assert.Equal(SymbolKind.Method, sortedCandidates(2).Kind) 2648Assert.Equal(SymbolKind.Method, sortedCandidates(3).Kind) 2650Assert.Equal(SymbolKind.Method, sortedCandidates(4).Kind) 2652Assert.Equal(SymbolKind.Method, sortedCandidates(5).Kind) 2654Assert.Equal(SymbolKind.Method, sortedCandidates(6).Kind) 2656Assert.Equal(SymbolKind.Method, sortedCandidates(7).Kind) 2658Assert.Equal(SymbolKind.Method, sortedCandidates(8).Kind) 2660Assert.Equal(SymbolKind.Method, sortedCandidates(9).Kind) 2662Assert.Equal(SymbolKind.Method, sortedCandidates(10).Kind) 2664Assert.Equal(SymbolKind.Method, sortedCandidates(11).Kind) 2789Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 2837Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 2888Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 3149Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 3185Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 3478Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 3559Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 3618Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 3722Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 3803Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 3805Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 3807Assert.Equal(SymbolKind.Method, sortedCandidates(2).Kind) 3841Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 3843Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 3845Assert.Equal(SymbolKind.Method, sortedCandidates(2).Kind) 4024Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 4063Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 4101Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 4131Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4166Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 4199Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 4240Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 4278Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 4317Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 4351Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4390Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4426Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4465Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4504Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4540Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 4585Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 4587Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 4626Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 4661Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 4719Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 4721Assert.Equal(SymbolKind.Property, sortedCandidates(1).Kind) 4758Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 4800Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 4802Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 4843Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 4845Assert.Equal(SymbolKind.Method, sortedCandidates(1).Kind) 4874Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 4905Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 4937Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 4969Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 4996Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 5030Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 5102Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 5133Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 5165Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 5197Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 5242Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 5244Assert.Equal(SymbolKind.NamedType, sortedCandidates(1).Kind) 5288Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 5290Assert.Equal(SymbolKind.Field, sortedCandidates(1).Kind) 5316Assert.Equal(SymbolKind.Namespace, semanticInfo.Symbol.Kind) 5413Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 5444Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 5477Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 5744Assert.Equal(SymbolKind.ErrorType, semanticInfo.Type.Kind) 5780Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 5814Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 5865Assert.Equal(SymbolKind.Parameter, sortedCandidates(0).Kind) 5869Assert.Equal(SymbolKind.Parameter, sortedCandidates(1).Kind) 5975Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 6062Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 6107Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 6149Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 6189Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 6779Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 6854Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 6929Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 7004Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 7212Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 7254Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 7287Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 7328Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 7363Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 7409Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 7458Assert.Equal(SymbolKind.Local, semanticInfo1.Symbol.Kind) 7468Assert.Equal(SymbolKind.Local, semanticInfo2.Symbol.Kind) 7513Assert.Equal(SymbolKind.Local, semanticInfo1.Symbol.Kind) 7523Assert.Equal(SymbolKind.Local, semanticInfo2.Symbol.Kind) 7573Assert.Equal(SymbolKind.Local, semanticInfo1.Symbol.Kind) 7576Assert.Equal(SymbolKind.Method, semanticInfo1.Symbol.ContainingSymbol.Kind) 7589Assert.Equal(SymbolKind.Local, semanticInfo2.Symbol.Kind) 7592Assert.Equal(SymbolKind.Method, semanticInfo2.Symbol.ContainingSymbol.Kind) 7709Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 7745Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7816Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7820Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 7821Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 7855Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7859Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 7860Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 7894Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7898Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 7899Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 7933Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7937Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 7938Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 7972Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 7976Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 7977Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 8010Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 8014Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 8015Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 8048Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 8052Assert.Equal(SymbolKind.Alias, semanticSummary.Alias.Kind) 8053Assert.Equal(SymbolKind.NamedType, semanticSummary.Alias.Target.Kind) 8083Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 8127Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 8167Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8212Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8259Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8304Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8342Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 8400Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8442Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 8591Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 8709Assert.Equal(SymbolKind.Method, semanticSummary.CandidateSymbols(0).Kind) 9434Assert.Equal(SymbolKind.NamedType, sortedCandidates(0).Kind) 9510Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 9519Assert.Equal(SymbolKind.[Alias], aliasInfo.Kind) 9543Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 9554Assert.Equal(SymbolKind.[Alias], aliasInfo.Kind) 9578Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 9589Assert.Equal(SymbolKind.[Alias], aliasInfo.Kind) 9613Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 9624Assert.Equal(SymbolKind.[Alias], aliasInfo.Kind) 9648Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 9659Assert.Equal(SymbolKind.[Alias], aliasInfo.Kind) 9696Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 9736Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 9780Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 9823Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 9855Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 9889Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 9932Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 9974Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 10222Assert.Equal(SymbolKind.ErrorType, [alias].Target.Kind)
Semantics\GetSemanticInfoTests.vb (53)
224Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 272Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 317Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 367Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 719Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 768Assert.Equal(SymbolKind.Property, semanticInfo.Symbol.Kind) 804Assert.Equal(SymbolKind.Parameter, symbol.Kind) 806Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind) 841Assert.Equal(SymbolKind.Parameter, symbol.Kind) 843Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind) 876Assert.Equal(SymbolKind.Parameter, parameter.Kind) 878Assert.Equal(SymbolKind.Method, parameter.ContainingSymbol.Kind) 910Assert.Equal(SymbolKind.Parameter, symbol.Kind) 912Assert.Equal(SymbolKind.Method, symbol.ContainingSymbol.Kind) 947Assert.Equal(SymbolKind.Parameter, symbol.Kind) 978Assert.Equal(SymbolKind.Label, symbol.Kind) 986Assert.Equal(SymbolKind.Label, symbol.Kind) 993Assert.Equal(SymbolKind.Label, labelSymbol.Kind) 1023Assert.Equal(SymbolKind.Label, declaredSymbol.Kind) 1050Assert.Equal(SymbolKind.Label, declaredSymbol.Kind) 1080Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 1229Assert.Equal(SymbolKind.NamedType, symbol.Kind) 1238Assert.Equal(SymbolKind.NamedType, symbol.Kind) 1249Assert.Equal(SymbolKind.NamedType, symbol.Kind) 1504Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 1849Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind) 1883Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind) 1917Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind) 1955Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind) 2003Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind) 2053Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 2080Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 2093Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 2463Assert.Equal(SymbolKind.Property, speculativeSymbolInfo.Symbol.Kind) 2496Assert.Equal(SymbolKind.Property, speculativeSymbolInfo.Symbol.Kind) 2531Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 2573Assert.Equal(SymbolKind.Property, semanticSummary.Symbol.Kind) 2658Assert.Equal(SymbolKind.Property, semanticSummary.Symbol.Kind) 2744Assert.Equal(SymbolKind.Property, semanticSummary.Symbol.Kind) 2787Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 2835Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 2888Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 2949Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 3014Assert.Equal(SymbolKind.Property, semanticSummary.Symbol.Kind) 3176Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 3178Assert.Equal(SymbolKind.Property, sortedCandidates(1).Kind) 3236Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 3296Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 3328Assert.Equal(SymbolKind.Method, sym.Kind) 3352Assert.Equal(SymbolKind.Method, sym.Kind) 5610Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 6058Assert.Equal(SymbolKind.Property, sortedCandidates(0).Kind) 6060Assert.Equal(SymbolKind.Property, sortedCandidates(1).Kind)
Semantics\GotoTests.vb (8)
209Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 240Assert.Equal(SymbolKind.Label, semanticSummary0.Symbol.Kind) 249Assert.Equal(SymbolKind.Label, semanticSummary1.Symbol.Kind) 283Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 317Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 356Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 392Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind) 426Assert.Equal(SymbolKind.Label, semanticSummary.Symbol.Kind)
Semantics\LambdaSemanticInfoTests.vb (13)
43Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 75Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 109Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 141Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 216Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 251Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 286Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 324Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 359Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind) 398Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 438Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 539Assert.Equal(SymbolKind.Parameter, e.Kind) 724Assert.Equal(SymbolKind.Parameter, semanticInfo.Symbol.Kind)
Semantics\NameOfTests.vb (5)
140Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind) 1531Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind) 1869Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind) 2886Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind) 2951Assert.Equal(SymbolKind.ErrorType, typeInfo.Type.Kind)
Semantics\NativeIntegerTests.vb (1)
52Assert.Equal(SymbolKind.NamedType, type.Kind)
Semantics\NewOnInterfaceTests.vb (7)
1199Assert.Equal(SymbolKind.NamedType, semanticInfo.Symbol.Kind) 1237Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 1241Assert.Equal(SymbolKind.NamedType, semanticInfo.Type.Kind) 1245Assert.Equal(SymbolKind.NamedType, semanticInfo.Type.Kind) 1281Assert.Equal(SymbolKind.Local, semanticInfo.Symbol.Kind) 1285Assert.Equal(SymbolKind.NamedType, semanticInfo.Type.Kind) 1289Assert.Equal(SymbolKind.NamedType, semanticInfo.Type.Kind)
Semantics\NonTrailingNamedArgumentsTests.vb (2)
73Assert.Equal(SymbolKind.Parameter, firstASymbol.Symbol.Kind) 85Assert.Equal(SymbolKind.Parameter, secondASymbol.Symbol.Kind)
Semantics\OptionalArgumentTests.vb (1)
1063Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind)
Semantics\QueryExpressions_SemanticModel.vb (1)
3367Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind)
Semantics\RefFieldTests.vb (1)
167Dim fieldMembers = containingType.GetMembers().WhereAsArray(Function(m) m.Kind = SymbolKind.Field)
Semantics\SelectCaseTests.vb (11)
104Assert.Equal(SymbolKind.Local, semanticSummary.Symbol.Kind) 143Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 180Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 214Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 288Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 328Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 367Assert.Equal(SymbolKind.Method, sortedCandidates(0).Kind) 497Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 580Assert.Equal(SymbolKind.Local, semanticSummary.Symbol.Kind) 737Assert.Equal(SymbolKind.Parameter, symbolInfo.Symbol.Kind) 774Assert.Equal(SymbolKind.Parameter, symbolInfo.Symbol.Kind)
Semantics\SyncLockTests.vb (2)
246Assert.Equal(SymbolKind.Method, semanticSummary.Symbol.Kind) 477Assert.Equal(SymbolKind.Parameter, semanticSummary.Symbol.Kind)
Semantics\TypeOfTests.vb (2)
751Assert.Equal(SymbolKind.Alias, aliasSymbol.Kind) 767Assert.Equal(SymbolKind.Local, symbolInfo.Symbol.Kind)
Semantics\UsingStatementTest.vb (4)
327Assert.Equal(SymbolKind.Local, symbol.Kind) 344If (type.Symbol.Kind = SymbolKind.Method) Then 357ElseIf (type.Symbol.Kind = SymbolKind.Field) Then 377Assert.Equal(SymbolKind.Local, ActualSymbol.Kind)
Semantics\VariableTypeInference.vb (1)
709Assert.Equal(SymbolKind.Local, varSymbol.Kind)
Semantics\WithBlockSemanticModelTests.vb (12)
48Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind) 75Assert.Equal(SymbolKind.Method, semanticInfo.Symbol.Kind) 111Assert.Equal(SymbolKind.Property, speculativeSymbolInfo.Symbol.Kind) 366Assert.Equal(SymbolKind.Parameter, symbolInfo1.Symbol.Kind) 370Assert.Equal(SymbolKind.Parameter, symbolInfo2.Symbol.Kind) 412Assert.Equal(SymbolKind.Parameter, symbolInfo1.Symbol.Kind) 416Assert.Equal(SymbolKind.Parameter, symbolInfo2.Symbol.Kind) 464Assert.Equal(SymbolKind.Parameter, symbolInfo1.Symbol.Kind) 468Assert.Equal(SymbolKind.Parameter, symbolInfo2.Symbol.Kind) 472Assert.Equal(SymbolKind.Parameter, symbolInfo3.Symbol.Kind) 521Assert.Equal(SymbolKind.Property, symbolInfo1.Symbol.Kind) 525Assert.Equal(SymbolKind.Property, symbolInfo2.Symbol.Kind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (496)
DocumentationComments\DocCommentTests.vb (72)
5010Assert.Equal(SymbolKind.TypeParameter, typeParamSymInfo.CandidateSymbols.Single().Kind) 6688SymbolKind.Method), 6702SymbolKind.Method)) 6708SymbolKind.Method), 6734SymbolKind.NamedType, SymbolKind.TypeParameter), 6741SymbolKind.NamedType, SymbolKind.TypeParameter), 6748SymbolKind.NamedType, SymbolKind.TypeParameter)) 6760SymbolKind.NamedType, SymbolKind.TypeParameter), 6767SymbolKind.NamedType, SymbolKind.TypeParameter), 6774SymbolKind.NamedType, SymbolKind.TypeParameter)) 6875Assert.Equal(SymbolKind.NamedType, type.Kind) 6954Assert.Equal(SymbolKind.Method, method.Kind) 6990SymbolKind.Parameter), 6995SymbolKind.Parameter), 7000SymbolKind.Parameter), 7005SymbolKind.TypeParameter)) 7009SymbolKind.Parameter)) 7013SymbolKind.Parameter)) 7017SymbolKind.Parameter)) 7049SymbolKind.Parameter), 7054SymbolKind.Parameter), 7059SymbolKind.Parameter), 7064SymbolKind.TypeParameter)) 7068SymbolKind.Parameter)) 7072SymbolKind.Parameter)) 7076SymbolKind.Parameter)) 7108SymbolKind.TypeParameter), 7113SymbolKind.TypeParameter), 7118SymbolKind.TypeParameter), 7123SymbolKind.Parameter)) 7127SymbolKind.TypeParameter), 7132SymbolKind.TypeParameter), 7137SymbolKind.TypeParameter), 7170SymbolKind.TypeParameter), 7175SymbolKind.TypeParameter), 7180SymbolKind.TypeParameter), 7185SymbolKind.Parameter)) 7189SymbolKind.TypeParameter), 7194SymbolKind.TypeParameter), 7199SymbolKind.TypeParameter), 7232SymbolKind.TypeParameter, SymbolKind.Parameter), 7237SymbolKind.TypeParameter, SymbolKind.Parameter), 7242SymbolKind.TypeParameter, SymbolKind.Parameter), 7247SymbolKind.TypeParameter, SymbolKind.Parameter), 7252SymbolKind.TypeParameter, SymbolKind.Parameter), 7257SymbolKind.TypeParameter, SymbolKind.Parameter), 7299text.IndexOf("name=""X""", StringComparison.Ordinal) + 6), SymbolKind.Field, SymbolKind.Parameter), 7305text.IndexOf("cref=""X""", StringComparison.Ordinal) + 6), SymbolKind.Field, SymbolKind.Parameter), 7347text.IndexOf("name=""X""", StringComparison.Ordinal) + 6), SymbolKind.Field, SymbolKind.TypeParameter), 7353text.IndexOf("cref=""X""", StringComparison.Ordinal) + 6), SymbolKind.Field, SymbolKind.TypeParameter), 7388text.IndexOf("Of Integer", StringComparison.Ordinal) + 3), SymbolKind.Field), 7395name:="Int32"), SymbolKind.NamedType) 7404container:=DirectCast(symInteger(0), NamedTypeSymbol)), SymbolKind.Method), 11941Private Shared Function FilterOfSymbolKindOnly(symbols As ImmutableArray(Of ISymbol), ParamArray kinds() As SymbolKind) As ImmutableArray(Of ISymbol) 11942Dim filter As New HashSet(Of SymbolKind)(kinds) 11968If actual.Symbol IsNot Nothing AndAlso actual.Symbol.Kind = SymbolKind.TypeParameter Then ' Works everywhere since we want it to work in name attributes.
SymbolDisplay\SymbolDisplayTests.vb (1)
5359Dim indexer = type.GetMembers().Where(Function(m) m.Kind = SymbolKind.Property AndAlso DirectCast(m, IPropertySymbol).IsIndexer).Single()
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (5)
158If member.Kind = SymbolKind.Property Then 434If member.Kind = If(isType, SymbolKind.Property, SymbolKind.Parameter) Then 1241Assert.Equal(SymbolKind.RangeVariable, querySymbol.Kind) 1245Assert.Equal(SymbolKind.RangeVariable, querySymbol.Kind)
SymbolsTests\AssemblyAndNamespaceTests.vb (12)
46Assert.Equal(SymbolKind.Assembly, sym.Kind) 74Assert.Equal(SymbolKind.NetModule, sym.Kind) 109Assert.Equal(SymbolKind.NamedType, sym1.Kind) 209Assert.Equal(SymbolKind.Namespace, globalNS.Kind) 227Assert.Equal(SymbolKind.Namespace, nsA.Kind) 232Assert.Equal(SymbolKind.Namespace, nsB.Kind) 237Assert.Equal(SymbolKind.Namespace, nsD.Kind) 273Assert.Equal(SymbolKind.Namespace, globalNS.Kind) 279Assert.Equal(SymbolKind.Namespace, nsGoo.Kind) 285Assert.Equal(SymbolKind.Namespace, nsBar.Kind) 303Assert.Equal(SymbolKind.Namespace, nsA.Kind) 308Assert.Equal(SymbolKind.Namespace, nsB.Kind)
SymbolsTests\CompilationCreationTests.vb (117)
100Assert.Equal(type.Kind, SymbolKind.ErrorType) ' Not available 102Assert.NotEqual(type.Kind, SymbolKind.ErrorType) 273Assert.Equal(SymbolKind.ErrorType, asm1(1).GlobalNamespace.GetTypeMembers("Class4").Single().GetMembers("Foo").OfType(Of MethodSymbol)().Single().ReturnType.Kind) 291Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 317Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 332Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 335Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 338Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 361Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 380Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 383Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 386Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 396Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 399Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 402Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 405Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 408Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 446Assert.Equal(SymbolKind.ErrorType, retval15.Kind) 448Assert.Equal(SymbolKind.ErrorType, retval16.Kind) 450Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 460Assert.Equal(SymbolKind.ErrorType, retval18.Kind) 462Assert.Equal(SymbolKind.ErrorType, retval19.Kind) 464Assert.Equal(SymbolKind.ErrorType, retval20.Kind) 466Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 469Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 513Assert.Equal(SymbolKind.ErrorType, asm1(1).GlobalNamespace.GetTypeMembers("Class4").Single().GetMembers("Foo").OfType(Of MethodSymbol)().Single().ReturnType.Kind) 522Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 537Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 552Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 555Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 558Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 570Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 589Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 592Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 595Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 605Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 608Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 611Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 614Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 617Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 631Assert.Equal(SymbolKind.ErrorType, retval15.Kind) 633Assert.Equal(SymbolKind.ErrorType, retval16.Kind) 635Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 645Assert.Equal(SymbolKind.ErrorType, retval18.Kind) 647Assert.Equal(SymbolKind.ErrorType, retval19.Kind) 649Assert.Equal(SymbolKind.ErrorType, retval20.Kind) 651Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 654Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 701Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 754Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 769Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 772Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 775Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 853Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 872Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 875Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 878Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 888Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 891Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 894Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 897Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 900Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 929Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 945Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 948Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 990Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 1009Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 1024Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 1027Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 1030Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 1046Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 1065Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 1068Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 1071Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 1081Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 1084Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 1087Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 1090Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 1093Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 1116Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 1132Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 1135Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 1171Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 1212Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 1228Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 1231Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 1234Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 1278Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 1297Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 1300Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 1303Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 1313Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 1316Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 1319Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 1322Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 1325Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 1381Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 1397Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 1400Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 1457Assert.NotEqual(SymbolKind.ErrorType, retval1.Kind) 1476Assert.NotEqual(SymbolKind.ErrorType, retval2.Kind) 1491Assert.NotEqual(SymbolKind.ErrorType, retval3.Kind) 1494Assert.NotEqual(SymbolKind.ErrorType, retval4.Kind) 1497Assert.NotEqual(SymbolKind.ErrorType, retval5.Kind) 1513Assert.NotEqual(SymbolKind.ErrorType, retval6.Kind) 1532Assert.NotEqual(SymbolKind.ErrorType, retval7.Kind) 1535Assert.NotEqual(SymbolKind.ErrorType, retval8.Kind) 1538Assert.NotEqual(SymbolKind.ErrorType, retval9.Kind) 1548Assert.NotEqual(SymbolKind.ErrorType, retval10.Kind) 1551Assert.NotEqual(SymbolKind.ErrorType, retval11.Kind) 1554Assert.NotEqual(SymbolKind.ErrorType, retval12.Kind) 1557Assert.NotEqual(SymbolKind.ErrorType, retval13.Kind) 1560Assert.NotEqual(SymbolKind.ErrorType, retval14.Kind) 1587Assert.NotEqual(SymbolKind.ErrorType, retval17.Kind) 1603Assert.NotEqual(SymbolKind.ErrorType, retval21.Kind) 1606Assert.NotEqual(SymbolKind.ErrorType, retval22.Kind) 1966Assert.NotEqual(SymbolKind.ErrorType, typeC5.Kind)
SymbolsTests\Metadata\MetadataMemberTests.vb (16)
157Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 167Assert.Equal(SymbolKind.Method, ctor.Kind) 199Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 212Assert.Equal(SymbolKind.Method, member1.Kind) 255Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 273Assert.Equal(SymbolKind.Parameter, p1.Kind) 318Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 328Assert.Equal(SymbolKind.Method, member1.Kind) 371Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 384Assert.Equal(SymbolKind.Parameter, p2.Kind) 636Assert.Equal(SymbolKind.Field, symbol.Kind) 645Assert.Equal(SymbolKind.Field, symbol.Kind) 654Assert.Equal(SymbolKind.Field, symbol.Kind) 663Assert.Equal(SymbolKind.Field, symbol.Kind) 672Assert.Equal(SymbolKind.Field, symbol.Kind) 727Dim mems = tsym.GetMembers().Where(Function(s) s.Kind = SymbolKind.Method)
SymbolsTests\Metadata\MetadataTypeTests.vb (14)
32Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 44Assert.Equal(SymbolKind.Namespace, ns.Kind) 103Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 120Assert.Equal(SymbolKind.NamedType, class1.Kind) 157Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 173Assert.Equal(SymbolKind.NamedType, type1.Kind) 212Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 228Assert.Equal(SymbolKind.NamedType, type1.Kind) 266Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 281Assert.Equal(SymbolKind.NamedType, type1.Kind) 318Assert.Equal(SymbolKind.Assembly, mscorNS.Kind) 331Assert.Equal(SymbolKind.ArrayType, type2.Kind) 332Assert.Equal(SymbolKind.ArrayType, type3.Kind) 1190If member.Kind <> SymbolKind.Namespace Then
SymbolsTests\Metadata\PE\BaseTypeResolution.vb (9)
191Assert.NotEqual(SymbolKind.ErrorType, base.Kind) 209Assert.NotEqual(SymbolKind.ErrorType, base1.Kind) 215Assert.NotEqual(SymbolKind.ErrorType, base2.Kind) 221Assert.NotEqual(SymbolKind.ErrorType, base3.Kind) 227Assert.NotEqual(SymbolKind.ErrorType, base4.Kind) 233Assert.NotEqual(SymbolKind.ErrorType, base5.Kind) 239Assert.NotEqual(SymbolKind.ErrorType, base6.Kind) 246Assert.NotEqual(SymbolKind.ErrorType, base7.Kind) 252Assert.NotEqual(SymbolKind.ErrorType, base8.Kind)
SymbolsTests\Metadata\PE\LoadingEvents.vb (4)
87Assert.Equal(SymbolKind.[Event], instanceEvent.Kind) 95Assert.Equal(SymbolKind.[Event], staticEvent.Kind) 236Dim outerInterfaceEvent = outerInterface.GetMembers().Where(Function(m) m.Kind = SymbolKind.[Event]).Single() 243Dim innerInterfaceEvent = innerInterface.GetMembers().Where(Function(m) m.Kind = SymbolKind.[Event]).Single()
SymbolsTests\Metadata\PE\LoadingFields.vb (1)
48Assert.Equal(SymbolKind.Field, f1.Kind)
SymbolsTests\Metadata\PE\LoadingGenericTypeParameters.vb (1)
71Assert.Equal(SymbolKind.TypeParameter, C1_T.Kind)
SymbolsTests\Metadata\PE\LoadingMethods.vb (4)
67Assert.Equal(SymbolKind.Parameter, m1_1.Kind) 92Assert.Equal(SymbolKind.NamedType, C108.Kind) 97Assert.Equal(SymbolKind.Method, sameName(0).Kind) 99Assert.Equal(SymbolKind.NamedType, sameName(1).Kind)
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (15)
42Assert.Equal(SymbolKind.ErrorType, base.Kind) 59Assert.Equal(SymbolKind.ErrorType, base.Kind) 97Assert.Equal(SymbolKind.ErrorType, base.Kind) 108Assert.Equal(SymbolKind.ErrorType, base.ContainingSymbol.Kind) 113Assert.Equal(SymbolKind.ErrorType, baseContainerContainer.Kind) 129Assert.Equal(SymbolKind.ErrorType, base.Kind) 144Assert.Equal(SymbolKind.ErrorType, base.Kind) 159Assert.Equal(SymbolKind.ErrorType, base.Kind) 172Assert.Equal(SymbolKind.ErrorType, genericBase.Kind) 176Assert.Equal(SymbolKind.ErrorType, base.Kind) 209Assert.Equal(SymbolKind.NamedType, genericBase.ContainingSymbol.Kind) 212Assert.Equal(SymbolKind.ErrorType, base.Kind) 229Assert.Equal(SymbolKind.ErrorType, genericBase.ContainingSymbol.Kind) 234Assert.Equal(SymbolKind.ErrorType, base.Kind) 260Assert.Equal(SymbolKind.ErrorType, base.Kind)
SymbolsTests\Metadata\PE\NoPia.vb (63)
107Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 114Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 143Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 150Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 153Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 155Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 171Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 173Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 176Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 178Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 196Assert.NotEqual(SymbolKind.ErrorType, param(0).[Type].Kind) 197Assert.NotEqual(SymbolKind.ErrorType, param(1).[Type].Kind) 199Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 201Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 222Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 228Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 407Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 414Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 417Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 424Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 442Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 444Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 447Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 449Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 470Assert.NotEqual(SymbolKind.ErrorType, param(0).[Type].Kind) 471Assert.NotEqual(SymbolKind.ErrorType, param(1).[Type].Kind) 476Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 478Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 499Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 504Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 558Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 559Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 560Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test3").ReturnType.Kind) 563Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind) 567Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 568Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 570Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind) 600Assert.NotEqual(SymbolKind.ErrorType, varI5_2.GetMember(Of MethodSymbol)("Foo").ReturnType.Kind) 609Assert.NotEqual(SymbolKind.ErrorType, varI7_3.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 619Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMember(Of MethodSymbol)("Foo").ReturnType.Kind) 620Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 654Assert.NotEqual(SymbolKind.ErrorType, varI7_7.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 775Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 776Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 777Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test3").ReturnType.Kind) 781Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind) 785Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 786Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 788Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind) 877Assert.NotEqual(SymbolKind.ErrorType, varI5_2.GetMember(Of MethodSymbol)("Foo").ReturnType.Kind) 887Assert.NotEqual(SymbolKind.ErrorType, varI7_3.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 898Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMember(Of MethodSymbol)("Foo").ReturnType.Kind) 899Assert.NotEqual(SymbolKind.ErrorType, varI7_4.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 933Assert.NotEqual(SymbolKind.ErrorType, varI7_7.GetMember(Of MethodSymbol)("Bar").ReturnType.Kind) 944Assert.NotEqual(SymbolKind.ErrorType, varI5.Kind) 945Assert.NotEqual(SymbolKind.ErrorType, varI6.Kind) 946Assert.NotEqual(SymbolKind.ErrorType, varI5_Foo.ReturnType.Kind) 947Assert.NotEqual(SymbolKind.ErrorType, (DirectCast(varI5_Foo.ReturnType, NamedTypeSymbol)).TypeArguments(0).Kind) 952Assert.NotEqual(SymbolKind.ErrorType, varI7_Foo.ReturnType.Kind) 953Assert.NotEqual(SymbolKind.ErrorType, (DirectCast(varI7_Foo.ReturnType, NamedTypeSymbol)).TypeArguments(0).Kind) 955Assert.NotEqual(SymbolKind.ErrorType, varI7_Bar.ReturnType.Kind) 956Assert.NotEqual(SymbolKind.ErrorType, (DirectCast(varI7_Bar.ReturnType, NamedTypeSymbol)).TypeArguments(0).Kind) 959Assert.NotEqual(SymbolKind.ErrorType, varI1.Kind)
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (32)
34Assert.Equal(SymbolKind.ErrorType, localField.[Type].BaseType.Kind) 50Assert.Equal(SymbolKind.ErrorType, importedField.[Type].Kind) 66Assert.Equal(SymbolKind.ErrorType, importedField.[Type].Kind) 83Assert.Equal(SymbolKind.NamedType, importedField.Type.Kind) 86Assert.Equal(SymbolKind.NamedType, outer.Kind) 89Assert.Equal(SymbolKind.ErrorType, inner.Kind) 103Assert.Equal(SymbolKind.NamedType, var1.[Type].Kind) 120Assert.Equal(SymbolKind.ErrorType, m.Parameters.[Where](Function(arg) arg.Name = "c1").[Select](Function(arg) arg).[Single]().[Type].BaseType.Kind) 124Assert.Equal(SymbolKind.ErrorType, m.ReturnType.BaseType.Kind) 141Assert.Equal(SymbolKind.NamedType, var1.[Type].Kind) 157Assert.Equal(SymbolKind.ErrorType, importedProperty.Parameters.Where(Function(arg) arg.Name = "x").Single().Type.Kind) 173Assert.Equal(SymbolKind.ErrorType, importedProperty.Type.Kind) 189Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.[Where](Function(arg) arg.Name = "x").[Select](Function(arg) arg).[Single]().[Type].Kind) 205Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.[Where](Function(arg) arg.Name = "x").[Select](Function(arg) arg).[Single]().[Type].Kind) 221Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.[Where](Function(arg) arg.Name = "x").[Select](Function(arg) arg).[Single]().[Type].Kind) 237Assert.Equal(SymbolKind.ErrorType, importedMethod.ReturnType.Kind) 253Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.[Where](Function(arg) arg.Name = "x").[Select](Function(arg) arg).[Single]().[Type].Kind) 269Assert.Equal(SymbolKind.ErrorType, importedMethod.Parameters.[Where](Function(arg) arg.Name = "x").[Single]().[Type].Kind) 283Assert.Equal(SymbolKind.ErrorType, importedField.[Type].Kind) 296Assert.Equal(SymbolKind.NamedType, var1.[Type].Kind) 297Assert.Equal(SymbolKind.ErrorType, var1.DelegateParameters.First().Type.Kind) 309Assert.Equal(SymbolKind.NamedType, var1.[Type].Kind) 325Assert.Equal(SymbolKind.ErrorType, localField.[Type].BaseType.Kind) 342Assert.Equal(SymbolKind.NamedType, localField.[Type].Kind) 370Assert.Equal(SymbolKind.Parameter, m.Parameters.[Where](Function(arg) arg.Name = "c1").[Select](Function(arg) arg).[Single]().Kind) 375Assert.Equal(SymbolKind.NamedType, m.ReturnType.Kind) 391Assert.Equal(SymbolKind.NamedType, classLocalType.Kind) 408Assert.Equal(SymbolKind.ArrayType, localField.Type.Kind) 409Assert.Equal(SymbolKind.ErrorType, DirectCast(localField.Type, ArrayTypeSymbol).ElementType.Kind) 419Assert.Equal(SymbolKind.ArrayType, localField.[Type].Kind) 430Assert.Equal(SymbolKind.ErrorType, localMethod.ReturnType.Kind) 483Assert.Equal(SymbolKind.ErrorType, m.ReturnType.Kind)
SymbolsTests\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.vb (1)
288Assert.Equal(SymbolKind.NamedType, embeddedType.ReturnType.Kind)
SymbolsTests\Metadata\PE\TypeAccessibility.vb (6)
29Where n.Kind = SymbolKind.Namespace AndAlso n.Name.Equals("System")). 62Where t.Kind = SymbolKind.Namespace AndAlso t.Name.Equals("Runtime")). 66Where t.Kind = SymbolKind.Namespace AndAlso t.Name.Equals("Remoting")). 70Where t.Kind = SymbolKind.Namespace AndAlso t.Name.Equals("Messaging")). 82Where t.Kind = SymbolKind.Namespace AndAlso t.Name.Equals("Security")). 86Where t.Kind = SymbolKind.Namespace AndAlso t.Name.Equals("AccessControl")).
SymbolsTests\Metadata\WinMdEventTest.vb (2)
1467Assert.Equal(SymbolKind.Local, symbol.Kind) 1701Assert.Equal(SymbolKind.Field, symbol.Kind)
SymbolsTests\MockSymbolTests.vb (2)
25Assert.Equal(SymbolKind.ArrayType, ats1.Kind) 33Assert.Equal(SymbolKind.ArrayType, ats2.Kind)
SymbolsTests\Retargeting\NoPia.vb (27)
397Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 405Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 430Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 437Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 440Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 442Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 457Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 459Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 462Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 464Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 481Assert.NotEqual(SymbolKind.ErrorType, param(0).[Type].Kind) 482Assert.NotEqual(SymbolKind.ErrorType, param(1).[Type].Kind) 484Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 486Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 505Assert.Equal(SymbolKind.ErrorType, param(0).[Type].Kind) 510Assert.Equal(SymbolKind.ErrorType, param(1).[Type].Kind) 620Assert.Equal(SymbolKind.ErrorType, assemblies1(0).GlobalNamespace.GetMember(Of MethodSymbol)("C.Test1").ReturnType.Kind) 623Assert.Equal(SymbolKind.ErrorType, assemblies2(0).GlobalNamespace.GetMember(Of MethodSymbol)("C.Test1").ReturnType.Kind) 652Assert.Equal(SymbolKind.ErrorType, assemblies1(0).GlobalNamespace.GetMember(Of MethodSymbol)("C.Test1").ReturnType.Kind) 655Assert.Equal(SymbolKind.ErrorType, assemblies2(0).GlobalNamespace.GetMember(Of MethodSymbol)("C.Test1").ReturnType.Kind) 1045Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 1046Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 1047Assert.Equal(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test3").ReturnType.Kind) 1050Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind) 1058Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test1").ReturnType.Kind) 1059Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test2").ReturnType.Kind) 1061Assert.NotEqual(SymbolKind.ErrorType, localTypes3.GetMember(Of MethodSymbol)("Test4").ReturnType.Kind)
SymbolsTests\Retargeting\RetargetingTests.vb (2)
161ElseIf aAssociated.Kind = SymbolKind.Property Then 2194Assert.Equal(SymbolKind.Event, RetargetEventItem.Kind)
SymbolsTests\Source\BaseClassTests.vb (2)
2077Assert.Equal(SymbolKind.ErrorType, x.BaseType.Kind) 2078Assert.Equal(SymbolKind.ErrorType, y.BaseType.Kind)
SymbolsTests\Source\BindingsTests.vb (6)
480Assert.Equal(SymbolKind.NamedType, symbol.Kind) 491Assert.Equal(SymbolKind.NamedType, symbol.Kind) 507Assert.Equal(SymbolKind.NamedType, sortedSymbols(0).Kind) 510Assert.Equal(SymbolKind.NamedType, sortedSymbols(1).Kind) 523Assert.Equal(SymbolKind.NamedType, symbols(0).Kind) 680Assert.Equal(SymbolKind.NamedType, info.Type.Kind)
SymbolsTests\Source\ComClassTests.vb (7)
29m.Kind <> SymbolKind.NamedType OrElse 59Case SymbolKind.NamedType 62Case SymbolKind.Method 65Case SymbolKind.Property 68Case SymbolKind.Event 71Case SymbolKind.Field 8082Return s.Kind = SymbolKind.NamedType OrElse s.Name = "dfoo"
SymbolsTests\Source\EventTests.vb (7)
1575Assert.Equal(SymbolKind.NamedType, semanticSummary.Symbol.Kind) 1613Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind) 1655Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 1691Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 1722Assert.Equal(SymbolKind.Field, mems(1).Kind) 1727Assert.Equal(SymbolKind.Event, mems(3).Kind) 1799Assert.Equal(SymbolKind.Event, semanticSummary.Symbol.Kind)
SymbolsTests\Source\GroupClassTests.vb (7)
3277Assert.Equal(SymbolKind.NamedType, symbolInfo.CandidateSymbols.Single().Kind) 3286Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind) 3358Assert.Equal(SymbolKind.Method, symbolInfo.Symbol.Kind) 3764Assert.Equal(SymbolKind.NamedType, symbolInfo.Symbol.Kind) 3772Assert.Equal(SymbolKind.Property, symbolInfo.Symbol.Kind) 3780Assert.Equal(SymbolKind.Property, symbolInfo.Symbol.Kind) 3788Assert.Equal(SymbolKind.Property, symbolInfo.Symbol.Kind)
SymbolsTests\Source\OverridesTests.vb (5)
2482Where memb.Kind = SymbolKind.Method 2485Where memb.Kind = SymbolKind.Method 2488Where memb.Kind = SymbolKind.Method 2491Where memb.Kind = SymbolKind.Method 6729If member.Kind = SymbolKind.Property Then
SymbolsTests\Source\SourceSymbolTests.vb (2)
86Assert.Equal(SymbolKind.Parameter, r1Type.Kind) 92Assert.Equal(SymbolKind.Parameter, r2Type.Kind)
SymbolsTests\Source\TypeTests.vb (44)
81Assert.Equal(SymbolKind.Namespace, globalNS.Kind) 92Assert.Equal(SymbolKind.NamedType, ifaceA.Kind) 110Assert.Equal(SymbolKind.NamedType, classB.Kind) 127Assert.Equal(SymbolKind.NamedType, delegateB.Kind) 148Assert.Equal(SymbolKind.NamedType, enumE.Kind) 163Assert.Equal(SymbolKind.NamedType, structI.Kind) 178Assert.Equal(SymbolKind.NamedType, moduleM.Kind) 240Assert.Equal(SymbolKind.NamedType, outerClass.Kind) 256Assert.Equal(SymbolKind.NamedType, i1Class.Kind) 266Assert.Equal(SymbolKind.NamedType, i3Interface.Kind) 276Assert.Equal(SymbolKind.NamedType, i4Enum.Kind) 290Assert.Equal(SymbolKind.NamedType, i2Arity1.Kind) 304Assert.Equal(SymbolKind.NamedType, i2Arity2.Kind) 344Assert.Equal(SymbolKind.ArrayType, field1.Type.Kind) 347Assert.Equal(SymbolKind.ArrayType, sym1.Kind) 353Assert.Equal(SymbolKind.ArrayType, field1.Type.Kind) 355Assert.Equal(SymbolKind.ArrayType, field1.Type.Kind) 362Assert.Equal(SymbolKind.ArrayType, sym2.Type.Kind) 368Assert.Equal(SymbolKind.ArrayType, sym3.Type.Kind) 372Assert.Equal(SymbolKind.ArrayType, sym4.Type.Kind) 378Assert.Equal(SymbolKind.ArrayType, sym5.Kind) 406Assert.Equal(SymbolKind.ArrayType, sym1.Kind) 414Assert.Equal(SymbolKind.ArrayType, sym2.Kind) 420Assert.Equal(SymbolKind.ArrayType, sym3.Kind) 453Assert.Equal(SymbolKind.ArrayType, sym1.Kind) 469Assert.Equal(SymbolKind.ArrayType, sym22.Kind) 476Assert.Equal(SymbolKind.ArrayType, sym3.Kind) 483Assert.Equal(SymbolKind.ArrayType, sym4.Kind) 490Assert.Equal(SymbolKind.ArrayType, sym5.Kind) 503Assert.Equal(SymbolKind.ArrayType, sym62.Kind) 548Assert.Equal(SymbolKind.Namespace, globalNS.Kind) 553Assert.Equal(SymbolKind.NamedType, enumE.Kind) 565Dim ctor = enumMembers.Where(Function(s) s.Kind = SymbolKind.Method) 567Assert.Equal(SymbolKind.Method, ctor(0).Kind) 569Dim _val = enumMembers.Where(Function(s) Not s.IsShared AndAlso s.Kind = SymbolKind.Field) 606Assert.Equal(SymbolKind.NamedType, classA.Kind) 616Assert.Equal(SymbolKind.NamedType, igoo.Kind) 626Assert.Equal(SymbolKind.NamedType, structS.Kind) 694Assert.Equal(SymbolKind.Field, varA.Kind) 696Assert.Equal(SymbolKind.NamedType, varA.Type.Kind) 736Assert.Equal(SymbolKind.Field, mem1.Kind) 744Assert.Equal(SymbolKind.Method, mem2.Kind) 754Assert.Equal(SymbolKind.Method, mem3.Kind) 776Assert.Equal(SymbolKind.ErrorType, baseType.Kind)
SymbolsTests\SymbolErrorTests.vb (5)
20995Assert.Equal(SymbolKind.ErrorType, sym.Kind) 22491Assert.Equal(SymbolKind.ErrorType, errTypeSym.Kind) 23427Assert.Equal(SymbolKind.ErrorType, typ.Kind) 23457Assert.Equal(SymbolKind.ErrorType, typ.Kind) 23493Assert.Equal(SymbolKind.ErrorType, typ.Kind)
SymbolsTests\WellKnownTypeValidationTests.vb (4)
460Assert.Equal(SymbolKind.ErrorType, symbol.Kind) ' Not available 462Assert.NotEqual(SymbolKind.ErrorType, symbol.Kind) 592Assert.True(SymbolKind.ErrorType <> symbol.Kind, $"{symbol} should not be an error type") 675Assert.True(SymbolKind.ErrorType <> symbol.Kind, $"{symbol} should not be an error type")
UsedAssembliesTests.vb (1)
83Dim hasCoreLibraryRef As Boolean = comp.ObjectType.Kind = SymbolKind.NamedType
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
BasicTrackingDiagnosticAnalyzer.vb (1)
14Protected Overrides Function IsOnCodeBlockSupported(symbolKind As SymbolKind, methodKind As MethodKind, returnsVoid As Boolean) As Boolean
Extensions.vb (1)
197If typeSym.Kind = SymbolKind.NamedType AndAlso
Microsoft.CodeAnalysis.VisualBasic.Workspaces (104)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
169(symbol.IsKind(SymbolKind.Method) AndAlso DirectCast(symbol, IMethodSymbol).MethodKind = MethodKind.Constructor)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (7)
102Case SymbolKind.Namespace 109Case SymbolKind.Method 115Case SymbolKind.Event 118Case SymbolKind.Property 121Case SymbolKind.Field 127Case SymbolKind.Parameter 130Case SymbolKind.Local
FindSymbols\VisualBasicReferenceFinder.vb (2)
26If symbol.Kind = SymbolKind.Property Then 28ElseIf symbol.Kind = SymbolKind.NamedType Then
Recommendations\VisualBasicRecommendationServiceRunner.vb (24)
84If symbol.Kind() = SymbolKind.Field Then 89If symbol.Kind() = SymbolKind.Local Then 120.WhereAsArray(Function(s) s.Kind = SymbolKind.Event AndAlso Equals(s.ContainingType, containingType)) 236If firstSymbol.Kind = SymbolKind.Alias Then 241Case SymbolKind.TypeParameter 244Case SymbolKind.NamedType, SymbolKind.Namespace 250If firstSymbol.Kind = SymbolKind.Parameter Then 288If container IsNot Nothing AndAlso container.Kind = SymbolKind.NamedType Then 305(couldBeMergedNamespace OrElse leftHandSymbolInfo.GetBestOrAllSymbols().FirstOrDefault().MatchesKind(SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Alias)) Then 339symbols = symbols.WhereAsArray(Function(s) s.Kind = SymbolKind.Property) 343symbols = symbols.WhereAsArray(Function(s) s.Kind <> SymbolKind.Method OrElse DirectCast(s, IMethodSymbol).MethodKind <> MethodKind.UserDefinedOperator) 349symbols = symbols.WhereAsArray(Function(s) s.Kind <> SymbolKind.Field OrElse Not s.ContainingType.IsEnumType() OrElse s.Name <> WellKnownMemberNames.EnumBackingFieldName) 363If s.Kind = SymbolKind.Event AndAlso Not _context.IsNameOfContext Then 365ElseIf s.Kind = SymbolKind.Field AndAlso s.IsImplicitlyDeclared Then 368Return associatedSymbol.Kind <> SymbolKind.Event AndAlso associatedSymbol.Kind <> SymbolKind.Property 370ElseIf s.Kind = SymbolKind.NamedType AndAlso s.IsImplicitlyDeclared Then 449If symbol.Kind = SymbolKind.Alias Then 470If namespaceOrTypeSymbol.Kind = SymbolKind.Namespace Then 490If symbol.Kind = SymbolKind.Alias Then 518If namespaceOrTypeSymbol.Kind = SymbolKind.Namespace Then
Rename\LocalConflictVisitor.vb (2)
154If symbol IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Local) Then 199If symbol IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Local) Then
Rename\VisualBasicRenameRewriterLanguageService.vb (20)
317If symbol.Kind = SymbolKind.Field AndAlso symbol.IsImplicitlyDeclared Then 328fieldSymbol.AssociatedSymbol.IsKind(SymbolKind.Property) AndAlso 404If symbol IsNot Nothing AndAlso Me._renamedSymbol.Kind <> SymbolKind.Local AndAlso Me._renamedSymbol.Kind <> SymbolKind.RangeVariable AndAlso 695If renamedSymbol.Kind = SymbolKind.Parameter OrElse 696renamedSymbol.Kind = SymbolKind.Local OrElse 697renamedSymbol.Kind = SymbolKind.RangeVariable Then 714If renamedSymbol.Kind = SymbolKind.Parameter AndAlso 715renamedSymbol.ContainingSymbol.Kind = SymbolKind.Method Then 731If renamedSymbol.Kind = SymbolKind.Parameter AndAlso 732renamedSymbol.ContainingSymbol.Kind = SymbolKind.Property AndAlso 745ElseIf renamedSymbol.Kind = SymbolKind.Label Then 756ElseIf renamedSymbol.Kind = SymbolKind.Method Then 761ElseIf renamedSymbol.Kind = SymbolKind.Property Then 766referencedSymbols.Concat(renameSymbol).Where(Function(sym) sym.Kind = SymbolKind.Property), 770ElseIf renamedSymbol.Kind = SymbolKind.TypeParameter Then 804Dim implicitReferencesMightConflict = renameSymbol.Kind = SymbolKind.Property AndAlso 807(renameSymbol.Kind = SymbolKind.Method AndAlso 941If symbol.Kind = SymbolKind.Method Then 985If symbol.Kind = SymbolKind.Property Then
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
103If symbol IsNot Nothing AndAlso symbol.Kind = SymbolKind.Method AndAlso Not DirectCast(symbol, IMethodSymbol).IsConstructor Then
Simplification\Reducers\VisualBasicExtensionMethodReducer.vb (2)
40If (Not targetSymbol.Symbol Is Nothing) AndAlso targetSymbol.Symbol.Kind = SymbolKind.Method Then 63If newSymbol.Kind = SymbolKind.Method And oldSymbol.Equals(DirectCast(newSymbol, IMethodSymbol).GetConstructedReducedFrom()) Then
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (2)
101(symbol.Kind <> SymbolKind.Namespace AndAlso symbol.Kind <> SymbolKind.NamedType) Then
Simplification\Simplifiers\ExpressionSimplifier.vb (3)
131If (symbol IsNot Nothing AndAlso symbol.IsKind(SymbolKind.NamedType)) Then 237If leftSymbol IsNot Nothing AndAlso leftSymbol.Kind = SymbolKind.NamedType Then 239If rightSymbol IsNot Nothing AndAlso (rightSymbol.IsStatic OrElse rightSymbol.Kind = SymbolKind.NamedType) Then
Simplification\Simplifiers\NameSimplifier.vb (3)
42If symbol.Kind = SymbolKind.Method AndAlso symbol.IsConstructor() Then 46If symbol.Kind = SymbolKind.Method AndAlso name.Kind = SyntaxKind.GenericName Then 197If (symbol.Kind = SymbolKind.NamedType) AndAlso (Not name.IsLeftSideOfQualifiedName) Then
Simplification\VisualBasicSimplificationService.Expander.vb (10)
107If newNodeSymbol IsNot Nothing AndAlso newNodeSymbol.Kind = SymbolKind.Parameter Then 321If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then 634If symbol.Kind = SymbolKind.NamedType OrElse symbol.Kind = SymbolKind.Namespace Then 644If symbol.Kind = SymbolKind.Method OrElse 645symbol.Kind = SymbolKind.Field OrElse 646symbol.Kind = SymbolKind.Property Then 685If newNode.Kind = SyntaxKind.IdentifierName AndAlso symbol.Kind = SymbolKind.Method Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (6)
452Case SymbolKind.Field, 453SymbolKind.Local, 454SymbolKind.Method, 455SymbolKind.Parameter, 456SymbolKind.Property, 457SymbolKind.RangeVariable
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\InvocationExpressionSyntaxExtensions.vb (2)
50Return symbol IsNot Nothing AndAlso symbol.MatchesKind(SymbolKind.Property, SymbolKind.Method) AndAlso Not symbol.IsAnonymousFunction
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (3)
283If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (2)
248If symbol?.Kind = SymbolKind.Field OrElse symbol?.Kind = SymbolKind.Property Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (4)
206If symbol.IsKind(SymbolKind.Method) OrElse symbol.IsKind(SymbolKind.Property) OrElse symbol.IsKind(SymbolKind.Event) Then 215If modifiedIdentifierNode IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Field) AndAlso GetType(T) Is GetType(FieldDeclarationSyntax) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Editing\VisualBasicImportAdder.vb (1)
49If Symbol IsNot Nothing AndAlso Symbol.Kind <> SymbolKind.Namespace AndAlso nsSymbol IsNot Nothing Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (2)
799Case SymbolKind.NamedType 801Case SymbolKind.Alias
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\SymbolExtensions.vb (2)
12If symbol.Kind <> SymbolKind.Namespace OrElse symbol.Name <> "My" Then 24If symbol.Kind <> SymbolKind.Property OrElse symbol.Name <> "Forms" Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\TypeSyntaxGeneratorVisitor.vb (1)
43While underlyingNonArrayType.Kind = SymbolKind.ArrayType
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
614Case SymbolKind.Field 616Case SymbolKind.Local 986SemanticModel.GetSymbolInfo(identifier.Identifier).Symbol?.Kind = SymbolKind.Parameter Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\SymbolExtensions.vb (1)
15If symbol.IsKind(SymbolKind.Property) AndAlso symbol.IsImplicitlyDeclared Then
Microsoft.CodeAnalysis.Workspaces (330)
Editing\SyntaxGenerator.cs (14)
527var invoke = symbol.Type.GetMembers("Invoke").FirstOrDefault(m => m.Kind == SymbolKind.Method) as IMethodSymbol; 721case SymbolKind.Field: 724case SymbolKind.Property: 728case SymbolKind.Event: 732case SymbolKind.Method: 752case SymbolKind.Parameter: 755case SymbolKind.NamedType: 789members: type.GetMembers().Where(s => s.Kind == SymbolKind.Field).Select(Declaration)), 823case SymbolKind.Field: 824case SymbolKind.Property: 825case SymbolKind.Event: 826case SymbolKind.Parameter: 829case SymbolKind.Method: 842case SymbolKind.NamedType:
FindSymbols\Declarations\DeclarationFinder.cs (5)
99if (IsOn(filter, SymbolFilter.Namespace) && symbol.Kind == SymbolKind.Namespace) 120return symbol.Kind is SymbolKind.Method or 121SymbolKind.Property or 122SymbolKind.Event or 123SymbolKind.Field;
FindSymbols\FindReferences\DependentProjectsFinder.cs (2)
45if (symbols.Any(static s => s.Kind is SymbolKind.Namespace or SymbolKind.Preprocessing))
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
86return field is { IsImplicitlyDeclared: true, AssociatedSymbol.Kind: SymbolKind.Property }
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (8)
695case SymbolKind.Namespace: 705case SymbolKind.NamedType: 712case SymbolKind.Method: 713case SymbolKind.Property: 714case SymbolKind.Field: 715case SymbolKind.Event: 716case SymbolKind.Parameter: 717case SymbolKind.Local:
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (6)
34SymbolKind.Namespace => !((INamespaceSymbol)symbol).IsGlobalNamespace, 35SymbolKind.NamedType => true, 36SymbolKind.Method => true, 37SymbolKind.Field => true, 38SymbolKind.Property => true, 39SymbolKind.Event => true,
FindSymbols\ReferenceLocationExtensions.cs (3)
77if (current.Kind == SymbolKind.Field) 82if (current.Kind == SymbolKind.Property) 87if (current.Kind == SymbolKind.Method)
FindSymbols\SymbolFinder.cs (9)
134case SymbolKind.Event: 135case SymbolKind.Field: 136case SymbolKind.Method: 137case SymbolKind.Local: 138case SymbolKind.NamedType: 139case SymbolKind.Parameter: 140case SymbolKind.Property: 141case SymbolKind.TypeParameter: 142case SymbolKind.Namespace:
FindSymbols\SymbolFinder_Callers.cs (4)
81if (symbol.Kind is SymbolKind.Event or 82SymbolKind.Method or 83SymbolKind.Property or 84SymbolKind.Field)
FindSymbols\SymbolFinder_Helpers.cs (2)
49if (searchSymbol.Kind == SymbolKind.Namespace && symbolToMatch.Kind == SymbolKind.Namespace)
Recommendations\AbstractRecommendationService.cs (7)
77case SymbolKind.NamedType: 86case SymbolKind.Method: 100case SymbolKind.Event: 101case SymbolKind.Field: 102case SymbolKind.Property: 106case SymbolKind.TypeParameter: 120return symbol.Kind == SymbolKind.Field;
Recommendations\AbstractRecommendationServiceRunner.cs (2)
136if (!parameterTypeSymbols.Any(static t => t.IsKind(SymbolKind.TypeParameter))) 155if (parameterTypeSymbol.IsKind<ITypeParameterSymbol>(SymbolKind.TypeParameter, out var typeParameter))
Rename\ConflictEngine\ConflictResolver.cs (13)
239if (renamedSymbol.ContainingSymbol.IsKind(SymbolKind.NamedType)) 253.Where(s => !s.MatchesKind(SymbolKind.Method, SymbolKind.Property) || 254!renamedSymbol.MatchesKind(SymbolKind.Method, SymbolKind.Property)); 259.Where(s => s.Kind != SymbolKind.Method || renamedSymbol.Kind != SymbolKind.Method); 265if (renamedSymbol.IsKind(SymbolKind.Namespace) && renamedSymbol.ContainingSymbol.IsKind(SymbolKind.Namespace)) 269!s.IsKind(SymbolKind.Namespace) && 275if (renamedSymbol.IsKind(SymbolKind.NamedType) && renamedSymbol.ContainingSymbol is INamespaceOrTypeSymbol) 281var conflictingSymbolLocations = otherThingsNamedTheSame.Where(s => !s.IsKind(SymbolKind.Namespace)); 282if (otherThingsNamedTheSame.Any(s => s.IsKind(SymbolKind.Namespace)))
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
672newReferencedSymbols = newReferencedSymbols.WhereAsArray(a => a.Kind != SymbolKind.Alias);
Rename\RenameUtilities.cs (13)
58symbols = symbols.WhereAsArray(s => s.Kind != SymbolKind.Alias); 76symbol.Kind is SymbolKind.Local or 77SymbolKind.Label or 78SymbolKind.RangeVariable or 79SymbolKind.Parameter; 197if (containingType.Kind == SymbolKind.NamedType) 229if (symbol.Kind == SymbolKind.Method && 336if (symbol.Kind == SymbolKind.Parameter) 338if (symbol.ContainingSymbol.Kind == SymbolKind.Method) 354if (symbol.Kind == SymbolKind.NamedType) 364if (symbol.Kind == SymbolKind.Method) 376if (symbol.Kind == SymbolKind.Field) 380fieldSymbol.AssociatedSymbol.IsKind(SymbolKind.Property))
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (9)
45if (originalSymbol.Kind == SymbolKind.Parameter && referencedSymbol.Kind == SymbolKind.Parameter) 51if (referencedSymbol.Kind == SymbolKind.Field && originalSymbol.Equals(((IFieldSymbol)referencedSymbol).AssociatedSymbol)) 75if (originalSymbol.Kind == SymbolKind.Alias) 106referencedSymbol.ContainingSymbol.Kind == SymbolKind.NamedType && 171if (referencedSymbol.Kind == SymbolKind.Namespace) 180if (originalSymbol.Kind == SymbolKind.Alias) 198if (referencedSymbol.Kind == SymbolKind.NamedType && referencedSymbol.Locations.All(l => l.IsInSource)) 264if (originalSymbol.Kind == SymbolKind.Alias)
Shared\Extensions\IFindReferencesResultExtensions.cs (2)
22return definition.IsKind(SymbolKind.Namespace) 67if (definition.Kind == SymbolKind.Property)
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
187if (namespaceOrType.Kind == SymbolKind.NamedType)
Shared\Extensions\ISymbolExtensions.cs (4)
61if (symbol.Kind == SymbolKind.Namespace) 279case SymbolKind.Method: 280case SymbolKind.Property: 281case SymbolKind.Event:
Shared\Extensions\ITypeSymbolExtensions.cs (3)
49if (interfaceMember.Kind is not SymbolKind.Event and 50not SymbolKind.Method and 51not SymbolKind.Property)
Shared\Extensions\SemanticModelExtensions.cs (2)
123else if (!declaredSymbol.IsKind(SymbolKind.RangeVariable)) 144if (type.Kind == SymbolKind.NamedType)
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
27if (symbol.Kind != SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (8)
89if (member.Kind == SymbolKind.Property) 101if (member.Kind == SymbolKind.Property) 199m.Kind != SymbolKind.NamedType && IsImplementable(m) && 209if (member.Kind != SymbolKind.Property) 299return type.GetMembers().WhereAsArray(m => m.Kind != SymbolKind.NamedType && 309if (member.Kind != SymbolKind.Property) 484case SymbolKind.Field: 495case SymbolKind.Property:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (28)
35case SymbolKind.Alias: 40case SymbolKind.Parameter: 44case SymbolKind.TypeParameter: 49while (symbol != null && symbol.Kind != SymbolKind.Namespace) 116if (symbol.Kind is SymbolKind.Event or SymbolKind.Property) 147if (symbol.Kind is not SymbolKind.Method and not SymbolKind.Property and not SymbolKind.Event) 175if (symbol.Kind == SymbolKind.Event) 180if (symbol.Kind == SymbolKind.Property) 185if (symbol.Kind == SymbolKind.Method) 222=> symbol?.Kind == SymbolKind.ArrayType; 230public static bool IsKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 233public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 236public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2) 242public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2, SymbolKind kind3) 248public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, params SymbolKind[] kinds) 258=> symbol?.Kind == SymbolKind.Field && symbol.ContainingType.IsEnumType(); 340SymbolKind.NamedType => ((INamedTypeSymbol)symbol).Arity, 341SymbolKind.Method => ((IMethodSymbol)symbol).Arity, 521=> symbol != null && symbol.Kind == SymbolKind.NamedType && symbol.IsStatic; 524=> symbol?.Kind == SymbolKind.Namespace; 581if (symbol.Kind != SymbolKind.Local) 767public static bool IsKind<TSymbol>(this ISymbol symbol, SymbolKind kind, [NotNullWhen(true)] out TSymbol? result) where TSymbol : class, ISymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (22)
95case SymbolKind.Alias: 98case SymbolKind.ArrayType: 101case SymbolKind.PointerType: 104case SymbolKind.FunctionPointerType: 121case SymbolKind.NamedType: 124case SymbolKind.ErrorType: 125case SymbolKind.Discard: 128case SymbolKind.TypeParameter: 129case SymbolKind.Parameter: 130case SymbolKind.Local: 131case SymbolKind.Label: 132case SymbolKind.Namespace: 133case SymbolKind.DynamicType: 134case SymbolKind.Assembly: 135case SymbolKind.NetModule: 136case SymbolKind.RangeVariable: 140case SymbolKind.Method: 141case SymbolKind.Property: 142case SymbolKind.Field: 143case SymbolKind.Event: 155if (symbol.ContainingSymbol.IsKind(SymbolKind.DynamicType)) 192if (typeArg.Kind != SymbolKind.TypeParameter &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (2)
603case SymbolKind.NamedType: 614case SymbolKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (2)
180if (symbol.Kind == SymbolKind.Discard) 204if (symbol.Kind == SymbolKind.Discard)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (14)
124private static readonly SymbolKindOrTypeKind _namespace = new(SymbolKind.Namespace); 129private static readonly SymbolKindOrTypeKind _property = new(SymbolKind.Property); 132private static readonly SymbolKindOrTypeKind _field = new(SymbolKind.Field); 133private static readonly SymbolKindOrTypeKind _event = new(SymbolKind.Event); 135private static readonly SymbolKindOrTypeKind _parameter = new(SymbolKind.Parameter); 136private static readonly SymbolKindOrTypeKind _typeParameter = new(SymbolKind.TypeParameter); 137private static readonly SymbolKindOrTypeKind _local = new(SymbolKind.Local); 413case SymbolKind.Namespace: 416case SymbolKind.Property: 419case SymbolKind.Field: 422case SymbolKind.Event: 425case SymbolKind.Parameter: 428case SymbolKind.TypeParameter: 431case SymbolKind.Local:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (4)
17private readonly ImmutableArray<SymbolKind> _symbolKindsThatCanBeOverridden = 18[SymbolKind.Method, SymbolKind.Property, SymbolKind.Event];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (26)
66new SymbolKindOrTypeKind(SymbolKind.Namespace), 74new SymbolKindOrTypeKind(SymbolKind.Property), 77new SymbolKindOrTypeKind(SymbolKind.Field), 78new SymbolKindOrTypeKind(SymbolKind.Event), 79new SymbolKindOrTypeKind(SymbolKind.Parameter), 81new SymbolKindOrTypeKind(SymbolKind.Local), 101public bool AppliesTo(SymbolKind symbolKind, Accessibility accessibility) 164case SymbolKind.Namespace: 167case SymbolKind.Parameter: 168case SymbolKind.TypeParameter: 171case SymbolKind.Method: 293foreach (var symbolKindElement in symbolKindListElement.Elements(nameof(SymbolKind))) 344public SymbolKindOrTypeKind(SymbolKind symbolKind) 359public SymbolKind? SymbolKind => (_category == SymbolCategory.Other) ? (SymbolKind)_kind : null; 366SymbolCategory.Other => symbol.IsKind((SymbolKind)_kind), 375SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 426var symbolKind = (SymbolKind)Enum.Parse(typeof(SymbolKind), symbolKindElement.Value); 432CodeAnalysis.SymbolKind.Method => new(CodeAnalysis.MethodKind.Ordinary), 502var kind = symbol.Kind; 503if (Modifier.IsAsync && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 510if (kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsReadOnly) 518if ((kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsConst) || 519(kind == SymbolKind.Local && ((ILocalSymbol)symbol).IsConst))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SimplifierOptions.cs (5)
42public bool TryGetQualifyMemberAccessOption(SymbolKind symbolKind, [NotNullWhen(true)] out CodeStyleOption2<bool>? option) 46SymbolKind.Field => QualifyFieldAccess, 47SymbolKind.Property => QualifyPropertyAccess, 48SymbolKind.Method => QualifyMethodAccess, 49SymbolKind.Event => QualifyEventAccess,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (2)
65if (symbol.Kind == SymbolKind.Alias) 74else if (symbol.Kind != SymbolKind.Namespace)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
55var kind = symbol.Kind; 136var kind = (SymbolKind)reader.ReadInteger(); 256SemanticModel semanticModel, SyntaxNode containerDeclaration, SymbolKind kind, string localName, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
498if (symbol.Kind == SymbolKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (6)
758&& symbol.IsKind(SymbolKind.Method) 878return symbol.Kind == SymbolKind.Method && 1040if (receiverType.IsKind(SymbolKind.TypeParameter) && !receiverType.IsReferenceType) 1059return receiverSymbol.IsKind(SymbolKind.Method) || 1061receiverSymbol.IsKind(SymbolKind.Property); 1066if (originalSymbol.IsKind(SymbolKind.Method) || originalSymbol.IsIndexer())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (6)
41SymbolKind.Method => HaveSameSignature((IMethodSymbol)symbol1, (IMethodSymbol)symbol2, caseSensitive), 42SymbolKind.Property => HaveSameSignature((IPropertySymbol)symbol1, (IPropertySymbol)symbol2, caseSensitive), 43SymbolKind.Event => HaveSameSignature((IEventSymbol)symbol1, (IEventSymbol)symbol2, caseSensitive), 150case SymbolKind.Method: 155case SymbolKind.Property: 163case SymbolKind.Event:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (5)
175=> symbol.IsKind(SymbolKind.Alias, out IAliasSymbol? alias) ? alias.Target : symbol; 177private static SymbolKind GetKindAndUnwrapAlias(ref ISymbol symbol) 179var k = symbol.Kind; 180if (k == SymbolKind.Alias) 196=> symbol.IsKind(SymbolKind.NamedType, out ITypeSymbol? typeSymbol) && typeSymbol.SpecialType == SpecialType.System_Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (28)
29var xKind = GetKindAndUnwrapAlias(ref x); 30var yKind = GetKindAndUnwrapAlias(ref y); 39if ((xKind == SymbolKind.DynamicType && IsObjectType(y)) || 40(yKind == SymbolKind.DynamicType && IsObjectType(x))) 48if (xKind == SymbolKind.ArrayType && y.IsReadOnlySpan()) 52else if (x.IsReadOnlySpan() && yKind == SymbolKind.ArrayType) 111private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 116SymbolKind.ArrayType => ArrayTypesAreEquivalent((IArrayTypeSymbol)x, (IArrayTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 117SymbolKind.Assembly => AssembliesAreEquivalent((IAssemblySymbol)x, (IAssemblySymbol)y), 118SymbolKind.DynamicType => NullableAnnotationsEquivalent((IDynamicTypeSymbol)x, (IDynamicTypeSymbol)y), 119SymbolKind.Event => EventsAreEquivalent((IEventSymbol)x, (IEventSymbol)y, equivalentTypesWithDifferingAssemblies), 120SymbolKind.Field => FieldsAreEquivalent((IFieldSymbol)x, (IFieldSymbol)y, equivalentTypesWithDifferingAssemblies), 121SymbolKind.Label => LabelsAreEquivalent((ILabelSymbol)x, (ILabelSymbol)y), 122SymbolKind.Local => LocalsAreEquivalent((ILocalSymbol)x, (ILocalSymbol)y), 123SymbolKind.Method => MethodsAreEquivalent((IMethodSymbol)x, (IMethodSymbol)y, equivalentTypesWithDifferingAssemblies), 124SymbolKind.NetModule => ModulesAreEquivalent((IModuleSymbol)x, (IModuleSymbol)y), 125SymbolKind.NamedType => NamedTypesAreEquivalent((INamedTypeSymbol)x, (INamedTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 126SymbolKind.ErrorType => NamedTypesAreEquivalent((INamedTypeSymbol)x, (INamedTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 127SymbolKind.Namespace => NamespacesAreEquivalent((INamespaceSymbol)x, (INamespaceSymbol)y, equivalentTypesWithDifferingAssemblies), 128SymbolKind.Parameter => ParametersAreEquivalent((IParameterSymbol)x, (IParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 129SymbolKind.PointerType => PointerTypesAreEquivalent((IPointerTypeSymbol)x, (IPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 130SymbolKind.Property => PropertiesAreEquivalent((IPropertySymbol)x, (IPropertySymbol)y, equivalentTypesWithDifferingAssemblies), 131SymbolKind.RangeVariable => RangeVariablesAreEquivalent((IRangeVariableSymbol)x, (IRangeVariableSymbol)y), 132SymbolKind.TypeParameter => TypeParametersAreEquivalent((ITypeParameterSymbol)x, (ITypeParameterSymbol)y, equivalentTypesWithDifferingAssemblies), 133SymbolKind.Preprocessing => PreprocessingSymbolsAreEquivalent((IPreprocessingSymbol)x, (IPreprocessingSymbol)y), 134SymbolKind.FunctionPointerType => FunctionPointerTypesAreEquivalent((IFunctionPointerTypeSymbol)x, (IFunctionPointerTypeSymbol)y, equivalentTypesWithDifferingAssemblies), 367if (x.Kind == SymbolKind.ErrorType && 371Debug.Assert(y.Kind == SymbolKind.ErrorType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (17)
44if (x.Kind == SymbolKind.DynamicType || 59SymbolKind.ArrayType => CombineHashCodes((IArrayTypeSymbol)x, currentHash), 60SymbolKind.Assembly => CombineHashCodes((IAssemblySymbol)x, currentHash), 61SymbolKind.Event => CombineHashCodes((IEventSymbol)x, currentHash), 62SymbolKind.Field => CombineHashCodes((IFieldSymbol)x, currentHash), 63SymbolKind.Label => CombineHashCodes((ILabelSymbol)x, currentHash), 64SymbolKind.Local => CombineHashCodes((ILocalSymbol)x, currentHash), 65SymbolKind.Method => CombineHashCodes((IMethodSymbol)x, currentHash), 66SymbolKind.NetModule => CombineHashCodes((IModuleSymbol)x, currentHash), 67SymbolKind.NamedType => CombineHashCodes((INamedTypeSymbol)x, currentHash), 68SymbolKind.Namespace => CombineHashCodes((INamespaceSymbol)x, currentHash), 69SymbolKind.Parameter => CombineHashCodes((IParameterSymbol)x, currentHash), 70SymbolKind.PointerType => CombineHashCodes((IPointerTypeSymbol)x, currentHash), 71SymbolKind.Property => CombineHashCodes((IPropertySymbol)x, currentHash), 72SymbolKind.RangeVariable => CombineHashCodes((IRangeVariableSymbol)x, currentHash), 73SymbolKind.TypeParameter => CombineHashCodes((ITypeParameterSymbol)x, currentHash), 74SymbolKind.Preprocessing => CombineHashCodes((IPreprocessingSymbol)x, currentHash),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
50if (containingSymbol.Kind == SymbolKind.Namespace &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (2)
79public override SymbolKind Kind => SymbolKind.Method;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractNamedTypeSymbol.cs (2)
47public override SymbolKind Kind => SymbolKind.NamedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (2)
45public override SymbolKind Kind => SymbolKind.ArrayType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventSymbol.cs (2)
44public override SymbolKind Kind => SymbolKind.Event;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldSymbol.cs (2)
49public override SymbolKind Kind => SymbolKind.Field;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamedTypeSymbol.cs (2)
70public override SymbolKind Kind => SymbolKind.NamedType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceSymbol.cs (2)
25public override SymbolKind Kind => SymbolKind.Namespace;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationParameterSymbol.cs (2)
50public override SymbolKind Kind => SymbolKind.Parameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPointerTypeSymbol.cs (2)
21public override SymbolKind Kind => SymbolKind.PointerType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertySymbol.cs (2)
56public override SymbolKind Kind => SymbolKind.Property;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
78public abstract SymbolKind Kind { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (2)
49public override SymbolKind Kind => SymbolKind.TypeParameter;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (6)
32s.Kind is SymbolKind.Local or 33SymbolKind.Parameter or 34SymbolKind.RangeVariable or 35SymbolKind.Field or 36SymbolKind.Property || 37s is { Kind: SymbolKind.NamedType, IsStatic: true };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
123return symbol.Kind == SymbolKind.Method &&
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
107Debug.Assert(symbol.Kind is SymbolKind.Assembly or SymbolKind.NetModule or SymbolKind.DynamicType);
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (4)
133if (symbol.IsKind(SymbolKind.Namespace, out INamespaceSymbol? ns)) 143else if (symbol.IsKind(SymbolKind.Assembly) || 144symbol.IsKind(SymbolKind.NetModule) || 145symbol.IsKind(SymbolKind.DynamicType))
Microsoft.CodeAnalysis.Workspaces.UnitTests (27)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (1)
189[InlineData(typeof(SymbolKind))]
EditorConfigParsing\NamingStyleParserTests.cs (15)
82symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 118symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Parameter), symbolKind), 119symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Local), symbolKind)); 156symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Namespace), symbolKind), 161symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Property), symbolKind), 164symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind), 165symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Event), symbolKind), 167symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Parameter), symbolKind), 168symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.TypeParameter), symbolKind), 169symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Local), symbolKind)); 204symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 277symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind), 278symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Local), symbolKind)); 314symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 351symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind));
FindReferencesTests.cs (7)
134var typeSymbol = result.Where(@ref => @ref.Definition.Kind == SymbolKind.NamedType).Single(); 547var typeResult = result.Single(r => r.Definition.Kind == SymbolKind.NamedType); 548var constructorResult = result.Single(r => r.Definition.Kind == SymbolKind.Method); 580var typeResult = result.Single(r => r.Definition.Kind == SymbolKind.NamedType); 581var constructorResult = result.Single(r => r.Definition.Kind == SymbolKind.Method); 622var typeResult = result.Single(r => r.Definition.Kind == SymbolKind.NamedType); 623var constructorResult = result.Single(r => r.Definition.Kind == SymbolKind.Method);
SymbolKeyTests.cs (4)
1096Assert.Equal(SymbolKind.ErrorType, propType.Kind); 1131Assert.Equal(SymbolKind.ErrorType, propType.Kind); 1178Assert.Equal(SymbolKind.ErrorType, propType.Kind); 1225Assert.Equal(SymbolKind.ErrorType, propType.Kind);
Microsoft.DotNet.CodeAnalysis (5)
Analyzers\MembersMustExistAnalyzer.cs (4)
62context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Method, SymbolKind.Event); 63context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Field, SymbolKind.Event);
Analyzers\PinvokeAnalyzer.cs (1)
32obj.RegisterSymbolAction(AnalyzeMethod, SymbolKind.Method);
Microsoft.Extensions.Logging.Generators (4)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Extensions.Options.SourceGeneration (8)
Parser.cs (2)
82if (modelType.Kind == SymbolKind.ErrorType) 201.Where(m => m.Kind == SymbolKind.Method)
ParserUtilities.cs (2)
83property.Kind == SymbolKind.Property && !property.IsStatic && property.GetMethod != null && property.Parameters.IsEmpty)) 96property.Type.SpecialType == returnType && property.Kind == SymbolKind.Property &&
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Gen.Logging (12)
Parsing\Parser.cs (1)
152&& paramSymbol.Type.Kind != SymbolKind.TypeParameter)
Parsing\Parser.LogProperties.cs (3)
123foreach (var property in members.Where(m => m.Kind == SymbolKind.Property).Cast<IPropertySymbol>()) 318&& property.Type.Kind != SymbolKind.TypeParameter 337symType.Kind == SymbolKind.NamedType &&
Parsing\Parser.Records.cs (1)
146extractedType.Kind == SymbolKind.NamedType &&
Parsing\Parser.TagProvider.cs (2)
88var methodSymbols = providerType.GetMembers(providerMethodName).Where(m => m.Kind == SymbolKind.Method).Cast<IMethodSymbol>(); 184while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Parsing\TypeSymbolExtensions.cs (1)
82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
src\Generators\Shared\RoslynExtensions.cs (4)
150case SymbolKind.Alias: 155case SymbolKind.Parameter: 159case SymbolKind.TypeParameter: 164while (symbol is not null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Gen.Logging.Unit.Tests (1)
LogParserUtilitiesTests.cs (1)
154paramTypeMock.SetupGet(x => x.Kind).Returns(SymbolKind.NamedType);
Microsoft.Gen.Metrics (6)
Parser.cs (2)
697case SymbolKind.Property: 705case SymbolKind.Field:
src\Generators\Shared\RoslynExtensions.cs (4)
150case SymbolKind.Alias: 155case SymbolKind.Parameter: 159case SymbolKind.TypeParameter: 164while (symbol is not null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
697case SymbolKind.Property: 705case SymbolKind.Field:
Microsoft.Interop.ComInterfaceGenerator (9)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
61}, SymbolKind.NamedType);
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
142}, SymbolKind.NamedType);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
46}, SymbolKind.NamedType);
ComMethodInfo.cs (2)
52case { Kind: SymbolKind.Property }: 55case { Kind: SymbolKind.Event }:
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Interop.LibraryImportGenerator (6)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
63context.RegisterSymbolAction(symbolContext => AnalyzeSymbol(symbolContext, libraryImportAttrType, env), SymbolKind.Method);
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
38if (diagnosedSymbol.Kind != SymbolKind.Method)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.Interop.SourceGeneration (4)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
116context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Method);
Microsoft.ML.InternalCodeAnalyzer (8)
BaseTestClassAnalyzer.cs (1)
46context.RegisterSymbolAction(analyzerImpl.AnalyzeNamedType, SymbolKind.NamedType);
BestFriendOnPublicDeclarationsAnalyzer.cs (4)
53context.RegisterSymbolAction(c => AnalyzeCore(c, attribute), SymbolKind.NamedType, SymbolKind.Method, SymbolKind.Field, SymbolKind.Property);
ContractsCheckNameofFixProvider.cs (1)
139foreach (IFieldSymbol s in type.GetMembers().Where(p => p.Kind == SymbolKind.Field))
InstanceInitializerAnalyzer.cs (2)
36context.RegisterSymbolAction(AnalyzeField, SymbolKind.Field); 37context.RegisterSymbolAction(AnalyzeProperty, SymbolKind.Property);
Microsoft.VisualStudio.LanguageServices (112)
CallHierarchy\CallHierarchyProvider.cs (8)
58if (symbol.Kind is SymbolKind.Method or 59SymbolKind.Property or 60SymbolKind.Event or 61SymbolKind.Field) 105if (symbol.Kind is SymbolKind.Property or 106SymbolKind.Event or 107SymbolKind.Method) 144if (symbol.Kind == SymbolKind.Field)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
158if (caller.CallingSymbol.Kind == SymbolKind.Field)
CommonControls\MemberSelectionViewModel.cs (2)
143var fields = Members.WhereAsArray(memberViewModel => memberViewModel.Symbol.IsKind(SymbolKind.Field)); 145WhereAsArray(memberViewModel => !memberViewModel.Symbol.IsKind(SymbolKind.Field) && !memberViewModel.Symbol.IsAbstract);
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
63IsMakeAbstractCheckable = !member.IsKind(SymbolKind.Field) && !member.IsAbstract,
Implementation\ContainedLanguageRefactorNotifyService.cs (4)
81else if (symbol.Kind is SymbolKind.Event or 82SymbolKind.Field or 83SymbolKind.Method or 84SymbolKind.Property)
Implementation\VsRefactorNotifyService.cs (1)
161if (symbol.Kind == SymbolKind.Method)
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (5)
109=> symbol.Kind is SymbolKind.Event or 110SymbolKind.Field or 111SymbolKind.Method or 112SymbolKind.NamedType or 113SymbolKind.Property;
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (6)
210case SymbolKind.Method: 214case SymbolKind.Field: 218case SymbolKind.Property: 222case SymbolKind.Event: 447|| symbol.Kind is SymbolKind.Method or SymbolKind.Property;
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
138if (symbol.Kind == SymbolKind.NamedType)
Library\ObjectBrowser\Lists\MemberListItem.cs (4)
21case SymbolKind.Event: 25case SymbolKind.Field: 40case SymbolKind.Method: 49case SymbolKind.Property:
Library\ObjectBrowser\Lists\SymbolListItem.cs (2)
32_supportsGoToDefinition = symbol.Kind != SymbolKind.Namespace; 33_supportsFindAllReferences = symbol.Kind != SymbolKind.Namespace;
Library\VsNavInfo\NavInfoFactory.cs (4)
49if (symbol.Kind is SymbolKind.Event or 50SymbolKind.Field or 51SymbolKind.Method or 52SymbolKind.Property)
Progression\GraphBuilder.cs (15)
262case SymbolKind.Assembly: 266case SymbolKind.Namespace: 270case SymbolKind.NamedType: 271case SymbolKind.ErrorType: 275case SymbolKind.Method: 279case SymbolKind.Field: 283case SymbolKind.Property: 287case SymbolKind.Event: 291case SymbolKind.Parameter: 295case SymbolKind.Local: 296case SymbolKind.RangeVariable: 357case SymbolKind.NamedType: 384case SymbolKind.Method: 405case SymbolKind.Property: 417case SymbolKind.Namespace:
Progression\GraphNodeCreation.cs (10)
35case SymbolKind.Assembly: 38case SymbolKind.Namespace: 41case SymbolKind.NamedType: 44case SymbolKind.Method: 45case SymbolKind.Field: 46case SymbolKind.Property: 47case SymbolKind.Event: 50case SymbolKind.Parameter: 53case SymbolKind.Local: 54case SymbolKind.RangeVariable:
Progression\GraphNodeIdCreation.cs (7)
462(symbol.ContainingSymbol.Kind != SymbolKind.Method && symbol.ContainingSymbol.Kind != SymbolKind.Property)) 469if (containingSymbol is IMethodSymbol method && method.AssociatedSymbol != null && method.AssociatedSymbol.Kind == SymbolKind.Property) 490(symbol.ContainingSymbol.Kind != SymbolKind.Method && symbol.ContainingSymbol.Kind != SymbolKind.Property)) 544if (current is { Kind: SymbolKind.Local or SymbolKind.RangeVariable } && current.Name == symbol.Name)
Progression\GraphProvider.cs (24)
183nodes.Any(n => IsAnySymbolKind(n, SymbolKind.NamedType))) 199if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.NamedType) && 216if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property, SymbolKind.Field))) 226if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property) && 244if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.NamedType) && 256if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property) && 272if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.NamedType) && 283if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property) && 294if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property) && 306if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property) && 340private static bool IsAnySymbolKind(GraphNode node, params SymbolKind[] symbolKinds)
Progression\RoslynGraphProperties.cs (1)
75dataType: typeof(SymbolKind),
Progression\SymbolContainment.cs (5)
56case SymbolKind.NamedType: 57case SymbolKind.Method: 58case SymbolKind.Field: 59case SymbolKind.Property: 60case SymbolKind.Event:
PullMemberUp\VisualStudioPullMemberUpService.cs (1)
53IsMakeAbstractCheckable = !member.IsKind(SymbolKind.Field) && !member.IsAbstract,
Utilities\MemberSymbolViewModel.cs (1)
27public Visibility MakeAbstractVisibility => Symbol.Kind == SymbolKind.Field || Symbol.IsAbstract ? Visibility.Hidden : Visibility.Visible;
Venus\ContainedLanguageCodeSupport.cs (9)
104if (eventType.Kind != SymbolKind.NamedType) 178if (eventType.Kind != SymbolKind.NamedType || ((INamedTypeSymbol)eventType).DelegateInvokeMethod == null) 372if (member.Kind != SymbolKind.Method) 401return member.Kind == SymbolKind.Event; 404return member.Kind == SymbolKind.Method; 448if (member.Kind == SymbolKind.Method) 452else if (member.Kind == SymbolKind.Event) 465var members = type.GetMembers(memberName).Where(m => m.Kind == SymbolKind.Method); 497return semanticModel.LookupSymbols(typeLocation.SourceSpan.Start, objectType, nameOfEvent).SingleOrDefault(m => m.Kind == SymbolKind.Event);
Microsoft.VisualStudio.LanguageServices.CSharp (22)
CodeModel\CSharpCodeModelService.cs (9)
2985protected override Accessibility GetDefaultAccessibility(SymbolKind targetSymbolKind, CodeGenerationDestination destination) 2989case SymbolKind.Field: 2990case SymbolKind.Method: 2991case SymbolKind.Property: 2992case SymbolKind.Event: 2995case SymbolKind.NamedType: 3604symbol == null || symbol.Kind != SymbolKind.Method) 3644symbol == null || symbol.Kind != SymbolKind.Property) 3821if (typeSymbol.Kind != SymbolKind.NamedType ||
CodeModel\CSharpCodeModelService_Prototype.cs (8)
30case SymbolKind.Field: 32case SymbolKind.Method: 34case SymbolKind.Property: 36case SymbolKind.Event: 38case SymbolKind.NamedType: 59case VariableDeclaratorSyntax variableDeclarator when symbol.Kind == SymbolKind.Field: 562if (symbol.Kind == SymbolKind.Namespace) 585if (current.Kind == SymbolKind.NamedType)
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
489if (leftHandSymbol.Kind == SymbolKind.Alias) 497if (leftHandSymbol != null && leftHandSymbol.Kind == SymbolKind.NamedType)
LanguageService\CSharpHelpContextService.cs (3)
569if (symbol.MatchesKind(SymbolKind.Alias, SymbolKind.Local, SymbolKind.Parameter))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (45)
GlyphExtensionsTests.cs (45)
24SymbolKind.Assembly); 27SymbolKind.NetModule); 30SymbolKind.Namespace); 33SymbolKind.TypeParameter); 36SymbolKind.DynamicType); 40SymbolKind.Method, 44SymbolKind.Method, 70SymbolKind.PointerType, 71pointedAtType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 75SymbolKind.Property); 79SymbolKind.Field, 80containingType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Enum)); 84SymbolKind.Field, 89SymbolKind.Field); 91TestGlyph(StandardGlyphGroup.GlyphGroupVariable, SymbolKind.Parameter); 92TestGlyph(StandardGlyphGroup.GlyphGroupVariable, SymbolKind.Local); 93TestGlyph(StandardGlyphGroup.GlyphGroupVariable, SymbolKind.RangeVariable); 94TestGlyph(StandardGlyphGroup.GlyphGroupIntrinsic, SymbolKind.Label); 95TestGlyph(StandardGlyphGroup.GlyphGroupEvent, SymbolKind.Event); 99SymbolKind.ArrayType, 100elementType: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 104SymbolKind.Alias, 105target: (INamedTypeSymbol)CreateSymbolMock(SymbolKind.NamedType, typeKind: TypeKind.Class)); 110(SymbolKind)1000)); 114SymbolKind.NamedType, 118SymbolKind.NamedType, 122SymbolKind.NamedType, 126SymbolKind.NamedType, 130SymbolKind.NamedType, 134SymbolKind.NamedType, 138SymbolKind.NamedType, 144SymbolKind.NamedType, 153SymbolKind.Method, 162SymbolKind.Method, 171SymbolKind.Property, 177SymbolKind kind = SymbolKind.Method, 194SymbolKind kind, 212if (kind == SymbolKind.ArrayType) 218if (kind == SymbolKind.Alias) 224if (kind == SymbolKind.Method) 231if (kind == SymbolKind.NamedType) 237if (kind == SymbolKind.Field) 243if (kind == SymbolKind.PointerType) 249if (kind == SymbolKind.Property)
Microsoft.VisualStudio.LanguageServices.UnitTests (7)
CommonControls\MemberSelectionViewModelTests.vb (1)
102Assert.Empty(checkedMembers.WhereAsArray(Function(analysisResult) analysisResult.Symbol.IsKind(SymbolKind.Field)))
ExtractInterface\ExtractInterfaceViewModelTests.vb (3)
225Assert.Equal("Goo", viewModel.MemberContainers.Where(Function(c) c.Symbol.IsKind(SymbolKind.Property)).Single().SymbolName) 238Assert.Equal("this[int?, [string]]", viewModel.MemberContainers.Where(Function(c) c.Symbol.IsKind(SymbolKind.Property)).Single().SymbolName) 252Assert.Equal("M(string?, IEnumerable<string?>)", viewModel.MemberContainers.Single(Function(c) c.Symbol.IsKind(SymbolKind.Method)).SymbolName)
PullMemberUp\PullMemberUpViewModelTest.vb (3)
134Return Not memberViewModel.Symbol.IsKind(SymbolKind.Field) And Not memberViewModel.Symbol.IsAbstract 177For Each member In viewModel.MemberSelectionViewModel.Members.Where(Function(memberViewModel) memberViewModel.Symbol.IsKind(SymbolKind.Field)) 224For Each member In viewModel.MemberSelectionViewModel.Members.Where(Function(memberViewModel) memberViewModel.Symbol.IsKind(SymbolKind.Field))
Microsoft.VisualStudio.LanguageServices.VisualBasic (24)
CodeModel\MethodXML\MethodXmlBuilder.vb (4)
324If symbol?.Kind = SymbolKind.Property Then 365If leftHandSymbol.Kind = SymbolKind.Alias Then 371If leftHandSymbol.Kind = SymbolKind.Namespace AndAlso 380If leftHandSymbol IsNot Nothing AndAlso leftHandSymbol.Kind = SymbolKind.NamedType Then
CodeModel\VisualBasicCodeModelService.vb (7)
2907(symbol.Kind = SymbolKind.NamedType AndAlso DirectCast(symbol, INamedTypeSymbol).TypeKind = TypeKind.Module) OrElse 3608Protected Overrides Function GetDefaultAccessibility(targetSymbolKind As SymbolKind, destination As CodeGenerationDestination) As Accessibility 3614Case SymbolKind.Field 3616Case SymbolKind.Method, 3617SymbolKind.Property, 3618SymbolKind.Event, 3619SymbolKind.NamedType
CodeModel\VisualBasicCodeModelService_Prototype.vb (6)
35Case SymbolKind.Field 37Case SymbolKind.Property 40Case SymbolKind.Method 43Case SymbolKind.NamedType 48Case SymbolKind.Event 94If symbol.Kind = SymbolKind.Method Then
Help\VisualBasicHelpContextService.vb (4)
101If symbol.MatchesKind(SymbolKind.Alias, SymbolKind.Local, SymbolKind.Parameter, SymbolKind.RangeVariable) Then
Help\VisualBasicHelpContextService.Visitor.vb (1)
447If symbol Is Nothing OrElse symbol.IsKind(SymbolKind.RangeVariable) Then
Progression\VisualBasicProgressionLanguageService.vb (1)
82If symbol.Kind = SymbolKind.Field AndAlso symbol.ContainingType.TypeKind = TypeKind.Enum Then
Venus\ContainedLanguageStaticEventBinding.vb (1)
29Where(Function(m) m.CanBeReferencedByName AndAlso m.Kind = SymbolKind.Method).
Microsoft.VisualStudio.LanguageServices.Xaml (6)
Features\InlineRename\IXamlRenameInfo.cs (1)
45SymbolKind Kind { get; }
Features\InlineRename\XamlEditorInlineRenameService.cs (5)
119private static Glyph FromSymbolKind(SymbolKind kind) 125case SymbolKind.Namespace: 128case SymbolKind.NamedType: 131case SymbolKind.Property: 134case SymbolKind.Event:
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTest.GenerationVerifier.cs (1)
137.Single(e => e.Key.ToString() == typeName).Value.Where(s => s.Kind == SymbolKind.Field)
SemanticSearch.BuildTask (3)
GenerateFilteredReferenceAssembliesTask.cs (3)
266SymbolKind.Field => SymbolKindFlags.Field, 267SymbolKind.Method => SymbolKindFlags.Method, 268SymbolKind.NamedType => SymbolKindFlags.NamedType,
System.Private.CoreLib.Generators (3)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (3)
154if (member.Kind == SymbolKind.Property) 186}, SymbolKind.Method); 276if (symbolInfo.Symbol.Kind != SymbolKind.Property)
System.Text.Json.SourceGeneration (4)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
System.Text.RegularExpressions.Generator (4)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (4)
101case SymbolKind.Alias: 106case SymbolKind.Parameter: 110case SymbolKind.TypeParameter: 115while (symbol != null && symbol.Kind != SymbolKind.Namespace)
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
22context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Property);
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
24context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.Property)