602 references to Field
ILLink.RoslynAnalyzer (2)
DataFlow\DynamicallyAccessedMembersBinder.cs (1)
412 case SymbolKind.Field:
DynamicallyAccessedMembersAnalyzer.cs (1)
146 }, SymbolKind.Field);
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
53SymbolKind.Field,
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
53SymbolKind.Field,
Microsoft.CodeAnalysis (8)
CodeGen\MetadataNamedArgument.cs (1)
41bool Cci.IMetadataNamedArgument.IsField => _entity.Kind == SymbolKind.Field;
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1136case SymbolKind.Field:
DocumentationCommentId.cs (3)
744kind = SymbolKind.Field; 850case SymbolKind.Field: 1355if (symbol.Kind == SymbolKind.Field)
Emit\EditAndContinue\DefinitionMap.cs (1)
653if (member is { Kind: SymbolKind.Field, IsStatic: false })
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (1)
319if (member.Kind == SymbolKind.Field)
Symbols\SymbolKindExtensions.cs (1)
15case SymbolKind.Field:
Microsoft.CodeAnalysis.CodeStyle (17)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
62context.RegisterSymbolAction(AnalyzeFieldSymbol, SymbolKind.Field);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
769case SymbolKind.Field:
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
193compilationStartContext.RegisterSymbolAction(AnalyzeSymbolDeclaration, SymbolKind.Method, SymbolKind.Field, SymbolKind.Property, SymbolKind.Event); 845case SymbolKind.Field:
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
115case SymbolKind.Field:
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
83if (member.Kind == SymbolKind.Field)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
484case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
258=> symbol?.Kind == SymbolKind.Field && symbol.ContainingType.IsEnumType();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
142case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
132private static readonly SymbolKindOrTypeKind _field = new(SymbolKind.Field); 419case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
77new SymbolKindOrTypeKind(SymbolKind.Field), 510if (kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsReadOnly) 518if ((kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsConst) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SimplifierOptions.cs (1)
46SymbolKind.Field => QualifyFieldAccess,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
120SymbolKind.Field => FieldsAreEquivalent((IFieldSymbol)x, (IFieldSymbol)y, equivalentTypesWithDifferingAssemblies),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
62SymbolKind.Field => CombineHashCodes((IFieldSymbol)x, currentHash),
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
316CheckSurroundingContext(SymbolKind.Field, cancellationToken); 354if (symbolKind == SymbolKind.Field)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (3)
27new SymbolKindOrTypeKind(SymbolKind.Field), 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\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
69if (symbol.Kind == SymbolKind.Field)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldSymbol.cs (1)
49public override SymbolKind Kind => SymbolKind.Field;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
35SymbolKind.Field or
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (5)
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (5)
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)), 678new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field),
Microsoft.CodeAnalysis.CSharp (109)
Binder\Binder.cs (2)
607case SymbolKind.Field: 644symbol.Kind == SymbolKind.Field ||
Binder\Binder.ValueChecks.cs (1)
1431else if (containing.Kind == SymbolKind.Field)
Binder\Binder_AnonymousTypes.cs (1)
196case SymbolKind.Field:
Binder\Binder_Attributes.cs (1)
628case SymbolKind.Field:
Binder\Binder_Await.cs (1)
156case SymbolKind.Field:
Binder\Binder_Expressions.cs (6)
40inStaticContext = memberOpt.Kind == SymbolKind.Field || memberOpt.Kind == SymbolKind.Method || memberOpt.Kind == SymbolKind.Property; 2177case SymbolKind.Field: 3265if (member.Kind == SymbolKind.Field && 7466case SymbolKind.Field: 8174case SymbolKind.Field: 8320case SymbolKind.Field:
Binder\Binder_Lookup.cs (3)
1712case SymbolKind.Field: 1736case SymbolKind.Field: 1752case SymbolKind.Field:
Binder\Semantics\AccessCheck.cs (2)
75case SymbolKind.Field: 203case SymbolKind.Field:
BoundTree\VariablePendingInference.cs (1)
78case SymbolKind.Field:
Compilation\CSharpSemanticModel.cs (3)
3744case SymbolKind.Field: 3771case SymbolKind.Field: 5266case SymbolKind.Field:
Compilation\InitializerSemanticModel.cs (2)
150case SymbolKind.Field: 277case SymbolKind.Field:
Compiler\ClsComplianceChecker.cs (2)
426symbolKind == SymbolKind.Field || 719case SymbolKind.Field:
Compiler\DocumentationCommentCompiler.cs (1)
143symbol.Kind == SymbolKind.Field ||
Compiler\MethodCompiler.cs (1)
551case SymbolKind.Field:
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
70if (member.Kind == SymbolKind.Field)
Emitter\Model\PEModuleBuilder.cs (1)
403case SymbolKind.Field:
Emitter\NoPia\EmbeddedType.cs (1)
301case SymbolKind.Field:
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 (6)
288Debug.Assert(variableId.Symbol.Kind == SymbolKind.Field || variableId.Symbol.Kind == SymbolKind.Property || variableId.Symbol.Kind == SymbolKind.Event, 772if ((object)_sourceAssembly != null && variable.Kind == SymbolKind.Field) 854if ((object)_sourceAssembly != null && variable.Kind == SymbolKind.Field) 1229if (symbol.Kind == SymbolKind.Field) 1807while (current?.Kind is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property) 2656if (symbol.Kind != SymbolKind.Field)
FlowAnalysis\DefiniteAssignment.VariableIdentifier.cs (1)
32SymbolKind.Field => true,
FlowAnalysis\DefinitelyAssignedWalker.cs (1)
96symbol.Kind != SymbolKind.Field)
FlowAnalysis\EmptyStructTypeCache.cs (1)
195case SymbolKind.Field:
FlowAnalysis\NullableWalker.cs (7)
1071case SymbolKind.Field: 1116if (member.Kind != SymbolKind.Field && 1928case SymbolKind.Field: 2752Debug.Assert(member.Kind == SymbolKind.Field || member.Kind == SymbolKind.Property || member.Kind == SymbolKind.Event); 4446if (members.Any(static m => m.Kind == SymbolKind.Field)) 5479if ((member is PropertySymbol { IsIndexedProperty: false } || member.Kind == SymbolKind.Field) && 7200case SymbolKind.Field:
FlowAnalysis\NullableWalker_Patterns.cs (1)
264if (member.Symbol.Kind is not (SymbolKind.Property or SymbolKind.Field))
FlowAnalysis\ReadWriteWalker.cs (2)
81while (current?.Kind is SymbolKind.Method or SymbolKind.Field or SymbolKind.Property) 128if (variable.Kind != SymbolKind.Field) (IsInside ? _readInside : _readOutside).Add(variable);
FlowAnalysis\UnassignedVariablesWalker.cs (1)
59if (symbol.Kind != SymbolKind.Field)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
913case SymbolKind.Field: 928case SymbolKind.Field:
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
461Debug.Assert(fieldOrEvent.Kind == SymbolKind.Field || fieldOrEvent.Kind == SymbolKind.Event);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
674case SymbolKind.Field:
Lowering\MethodToClassRewriter.cs (1)
706case SymbolKind.Field:
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
172case SymbolKind.Field: 262case SymbolKind.Field:
Operations\CSharpOperationFactory.cs (1)
869case SymbolKind.Field:
SymbolDisplay\SymbolDisplayVisitor.cs (1)
465&& symbol.Kind == SymbolKind.Field
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
119case SymbolKind.Field:
Symbols\Attributes\AttributeData.cs (2)
292if (foundMember.Kind == SymbolKind.Field || foundMember.Kind == SymbolKind.Property) 708case SymbolKind.Field:
Symbols\BaseTypeAnalysis.cs (1)
186case SymbolKind.Field:
Symbols\Compilation_WellKnownMembers.cs (2)
277targetSymbolKind = SymbolKind.Field; 344case SymbolKind.Field:
Symbols\FieldSymbol.cs (1)
190return SymbolKind.Field;
Symbols\MemberSignatureComparer.cs (1)
553if (member.Kind != SymbolKind.Field)
Symbols\MemberSymbolExtensions.cs (5)
107case SymbolKind.Field: 271case SymbolKind.Field: 331case SymbolKind.Field: 349case SymbolKind.Field: 647case SymbolKind.Field:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (4)
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); 1279Debug.Assert(SymbolKind.Field.ToSortOrder() < SymbolKind.Method.ToSortOrder());
Symbols\MethodSymbolExtensions.cs (1)
112case SymbolKind.Field:
Symbols\NamedTypeSymbol.cs (1)
705case SymbolKind.Field:
Symbols\ObsoleteAttributeHelpers.cs (1)
63if (symbol.Kind == SymbolKind.Field)
Symbols\OverriddenOrHiddenMembersHelpers.cs (4)
587case SymbolKind.Field: 640case SymbolKind.Field: 716bool needToSearchForRelated = representativeMember.Kind != SymbolKind.Field && representativeMember.Kind != SymbolKind.NamedType && 854Debug.Assert(representativeMember.Kind != SymbolKind.Field);
Symbols\Source\SourceMemberContainerSymbol.cs (5)
1522case SymbolKind.Field: 2040if (symbol.Kind != SymbolKind.Field || !symbol.IsImplicitlyDeclared) 2388case SymbolKind.Field: 2688case SymbolKind.Field: 4049case SymbolKind.Field:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
651case SymbolKind.Field: 671Debug.Assert(symbol.Kind == SymbolKind.Field || symbol.Kind == SymbolKind.NamedType);
Symbols\Symbol.cs (4)
643case SymbolKind.Field: 1212case SymbolKind.Field: 1642case SymbolKind.Field: 1706case SymbolKind.Field:
Symbols\Symbol_Attributes.cs (1)
51case SymbolKind.Field:
Symbols\SymbolDistinguisher.cs (1)
62case SymbolKind.Field:
Symbols\SymbolExtensions.cs (3)
178case SymbolKind.Field: 492case SymbolKind.Field: 549SymbolKind.Field => ((FieldSymbol)symbol).RequiresInstanceReceiver,
Symbols\SymbolKindExtensions.cs (1)
40case SymbolKind.Field:
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
201SymbolKind.Field => F.Field(F.This(), (FieldSymbol)member), 248if (m.Kind is SymbolKind.Field && m is not TupleErrorFieldSymbol)
Symbols\Synthesized\SynthesizedContainer.cs (1)
133case SymbolKind.Field:
Symbols\Tuples\TupleTypeSymbol.cs (3)
595case SymbolKind.Field: 1016if (member.Kind != SymbolKind.Field) 1069case SymbolKind.Field:
Symbols\TypeSymbolExtensions.cs (1)
1749case SymbolKind.Field:
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
55return (containingSymbol.Kind is SymbolKind.Field or SymbolKind.Property) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
441case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1077if (symbol?.Kind == SymbolKind.Field)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
86not SymbolKind.Field and
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (15)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
2954SpecificationStyle(new SymbolKindOrTypeKind(SymbolKind.Field), "Field"),
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (7)
34new SymbolKindOrTypeKind(SymbolKind.Field), 52new SymbolKindOrTypeKind(SymbolKind.Field), 87new SymbolKindOrTypeKind(SymbolKind.Field), 105new SymbolKindOrTypeKind(SymbolKind.Field)); 403new SymbolKindOrTypeKind(SymbolKind.Field)); 416new SymbolKindOrTypeKind(SymbolKind.Field)); 499new SymbolKindOrTypeKind(SymbolKind.Field),
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
52if (symbol != null && symbol.Kind == SymbolKind.Field)
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (4)
179new SymbolKindOrTypeKind(SymbolKind.Field), 227new SymbolKindOrTypeKind(SymbolKind.Field), 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 })]
SymbolKey\SymbolKeyTestBase.cs (2)
168kinds.Add(SymbolKind.Field); 240case SymbolKind.Field:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
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\CodeGenDeconstructTests.cs (7)
3613Assert.Equal(SymbolKind.Field, field.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);
CodeGen\CodeGenDynamicTests.cs (1)
684case SymbolKind.Field:
CodeGen\CodeGenTupleTest.cs (2)
17374Assert.Equal(SymbolKind.Field, sym.Symbol.Kind); 17409Assert.Equal(SymbolKind.Field, bobField.Kind);
CodeGen\EventTests.cs (1)
232Assert.Equal(SymbolKind.Field, associatedField.Kind);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Attributes\AttributeTests_MarshalAs.cs (1)
36var fields = type.GetMembers().Where(s => s.Kind == SymbolKind.Field);
Attributes\AttributeTests_Tuples.cs (1)
289case SymbolKind.Field:
Diagnostics\DiagnosticAnalyzerTests.cs (7)
516SymbolKind.Namespace, SymbolKind.NamedType, SymbolKind.Event, SymbolKind.Field, SymbolKind.Method, SymbolKind.Property); 2902TestSymbolStartAnalyzerCore(new SymbolStartAnalyzer(topLevelAction: false, SymbolKind.Field), 2990SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3084SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3144SymbolKind.Property, SymbolKind.Event, SymbolKind.Field, SymbolKind.Parameter }; 3347var analyzer1 = new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.Field, analyzerId: 1); 3348var analyzer2 = new SymbolStartAnalyzer(topLevelAction: true, SymbolKind.Field, analyzerId: 2);
Semantics\OutVarTests.cs (2)
1164Assert.NotEqual(SymbolKind.Field, symbol.Kind); 32734Assert.Equal(SymbolKind.Field, symbol.Kind);
Semantics\PatternMatchingTestBase.cs (2)
195Assert.NotEqual(SymbolKind.Field, symbol.Kind); 246Assert.Equal(SymbolKind.Field, symbol.Kind);
Microsoft.CodeAnalysis.CSharp.Features (16)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
524Kind: SymbolKind.Property or SymbolKind.Field,
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (5)
511return [new SymbolKindOrTypeKind(SymbolKind.Field)]; 515new SymbolKindOrTypeKind(SymbolKind.Field), 521possibleTypes = possibleTypes.Remove(new SymbolKindOrTypeKind(SymbolKind.Field)); 527possibleTypes = possibleTypes.Remove(new SymbolKindOrTypeKind(SymbolKind.Field)); 631SymbolKind.Field => Glyph.FieldPublic,
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
302if (symbol?.Kind == SymbolKind.Field &&
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
147if (symbol.IsKind(SymbolKind.Field))
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
40new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field),
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
81new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field),
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (2)
142string.Format(fieldOrProperty.Kind == SymbolKind.Field ? FeaturesResources.Initialize_field_0 : FeaturesResources.Initialize_property_0, fieldOrProperty.Name), 223if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private))
NavigationBar\CSharpNavigationBarItemService.cs (1)
211if (symbol.Kind == SymbolKind.Field)
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
71symbol.Kind is SymbolKind.Local or SymbolKind.Field or SymbolKind.Parameter or SymbolKind.Property);
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
55return (containingSymbol.Kind is SymbolKind.Field or SymbolKind.Property) &&
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
86not SymbolKind.Field and
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (3)
78ImmutableArray.Create(new SymbolSpecification.SymbolKindOrTypeKind(SymbolKind.Field)), 110ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)), 142ImmutableArray.Create(new SymbolKindOrTypeKind(SymbolKind.Field)),
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\ColorColorTests.cs (13)
75SymbolKind.Field, "E F.E", 196SymbolKind.Field, "E F.E", 224SymbolKind.Field, "E F.E", 225SymbolKind.Field, "System.Int32 E.F", 255SymbolKind.Field, "E F.E", 287SymbolKind.Field, "E.Element", 347SymbolKind.Field, "E F.E", 376SymbolKind.Field, "E F.E", 405SymbolKind.Field, "E F.E", 438SymbolKind.Field, "E F.E", 471SymbolKind.Field, "E F.E", 956SymbolKind.Field, "Color.Red"); 1285Assert.Equal(SymbolKind.Field, info.Symbol.Kind);
Semantics\DeconstructionTests.cs (12)
4377Assert.Equal(SymbolKind.Field, a.Kind); 4381Assert.Equal(SymbolKind.Field, b.Kind); 4385Assert.Equal(SymbolKind.Field, c.Kind); 4389Assert.Equal(SymbolKind.Field, d.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); 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\InteractiveSemanticModelTests.cs (1)
144Assert.Equal(SymbolKind.Field, symbol.Kind);
Semantics\RefFieldTests.cs (1)
2020var fieldMembers = containingType.GetMembers().WhereAsArray(m => m.Kind == SymbolKind.Field);
Semantics\UnsafeTests.cs (2)
8237Assert.Equal(SymbolKind.Field, receiverSymbol.Kind); 8295Assert.Equal(SymbolKind.Field, receiverSymbol.Kind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (51)
Compilation\GetSemanticInfoTests.cs (1)
1533Assert.Equal(SymbolKind.Field, candidate.Kind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1139Assert.Equal(SymbolKind.Field, symbols[0].Kind); 3643Assert.Equal(SymbolKind.Field, symbol.Kind);
Compilation\SemanticModelGetSemanticInfoTests.cs (26)
282Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 319Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 349Assert.Equal(SymbolKind.Field, symbol.Kind); 437Assert.Equal(SymbolKind.Field, 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); 5580Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 5612Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 6881Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 10475Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 10567Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 10684Assert.Equal(SymbolKind.Field, sortedCandidates[0].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); 11582Assert.Equal(SymbolKind.Field, sortedCandidates[0].Kind); 11716Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12777Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 12852Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13104Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind); 13269Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind);
DocumentationComments\CrefTests.cs (3)
6282Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind); 6288Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind); 6298Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind);
DocumentationComments\DocumentationCommentIDTests.cs (1)
124Assert.Equal(SymbolKind.Field, symbol.Kind);
Symbols\Metadata\PE\LoadingFields.cs (2)
57Assert.Equal(SymbolKind.Field, f1.Kind); 110Assert.Equal(SymbolKind.Field, csFields.GetMembers("Fff").Single().Kind);
Symbols\Retargeting\RetargetingTests.cs (2)
1173case SymbolKind.Field: 1305case SymbolKind.Field:
Symbols\Source\EventTests.cs (2)
101Assert.Equal(SymbolKind.Field, associatedField.Kind); 139Assert.Equal(SymbolKind.Field, associatedField.Kind);
Symbols\Source\FieldTests.cs (1)
68Assert.Equal(SymbolKind.Field, sym.Kind);
Symbols\Source\PropertyTests.cs (2)
401if (m.Kind == SymbolKind.Field) 420if (m.Kind == SymbolKind.Field)
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
22701if (m01.Kind == SymbolKind.Field)
Symbols\TypeTests.cs (8)
470Assert.Equal(SymbolKind.Field, field1.Kind); 485Assert.Equal(SymbolKind.Field, field1.Kind); 631Assert.Equal(SymbolKind.Field, m.Kind); 641Assert.Equal(SymbolKind.Field, obj.Kind); 649Assert.Equal(SymbolKind.Field, dyn.Kind); 683Assert.Equal(SymbolKind.Field, symbol.Kind); 907Assert.Equal(SymbolKind.Field, varA.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 (2)
EmitMetadataTestBase.cs (1)
74var fields = t.GetMembers().Where(m => m.Kind == SymbolKind.Field).OrderBy(f => f.Name).Cast<FieldSymbol>();
Extensions.cs (1)
814case SymbolKind.Field:
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdDumpTest.cs (1)
107case SymbolKind.Field:
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Simplification\CSharpSimplificationService.Expander.cs (1)
668SymbolKind.Field or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
441case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1077if (symbol?.Kind == SymbolKind.Field)
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
236if (sourceSymbol.Kind == SymbolKind.Field &&
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekHelpers.cs (1)
58case SymbolKind.Field:
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
283else if (symbol.Kind == SymbolKind.Field && ((IFieldSymbolInternal)symbol).IsVolatile)
Microsoft.CodeAnalysis.Features (37)
AddImport\SymbolReferenceFinder.cs (1)
299if (symbol?.Kind is SymbolKind.Property or SymbolKind.Field)
ChangeSignature\AbstractChangeSignatureService.cs (2)
293if (symbol.Definition.Kind == SymbolKind.Field) 950.Where(s => s.IsKind(SymbolKind.Property) || s.IsKind(SymbolKind.Field));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
361case SymbolKind.Field:
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
61if (symbol.IsKind(SymbolKind.Field, out IFieldSymbol? field))
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
112member.MatchesKind(SymbolKind.Field, SymbolKind.Property) &&
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
189if (symbol.MatchesKind(SymbolKind.Field, SymbolKind.Property))
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
323SymbolKind.Field => GetDisplayName((IFieldSymbol)symbol), 2439case SymbolKind.Field:
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
204SymbolKind.Field or
ExtractMethod\MethodExtractor.Analyzer.cs (1)
919foreach (var pair in symbolMap.Where(p => p.Key.Kind == SymbolKind.Field))
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
609var fieldNamingRule = await _semanticDocument.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, _cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (2)
251var resource = fieldOrProperty.Kind == SymbolKind.Field 286if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private))
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (2)
35SymbolKind.Field or 47SymbolKind.Field => new WrappedFieldSymbol((IFieldSymbol)m, docCommentFormattingService),
MetadataAsSource\MetadataAsSourceFileService.cs (1)
289case SymbolKind.Field:
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
82var allDestinations = selectedMembers.All(m => m.IsKind(SymbolKind.Field))
PullMemberUp\MemberAndDestinationValidator.cs (1)
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))
Shared\Extensions\ISymbolExtensions_2.cs (1)
38case SymbolKind.Field:
Shared\Utilities\ExtractTypeHelpers.cs (1)
214case SymbolKind.Field:
Snippets\SnippetFunctionService.cs (1)
64var enumFields = typeSymbol.GetMembers().Where(m => m.Kind == SymbolKind.Field && m.IsStatic);
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
62context.RegisterSymbolAction(AnalyzeFieldSymbol, SymbolKind.Field);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
769case SymbolKind.Field:
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
193compilationStartContext.RegisterSymbolAction(AnalyzeSymbolDeclaration, SymbolKind.Method, SymbolKind.Field, SymbolKind.Property, SymbolKind.Event); 845case SymbolKind.Field:
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
115case SymbolKind.Field:
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
83if (member.Kind == SymbolKind.Field)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
316CheckSurroundingContext(SymbolKind.Field, cancellationToken); 354if (symbolKind == SymbolKind.Field)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\FallbackNamingRules.cs (3)
27new SymbolKindOrTypeKind(SymbolKind.Field), 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\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
69if (symbol.Kind == SymbolKind.Field)
Microsoft.CodeAnalysis.Test.Utilities (8)
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 (1)
257case SymbolKind.Field:
CompilationVerifier.cs (1)
747.Where(s => s.Kind == SymbolKind.Field)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2611SymbolKind.Field);
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
97SymbolKind.Field
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
73SymbolKind.Field,
Diagnostics\TrackingDiagnosticAnalyzer.cs (2)
84SymbolKind.Event, SymbolKind.Field, SymbolKind.Method, SymbolKind.NamedType, SymbolKind.Namespace, SymbolKind.Parameter, SymbolKind.Property 118new { SymbolKind = SymbolKind.Field, MethodKind = InvalidMethodKind, ReturnsVoid = false },
Microsoft.CodeAnalysis.VisualBasic (96)
Analysis\FlowAnalysis\AbstractFlowPass.vb (1)
110Debug.Assert(_info.Symbol.Kind = SymbolKind.Field OrElse
Analysis\FlowAnalysis\AlwaysAssignedWalker.vb (1)
47If v.Exists AndAlso v.Symbol.Kind <> SymbolKind.Field Then
Analysis\FlowAnalysis\DataFlowPass.vb (4)
860If member.Kind = SymbolKind.Field Then 898Case SymbolKind.Field 1111Case SymbolKind.Field 1167Debug.Assert(sym.Kind = SymbolKind.Local OrElse sym.Kind = SymbolKind.Field)
Analysis\FlowAnalysis\DataFlowsInWalker.vb (2)
113Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 118If local.Kind = SymbolKind.Field Then
Analysis\FlowAnalysis\DataFlowsOutWalker.vb (2)
147Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 150If local.Kind = SymbolKind.Field Then
Analysis\FlowAnalysis\DefinitelyAssignedWalker.vb (1)
76symbol.Kind <> SymbolKind.Field Then
Analysis\FlowAnalysis\UnassignedVariablesWalker.vb (2)
42Debug.Assert(local.Kind <> SymbolKind.Field OrElse boundFieldAccess IsNot Nothing) 44If local.Kind = SymbolKind.Field Then
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (1)
163If symbol.Kind = SymbolKind.Field Then
Binding\Binder_Attributes.vb (2)
460Case SymbolKind.Field 616Case SymbolKind.Field
Binding\Binder_Expressions.vb (7)
1911Case SymbolKind.Field, SymbolKind.Property 2241Case SymbolKind.Field 2585Case SymbolKind.Field, SymbolKind.Method, SymbolKind.Property, SymbolKind.Event 2723Case SymbolKind.Field, SymbolKind.Property 3197Case SymbolKind.Field 3524Case SymbolKind.Field 4008Case SymbolKind.Field
Binding\Binder_Initializers.vb (2)
142Debug.Assert(firstFieldOrProperty.Kind = SymbolKind.Field) 149ElseIf firstFieldOrProperty.Kind = SymbolKind.Field Then
Binding\Binder_Invocation.vb (1)
3127Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Event
Binding\Binder_Lookup.vb (2)
760If sym.Kind <> SymbolKind.Field Then 804If sym.Kind <> SymbolKind.Field Then
Binding\Binder_Statements.vb (1)
4700If member.Kind = SymbolKind.Field AndAlso
Binding\BinderBuilder.vb (3)
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 (2)
325fieldOrProperty = containingNamedTypeBinder.ContainingType.FindMember(identifier.ValueText, SymbolKind.Field, identifier.Span, _tree) 357Dim field = containingType.FindMember(identifier.ValueText, SymbolKind.Field, identifier.Span, _tree)
Binding\DeclarationInitializerBinder.vb (2)
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)))
Binding\DocumentationCommentCrefBinder.vb (2)
384Case SymbolKind.Field 782Case SymbolKind.Field
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
199Case SymbolKind.Field
Binding\InitializerSemanticModel.vb (2)
45If Me.MemberSymbol.Kind = SymbolKind.Field Then 102Case SymbolKind.Field
Binding\LookupResult.vb (2)
740If symbol1.Kind <> SymbolKind.Field OrElse symbol2.Kind <> SymbolKind.Field OrElse symbol1.ContainingType.TypeKind <> TypeKind.Enum Then
Compilation\ClsComplianceChecker.vb (2)
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) 416Case SymbolKind.Field
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (2)
717Case SymbolKind.Field 779Case SymbolKind.Field,
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
98Case SymbolKind.Field
Compilation\DocumentationComments\DocumentationCommentCompiler.vb (1)
118symbol.Kind = SymbolKind.Field OrElse
Compilation\MethodCompiler.vb (1)
469Debug.Assert(fieldOrProperty.Kind = SymbolKind.Field)
Compilation\SemanticModel.vb (2)
1213Case SymbolKind.Method, SymbolKind.Field, SymbolKind.Property 3563Case SymbolKind.Field
Emit\EditAndContinue\VisualBasicDefinitionMap.vb (1)
112If member.Kind = SymbolKind.Field Then
Emit\NoPia\EmbeddedType.vb (1)
236Case SymbolKind.Field
Emit\PEModuleBuilder.vb (1)
246SymbolKind.Field
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (1)
535Case SymbolKind.Field
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (3)
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\LocalRewriter\LocalRewriter_AssignmentOperator.vb (1)
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
Semantics\AccessCheck.vb (1)
121Case SymbolKind.Method, SymbolKind.Property, SymbolKind.Event, SymbolKind.Field
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
618Dim isConst = symbol.Kind = SymbolKind.Field AndAlso DirectCast(symbol, IFieldSymbol).IsConst
SymbolDisplay\SymbolDisplayVisitor.vb (1)
394symbol.Kind = SymbolKind.Field AndAlso
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_TemplateSymbol.vb (1)
120If m.Kind = SymbolKind.Field Then
Symbols\Attributes\AttributeData.vb (1)
566Case SymbolKind.Field
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (4)
215Case SymbolKind.Field 277Case SymbolKind.Field 310symbol.Kind = SymbolKind.Field) 339Case SymbolKind.Field
Symbols\FieldSymbol.vb (1)
179Return SymbolKind.Field
Symbols\Metadata\PE\PENamedTypeSymbol.vb (3)
389If (Not member.IsShared AndAlso member.Kind = SymbolKind.Field) Then 520Return GetMembers(Of FieldSymbol)(GetMembers(), SymbolKind.Field, offset:=0) 628Case SymbolKind.Field
Symbols\NamedTypeSymbolExtensions.vb (1)
59If child.Kind = SymbolKind.Field OrElse child.Kind = SymbolKind.Property Then
Symbols\Source\LambdaSymbol.vb (2)
131Case SymbolKind.Field 228Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Method
Symbols\Source\LocalSymbol.vb (1)
106container.Kind = SymbolKind.Field OrElse
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
3216If member.Kind = SymbolKind.Field Then
Symbols\Source\SourceNamedTypeSymbol.vb (1)
2436If Not m.IsShared And m.Kind = SymbolKind.Field Then
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (1)
378Case SymbolKind.Field, SymbolKind.NamedType
Symbols\SubstitutedNamedType.vb (2)
384Case SymbolKind.Field 488Case SymbolKind.Field
Symbols\Symbol.vb (2)
601SymbolKind.Field, 997Case SymbolKind.Field
Symbols\Symbol_Attributes.vb (1)
67Case SymbolKind.Field
Symbols\SymbolExtensions.vb (3)
53Case SymbolKind.Field, SymbolKind.Local, SymbolKind.Parameter, SymbolKind.RangeVariable 196Case SymbolKind.Field, SymbolKind.Property, SymbolKind.Method, SymbolKind.Event 324Case SymbolKind.Field
Symbols\Tuples\TupleTypeSymbol.vb (3)
661If member.Kind <> SymbolKind.Field Then 714Case SymbolKind.Field 903Case SymbolKind.Field
Symbols\WellKnownMembers.vb (2)
446targetSymbolKind = SymbolKind.Field 499Case SymbolKind.Field
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
452Case SymbolKind.Field,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (1)
283If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
248If symbol?.Kind = SymbolKind.Field OrElse symbol?.Kind = SymbolKind.Property Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
215If modifiedIdentifierNode IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Field) AndAlso GetType(T) Is GetType(FieldDeclarationSyntax) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
614Case SymbolKind.Field
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (10)
Attributes\AttributeTests_MarshalAs.vb (1)
28Dim fields = typeSym.GetMembers().Where(Function(s) s.Kind = SymbolKind.Field)
Attributes\AttributeTests_Tuples.vb (2)
257Case SymbolKind.Field 275Case SymbolKind.Field
CodeGen\CodeGenAsyncTests.vb (2)
6190Where member.Kind = SymbolKind.Field 9270Case SymbolKind.Field
CodeGen\CodeGenTuples.vb (3)
9040Assert.Equal(SymbolKind.Field, sym.Symbol.Kind) ' Incorrectly returns Local 9227Where m.Kind = SymbolKind.Field 9274Where m.Kind = SymbolKind.Field
CodeGen\CodeGenVBCore.vb (1)
3039Case SymbolKind.Field,
Emit\EmitMetadata.vb (1)
178Where(Function(m) m.Kind = SymbolKind.Field).
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (4)
CompilationContext.vb (3)
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
Microsoft.CodeAnalysis.VisualBasic.Features (7)
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
60If member.MatchesKind(SymbolKind.Field, SymbolKind.Property) AndAlso
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
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
2040Case SymbolKind.Field
NavigationBar\VisualBasicNavigationBarItemService.vb (2)
162Where member.IsShared AndAlso member.Kind = Global.Microsoft.CodeAnalysis.SymbolKind.Field 291If symbol.Kind = SymbolKind.Field AndAlso Not symbol.IsImplicitlyDeclared Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (24)
Binding\Binder_Expressions_Tests.vb (4)
3207Assert.Equal(SymbolKind.Field, symbol.Kind) 3309Assert.Equal(SymbolKind.Field, symbol.Kind) 3452Assert.Equal(SymbolKind.Field, symbol.Kind) 3496Assert.Equal(SymbolKind.Field, symbol.Kind)
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (5)
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)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
506context.RegisterSymbolAction(AddressOf AnalyzeSymbol, SymbolKind.Field)
Semantics\GetExtendedSemanticInfoTests.vb (8)
511Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 2521Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 3559Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 4063Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 5288Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 5290Assert.Equal(SymbolKind.Field, sortedCandidates(1).Kind) 7709Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 9974Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind)
Semantics\GetSemanticInfoTests.vb (3)
224Assert.Equal(SymbolKind.Field, semanticInfo.Symbol.Kind) 2053Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 2080Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind)
Semantics\RefFieldTests.vb (1)
167Dim fieldMembers = containingType.GetMembers().WhereAsArray(Function(m) m.Kind = SymbolKind.Field)
Semantics\UsingStatementTest.vb (1)
357ElseIf (type.Symbol.Kind = SymbolKind.Field) Then
Semantics\WithBlockSemanticModelTests.vb (1)
48Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (20)
DocumentationComments\DocCommentTests.vb (5)
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),
SymbolsTests\Metadata\MetadataMemberTests.vb (5)
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)
SymbolsTests\Metadata\PE\LoadingFields.vb (1)
48Assert.Equal(SymbolKind.Field, f1.Kind)
SymbolsTests\Metadata\WinMdEventTest.vb (1)
1701Assert.Equal(SymbolKind.Field, symbol.Kind)
SymbolsTests\Source\ComClassTests.vb (1)
71Case SymbolKind.Field
SymbolsTests\Source\EventTests.vb (3)
1655Assert.Equal(SymbolKind.Field, sortedCandidates(0).Kind) 1691Assert.Equal(SymbolKind.Field, semanticSummary.Symbol.Kind) 1722Assert.Equal(SymbolKind.Field, mems(1).Kind)
SymbolsTests\Source\GroupClassTests.vb (1)
3286Assert.Equal(SymbolKind.Field, symbolInfo.Symbol.Kind)
SymbolsTests\Source\TypeTests.vb (3)
569Dim _val = enumMembers.Where(Function(s) Not s.IsShared AndAlso s.Kind = SymbolKind.Field) 694Assert.Equal(SymbolKind.Field, varA.Kind) 736Assert.Equal(SymbolKind.Field, mem1.Kind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (12)
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
121Case SymbolKind.Field
Recommendations\VisualBasicRecommendationServiceRunner.vb (3)
84If symbol.Kind() = SymbolKind.Field Then 349symbols = symbols.WhereAsArray(Function(s) s.Kind <> SymbolKind.Field OrElse Not s.ContainingType.IsEnumType() OrElse s.Name <> WellKnownMemberNames.EnumBackingFieldName) 365ElseIf s.Kind = SymbolKind.Field AndAlso s.IsImplicitlyDeclared Then
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
317If symbol.Kind = SymbolKind.Field AndAlso symbol.IsImplicitlyDeclared Then
Simplification\VisualBasicSimplificationService.Expander.vb (2)
321If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then 645symbol.Kind = SymbolKind.Field OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
452Case SymbolKind.Field,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (1)
283If symbol.MatchesKind(SymbolKind.Local, SymbolKind.Field, SymbolKind.Property) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
248If symbol?.Kind = SymbolKind.Field OrElse symbol?.Kind = SymbolKind.Property Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
215If modifiedIdentifierNode IsNot Nothing AndAlso symbol.IsKind(SymbolKind.Field) AndAlso GetType(T) Is GetType(FieldDeclarationSyntax) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
614Case SymbolKind.Field
Microsoft.CodeAnalysis.Workspaces (26)
Editing\SyntaxGenerator.cs (3)
722case SymbolKind.Field: 790members: type.GetMembers().Where(s => s.Kind == SymbolKind.Field).Select(Declaration)), 824case SymbolKind.Field:
FindSymbols\Declarations\DeclarationFinder.cs (1)
123SymbolKind.Field;
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
714case SymbolKind.Field:
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
37SymbolKind.Field => true,
FindSymbols\ReferenceLocationExtensions.cs (1)
77if (current.Kind == SymbolKind.Field)
FindSymbols\SymbolFinder.cs (1)
135case SymbolKind.Field:
FindSymbols\SymbolFinder_Callers.cs (1)
84SymbolKind.Field)
Recommendations\AbstractRecommendationService.cs (2)
101case SymbolKind.Field: 120return symbol.Kind == SymbolKind.Field;
Rename\RenameUtilities.cs (1)
376if (symbol.Kind == SymbolKind.Field)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
51if (referencedSymbol.Kind == SymbolKind.Field && originalSymbol.Equals(((IFieldSymbol)referencedSymbol).AssociatedSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
484case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
258=> symbol?.Kind == SymbolKind.Field && symbol.ContainingType.IsEnumType();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
142case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (2)
132private static readonly SymbolKindOrTypeKind _field = new(SymbolKind.Field); 419case SymbolKind.Field:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
77new SymbolKindOrTypeKind(SymbolKind.Field), 510if (kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsReadOnly) 518if ((kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsConst) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SimplifierOptions.cs (1)
46SymbolKind.Field => QualifyFieldAccess,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (1)
120SymbolKind.Field => FieldsAreEquivalent((IFieldSymbol)x, (IFieldSymbol)y, equivalentTypesWithDifferingAssemblies),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
62SymbolKind.Field => CombineHashCodes((IFieldSymbol)x, currentHash),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldSymbol.cs (1)
49public override SymbolKind Kind => SymbolKind.Field;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
35SymbolKind.Field or
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
EditorConfigParsing\NamingStyleParserTests.cs (6)
82symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 164symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind), 204symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 277symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind), 314symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind)); 351symbolKind => Assert.Equal(new SymbolKindOrTypeKind(SymbolKind.Field), symbolKind));
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\MembersMustExistAnalyzer.cs (1)
63context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.Field, SymbolKind.Event);
Microsoft.Gen.Metrics (1)
Parser.cs (1)
705case SymbolKind.Field:
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
705case SymbolKind.Field:
Microsoft.ML.InternalCodeAnalyzer (3)
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
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 (1)
36context.RegisterSymbolAction(AnalyzeField, SymbolKind.Field);
Microsoft.VisualStudio.LanguageServices (17)
CallHierarchy\CallHierarchyProvider.cs (2)
61SymbolKind.Field) 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 (1)
82SymbolKind.Field or
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (1)
110SymbolKind.Field or
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
214case SymbolKind.Field:
Library\ObjectBrowser\Lists\MemberListItem.cs (1)
25case SymbolKind.Field:
Library\VsNavInfo\NavInfoFactory.cs (1)
50SymbolKind.Field or
Progression\GraphBuilder.cs (1)
279case SymbolKind.Field:
Progression\GraphNodeCreation.cs (1)
45case SymbolKind.Field:
Progression\GraphProvider.cs (1)
216if (nodes.Any(n => IsAnySymbolKind(n, SymbolKind.Event, SymbolKind.Method, SymbolKind.Property, SymbolKind.Field)))
Progression\SymbolContainment.cs (1)
58case SymbolKind.Field:
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;
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (1)
2989case SymbolKind.Field:
CodeModel\CSharpCodeModelService_Prototype.cs (2)
30case SymbolKind.Field: 59case VariableDeclaratorSyntax variableDeclarator when symbol.Kind == SymbolKind.Field:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
GlyphExtensionsTests.cs (4)
79SymbolKind.Field, 84SymbolKind.Field, 89SymbolKind.Field); 237if (kind == SymbolKind.Field)
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
CommonControls\MemberSelectionViewModelTests.vb (1)
102Assert.Empty(checkedMembers.WhereAsArray(Function(analysisResult) analysisResult.Symbol.IsKind(SymbolKind.Field)))
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 (3)
CodeModel\VisualBasicCodeModelService.vb (1)
3614Case SymbolKind.Field
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
35Case SymbolKind.Field
Progression\VisualBasicProgressionLanguageService.vb (1)
82If symbol.Kind = SymbolKind.Field AndAlso symbol.ContainingType.TypeKind = TypeKind.Enum Then
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 (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
266SymbolKind.Field => SymbolKindFlags.Field,