4 implementations of AssociatedSymbol
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
101public virtual ISymbol AssociatedSymbol => null;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\MethodSymbol.cs (1)
218ISymbol IMethodSymbol.AssociatedSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\MethodSymbol.vb (1)
1098Private ReadOnly Property IMethodSymbol_AssociatedSymbol As ISymbol Implements IMethodSymbol.AssociatedSymbol
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
101public virtual ISymbol AssociatedSymbol => null;
63 references to AssociatedSymbol
ILLink.RoslynAnalyzer (9)
DynamicallyAccessedMembersAnalyzer.cs (1)
282 || methodSymbol.AssociatedSymbol is not IPropertySymbol propertySymbol
ISymbolExtensions.cs (1)
104 methodSymbol.AssociatedSymbol is ISymbol associatedSymbol ? GetDynamicallyAccessedMemberTypes (associatedSymbol) : DynamicallyAccessedMemberTypes.None;
RequiresAssemblyFilesAnalyzer.cs (1)
112 else if (method.AssociatedSymbol is ISymbol associatedSymbol &&
RequiresISymbolExtensions.cs (2)
21 if (member is IMethodSymbol { AssociatedSymbol: { } associated } && associated.TryGetAttribute (requiresAttribute, out requiresAttributeData)) 61 if (member is IMethodSymbol { AssociatedSymbol: { } associated } && associated.TryGetAttribute (attributeName, out requiresAttribute))
TrimAnalysis\FlowAnnotations.cs (2)
162 var property = (IPropertySymbol) parameterMethod.AssociatedSymbol!; 181 var property = (IPropertySymbol) method.AssociatedSymbol!;
TrimAnalysis\HandleCallAction.cs (1)
237 var property = (IPropertySymbol) method.Method.AssociatedSymbol!;
TrimAnalysis\TrimAnalysisVisitor.cs (1)
367 IPropertySymbol propertySymbol = (IPropertySymbol) method.AssociatedSymbol!;
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
761if (methodSymbol.AssociatedSymbol != null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
314if (method.AssociatedSymbol != null) 316symbol = method.AssociatedSymbol;
Microsoft.CodeAnalysis.CSharp (2)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
434var associatedProperty = (IPropertySymbol?)symbol.AssociatedSymbol; 449var associatedEvent = (IEventSymbol?)symbol.AssociatedSymbol;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
187owningMethod.AssociatedSymbol is IPropertySymbol { DeclaringSyntaxReferences: [var reference, ..] } &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
127if (method.AssociatedSymbol is IEventSymbol) 133if (method.AssociatedSymbol is IPropertySymbol property) 653if (method.AssociatedSymbol is IEventSymbol) 659if (method.AssociatedSymbol is IPropertySymbol property)
Microsoft.CodeAnalysis.CSharp.Features (4)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
184=> member is IMethodSymbol { AssociatedSymbol: IPropertySymbol property } && property.IsSynthesizedAutoProperty(); 1984MethodKind.PropertyGet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_getter : CSharpFeaturesResources.property_getter, 1985MethodKind.PropertySet => symbol.AssociatedSymbol is IPropertySymbol { IsIndexer: true } ? CSharpFeaturesResources.indexer_setter : CSharpFeaturesResources.property_setter,
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
187owningMethod.AssociatedSymbol is IPropertySymbol { DeclaringSyntaxReferences: [var reference, ..] } &&
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NativeIntegerTests.cs (1)
331return includeUnderlyingMember(method.AssociatedSymbol);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Source\DeclaringSyntaxNodeTests.cs (4)
539if (meth.AssociatedSymbol != null && meth.AssociatedSymbol.OriginalDefinition.Equals(ev1)) 562if (meth.AssociatedSymbol != null && meth.AssociatedSymbol.OriginalDefinition.Equals(ev1))
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\CSharpRenameRewriterLanguageService.cs (1)
941var property = ((IMethodSymbol)symbol).AssociatedSymbol!;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
127if (method.AssociatedSymbol is IEventSymbol) 133if (method.AssociatedSymbol is IPropertySymbol property) 653if (method.AssociatedSymbol is IEventSymbol) 659if (method.AssociatedSymbol is IPropertySymbol property)
Microsoft.CodeAnalysis.Features (4)
CodeLens\CodeLensFindReferenceProgress.cs (1)
72(definition as IMethodSymbol)?.AssociatedSymbol != null;
CodeLens\CodeLensReferencesService.cs (1)
233return method.AssociatedSymbol;
Shared\Extensions\ISymbolExtensions_2.cs (1)
255return method.AssociatedSymbol?.GetDocumentationComment(compilation, expandIncludes: true, expandInheritdoc: true, cancellationToken: cancellationToken) ?? DocumentationComment.Empty;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
761if (methodSymbol.AssociatedSymbol != null)
Microsoft.CodeAnalysis.VisualBasic (2)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
328Dim associatedPropertyOrEvent = symbol.AssociatedSymbol
Symbols\MethodSymbol.vb (1)
1098Private ReadOnly Property IMethodSymbol_AssociatedSymbol As ISymbol Implements IMethodSymbol.AssociatedSymbol
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (2)
143If method.AssociatedSymbol IsNot Nothing Then 533If method.AssociatedSymbol IsNot Nothing Then
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeLens\VisualBasicDisplayInfoService.vb (1)
100Dim propertySymbol = TryCast(methodSymbol.AssociatedSymbol, IPropertySymbol)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (2)
143If method.AssociatedSymbol IsNot Nothing Then 533If method.AssociatedSymbol IsNot Nothing Then
Microsoft.CodeAnalysis.Workspaces (15)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
190if (containingMethod.AssociatedSymbol is IPropertySymbol property)
FindSymbols\FindReferences\Finders\PropertyAccessorSymbolReferenceFinder.cs (4)
27return options.AssociatePropertyReferencesWithSpecificAccessor || symbol.AssociatedSymbol == null 29: new(ImmutableArray.Create(symbol.AssociatedSymbol)); 47if (symbol.AssociatedSymbol is IPropertySymbol property && 74if (symbol.AssociatedSymbol is not IPropertySymbol property ||
FindSymbols\ReferenceLocationExtensions.cs (1)
92return method.AssociatedSymbol;
FindSymbols\SymbolFinder_Hierarchy.cs (1)
147? ((IMethodSymbol)symbol).AssociatedSymbol?.Name
ReassignedVariable\AbstractReassignedVariableService.cs (1)
185methodOrProperty = method.AssociatedSymbol as IPropertySymbol;
Rename\RenameUtilities.cs (3)
215return ((IMethodSymbol)symbol).AssociatedSymbol; 341if (containingMethod.AssociatedSymbol is IPropertySymbol) 343var associatedPropertyOrEvent = (IPropertySymbol)containingMethod.AssociatedSymbol;
Shared\Extensions\SemanticModelExtensions.cs (2)
37if (method.AssociatedSymbol != null) 39return method.AssociatedSymbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
314if (method.AssociatedSymbol != null) 316symbol = method.AssociatedSymbol;
Microsoft.VisualStudio.LanguageServices (4)
Progression\GraphNodeIdCreation.cs (3)
469if (containingSymbol is IMethodSymbol method && method.AssociatedSymbol != null && method.AssociatedSymbol.Kind == SymbolKind.Property) 471var property = (IPropertySymbol)method.AssociatedSymbol;
Progression\SymbolContainment.cs (1)
79if (member is IMethodSymbol method && method.AssociatedSymbol != null)