2 implementations of AssociatedSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\FieldSymbol.cs (1)
26ISymbol IFieldSymbol.AssociatedSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\FieldSymbol.vb (1)
404Private ReadOnly Property IFieldSymbol_AssociatedSymbol As ISymbol Implements IFieldSymbol.AssociatedSymbol
35 references to AssociatedSymbol
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
147.Any(f => f.IsImplicitlyDeclared && SymbolEqualityComparer.Default.Equals(propertySymbol, f.AssociatedSymbol));
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1137Debug.Assert(((IFieldSymbol)symbol).AssociatedSymbol == null);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
708/// Backing fields have a non-null <see cref="IFieldSymbol.AssociatedSymbol"/>. 827return ((IFieldSymbol)memberSymbol).AssociatedSymbol == null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IPropertySymbolExtensions.cs (1)
14.FirstOrDefault(f => property.Equals(f.AssociatedSymbol));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
508.Select(field => field.AssociatedSymbol ?? field)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
81.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Source\DeclaringSyntaxNodeTests.cs (4)
545if (fld.AssociatedSymbol != null && fld.AssociatedSymbol.OriginalDefinition.Equals(prop3)) 568if (fld.AssociatedSymbol != null && fld.AssociatedSymbol.OriginalDefinition.Equals(prop3))
Microsoft.CodeAnalysis.Features (5)
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
60var field = fields.FirstOrDefault(f => propertySymbol.Equals(f.AssociatedSymbol));
EditAndContinue\Utilities\Extensions.cs (1)
170=> property.ContainingType.GetMembers().Any(static (member, property) => member is IFieldSymbol field && field.AssociatedSymbol == property, property);
GenerateFromMembers\AbstractGenerateFromMembersCodeRefactoringProvider.cs (1)
78=> field.AssociatedSymbol == null;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
708/// Backing fields have a non-null <see cref="IFieldSymbol.AssociatedSymbol"/>. 827return ((IFieldSymbol)memberSymbol).AssociatedSymbol == null;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\FieldSymbol.vb (1)
404Private ReadOnly Property IFieldSymbol_AssociatedSymbol As ISymbol Implements IFieldSymbol.AssociatedSymbol
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
Recommendations\VisualBasicRecommendationServiceRunner.vb (1)
366Dim associatedSymbol = DirectCast(s, IFieldSymbol).AssociatedSymbol
Rename\VisualBasicRenameRewriterLanguageService.vb (3)
327If fieldSymbol.AssociatedSymbol IsNot Nothing AndAlso 328fieldSymbol.AssociatedSymbol.IsKind(SymbolKind.Property) AndAlso 329fieldSymbol.Name = "_" + fieldSymbol.AssociatedSymbol.Name Then
Microsoft.CodeAnalysis.Workspaces (11)
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (2)
86return field is { IsImplicitlyDeclared: true, AssociatedSymbol.Kind: SymbolKind.Property } 87? field.AssociatedSymbol
FindSymbols\FindReferences\Finders\EventSymbolReferenceFinder.cs (1)
28.Where(f => symbol.Equals(f.AssociatedSymbol))
FindSymbols\FindReferences\Finders\FieldSymbolReferenceFinder.cs (2)
24return symbol.AssociatedSymbol != null 25? new(ImmutableArray.Create(symbol.AssociatedSymbol))
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
57symbol.Equals(field.AssociatedSymbol))
Rename\RenameUtilities.cs (2)
380fieldSymbol.AssociatedSymbol.IsKind(SymbolKind.Property)) 382return fieldSymbol.AssociatedSymbol;
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
51if (referencedSymbol.Kind == SymbolKind.Field && originalSymbol.Equals(((IFieldSymbol)referencedSymbol).AssociatedSymbol))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IPropertySymbolExtensions.cs (1)
14.FirstOrDefault(f => property.Equals(f.AssociatedSymbol));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
508.Select(field => field.AssociatedSymbol ?? field)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
1399Dim propertySymbol = TryCast(fieldSymbol.AssociatedSymbol, IPropertySymbol)
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
956fieldInfo.AssociatedSymbol != null ||