7 implementations of OriginalDefinition
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
173public ISymbol OriginalDefinition
Microsoft.CodeAnalysis.CSharp (2)
Symbols\PublicModel\PreprocessingSymbol.cs (1)
21ISymbol ISymbol.OriginalDefinition => this;
Symbols\PublicModel\Symbol.cs (1)
55ISymbol ISymbol.OriginalDefinition
Microsoft.CodeAnalysis.Features (2)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
73public ISymbol OriginalDefinition => _symbol.OriginalDefinition;
MetadataAsSource\AbstractMetadataAsSourceService.WrappedPropertySymbol.cs (1)
60ISymbol ISymbol.OriginalDefinition => _symbol.OriginalDefinition;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1313Private ReadOnly Property ISymbol_OriginalDefinition As ISymbol Implements ISymbol.OriginalDefinition
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
173public ISymbol OriginalDefinition
108 references to OriginalDefinition
Microsoft.CodeAnalysis (1)
Operations\ControlFlowGraphBuilder.cs (1)
3340if (candidate.OriginalDefinition.Equals(method))
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (7)
261if (IsCandidateSymbol(member.OriginalDefinition) 278var symbol = symbolContext.Symbol.OriginalDefinition; 356var memberSymbol = memberReference.Member.OriginalDefinition; 447OnSymbolUsage(memberReference.Member.OriginalDefinition, ValueUsageInfo.ReadWrite); 456OnSymbolUsage(symbol.OriginalDefinition, ValueUsageInfo.ReadWrite); 652var symbol = lazyModel.GetSymbolInfo(node, cancellationToken).Symbol?.OriginalDefinition; 760Debug.Assert(memberSymbol == memberSymbol.OriginalDefinition);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
398return symbol?.OriginalDefinition;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
45return (object)this == ((ISymbol)this).OriginalDefinition;
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (2)
211if (!enumerableType.Equals(castOrSelectSymbol?.OriginalDefinition.ContainingType) || 212!enumerableType.Equals(whereSymbol?.OriginalDefinition.ContainingType))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
555var member = operation.Member.OriginalDefinition;
Microsoft.CodeAnalysis.CSharp.Features (8)
ChangeSignature\CSharpChangeSignatureService.cs (1)
869convertedType = convertedType?.OriginalDefinition;
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
305if (symbol != null && symbol.OriginalDefinition is ITypeParameterSymbol typeParameter)
DocumentHighlighting\CSharpDocumentHighlightsService.cs (2)
49var originalSymbol = symbol.OriginalDefinition; 66boundSymbol = boundSymbol?.OriginalDefinition;
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
31!expressionSymbol.ContainingType.OriginalDefinition.Equals(within.OriginalDefinition))
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (2)
211if (!enumerableType.Equals(castOrSelectSymbol?.OriginalDefinition.ContainingType) || 212!enumerableType.Equals(whereSymbol?.OriginalDefinition.ContainingType))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
555var member = operation.Member.OriginalDefinition;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Compilation\GetSemanticInfoTests.cs (3)
4116Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info0.Symbol.OriginalDefinition).SpecialType); 4124Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info2.Symbol.OriginalDefinition).SpecialType); 4175Assert.Equal(SpecialType.System_Collections_Generic_IEnumerable_T, ((ITypeSymbol)info2.Symbol.OriginalDefinition).SpecialType);
DocumentationComments\CrefTests.cs (22)
5014Assert.Equal(constructor, model.GetSymbolInfo(crefs[0]).Symbol.OriginalDefinition); 5015Assert.Equal(constructor, model.GetSymbolInfo(crefs[1]).Symbol.OriginalDefinition); 5018Assert.Equal(constructor, model.GetSymbolInfo(crefs[3]).Symbol.OriginalDefinition); 5150Assert.Equal(type, model.GetSymbolInfo(crefs[1]).Symbol.OriginalDefinition); 5151Assert.Equal(nonGenericMethod, model.GetSymbolInfo(crefs[2]).Symbol.OriginalDefinition); 5152Assert.Equal(genericMethod, model.GetSymbolInfo(crefs[4]).Symbol.OriginalDefinition); 5153Assert.Equal(genericMethod, model.GetSymbolInfo(crefs[6]).Symbol.OriginalDefinition); 5244Assert.Equal(m1a, model.GetSymbolInfo(crefs[0]).Symbol.OriginalDefinition); 5245Assert.Equal(m1b, model.GetSymbolInfo(crefs[1]).Symbol.OriginalDefinition); 5246Assert.Equal(m2a, model.GetSymbolInfo(crefs[2]).Symbol.OriginalDefinition); 5247Assert.Equal(m2b, model.GetSymbolInfo(crefs[3]).Symbol.OriginalDefinition); 5249Assert.Equal(m1a, model.GetSymbolInfo(crefs[4]).Symbol.OriginalDefinition); 5250Assert.Equal(m1b, model.GetSymbolInfo(crefs[5]).Symbol.OriginalDefinition); 5251Assert.Equal(m2a, model.GetSymbolInfo(crefs[6]).Symbol.OriginalDefinition); 5252Assert.Equal(m2b, model.GetSymbolInfo(crefs[7]).Symbol.OriginalDefinition); 5495Assert.Equal(expectedSymbol, model.GetSymbolInfo(cref).Symbol.OriginalDefinition); 5857Assert.Equal(delegateConstructor, symbol.OriginalDefinition); 6030Assert.Equal(expectedSymbolOriginalDefinition, actualSymbol.OriginalDefinition); 6503Assert.Equal(outer, model.GetSymbolInfo(crefs[0]).Symbol.OriginalDefinition); 6504Assert.Equal(inner, model.GetSymbolInfo(crefs[1]).Symbol.OriginalDefinition); 6539Assert.Equal(compilation.GlobalNamespace.GetMember<INamedTypeSymbol>("C"), actualSymbol1.OriginalDefinition); 6647return crefs.Select(syntax => model.GetSymbolInfo(syntax).Symbol).Select(symbol => (object)symbol == null ? null : symbol.OriginalDefinition).ToArray();
Symbols\Source\DeclaringSyntaxNodeTests.cs (5)
45Assert.Equal(symbol.OriginalDefinition, model.GetDeclaredSymbol(node)); 539if (meth.AssociatedSymbol != null && meth.AssociatedSymbol.OriginalDefinition.Equals(ev1)) 545if (fld.AssociatedSymbol != null && fld.AssociatedSymbol.OriginalDefinition.Equals(prop3)) 562if (meth.AssociatedSymbol != null && meth.AssociatedSymbol.OriginalDefinition.Equals(ev1)) 568if (fld.AssociatedSymbol != null && fld.AssociatedSymbol.OriginalDefinition.Equals(prop3))
Symbols\SymbolEqualityTests.cs (2)
132var nonNullOriginal = nonNullM.OriginalDefinition; 133var nullOriginal = nullM.OriginalDefinition;
Symbols\TypeTests.cs (1)
1860Assert.Equal(originalDefinition.InstanceConstructors.Single(), symbol.OriginalDefinition);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Simplification\CSharpSimplificationService.Expander.cs (3)
560if (symbol.ContainingSymbol.Equals(symbol.OriginalDefinition.ContainingSymbol) && 815if (Equals(symbol, symbol.OriginalDefinition)) 824TypeArgumentsInAllContainingSymbol(symbol.OriginalDefinition, typeArgumentsInOriginalDefinition, enterContainingSymbol, isRecursive: false);
Simplification\Simplifiers\ExpressionSimplifier.CandidateSymbolEqualityComparer.cs (3)
31return x.OriginalDefinition.Equals(y.OriginalDefinition); 35=> obj?.OriginalDefinition.GetHashCode() ?? 0;
Microsoft.CodeAnalysis.Features (22)
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
99.Where(e => state.SemanticModel.GetSymbolInfo(e, cancellationToken).Symbol?.OriginalDefinition == methodSymbol);
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
524var typeParameterIndex = typeResolutionSymbol.OriginalDefinition.GetAllTypeParameters().IndexOf(tp => tp.Name == crefValue);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
173references = references.WhereAsArray(r => r.Definition.OriginalDefinition.Equals(symbol.OriginalDefinition));
FindUsages\AbstractFindUsagesService_FindImplementations.cs (2)
125builder.Add(symbol.OriginalDefinition); 147result.AddRange(implementations.Select(s => s.OriginalDefinition));
FindUsages\DefinitionItemFactory.cs (1)
110definition = definition.OriginalDefinition;
GenerateType\AbstractGenerateTypeService.State.cs (1)
393TypeToGenerateInOpt = (INamedTypeSymbol)symbol.OriginalDefinition;
LanguageServiceIndexFormat\SymbolMoniker.cs (2)
18if (!symbol.OriginalDefinition.Equals(symbol)) 73symbol = symbol.OriginalDefinition;
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (2)
722return symbolGroup.Select(s => s.OriginalDefinition) 723.Where(s => !s.Equals(symbolGroup.First().OriginalDefinition))
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
73public ISymbol OriginalDefinition => _symbol.OriginalDefinition;
MetadataAsSource\MetadataAsSourceFileService.cs (1)
279symbol = symbol.OriginalDefinition;
PullMemberUp\MembersPuller.cs (1)
521if (SymbolEquivalenceComparer.Instance.Equals(selectedMember, implementationOfMember?.OriginalDefinition))
Shared\Extensions\ISymbolExtensions_2.cs (2)
192symbol = symbol.OriginalDefinition; 229return containingSymbol.OriginalDefinition.GetDocumentationComment(compilation, expandIncludes: true, expandInheritdoc: true, cancellationToken: cancellationToken)?.GetParameter(parameter.Name);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (6)
261if (IsCandidateSymbol(member.OriginalDefinition) 278var symbol = symbolContext.Symbol.OriginalDefinition; 356var memberSymbol = memberReference.Member.OriginalDefinition; 447OnSymbolUsage(memberReference.Member.OriginalDefinition, ValueUsageInfo.ReadWrite); 652var symbol = lazyModel.GetSymbolInfo(node, cancellationToken).Symbol?.OriginalDefinition; 760Debug.Assert(memberSymbol == memberSymbol.OriginalDefinition);
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1313Private ReadOnly Property ISymbol_OriginalDefinition As ISymbol Implements ISymbol.OriginalDefinition
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
701convertedType = convertedType.OriginalDefinition 720nodeType = nodeType.OriginalDefinition
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (9)
DocumentationComments\DocCommentTests.vb (9)
4985TestSymbolAndTypeInfoForType(model, names(5), expSymInfo1.Symbol.OriginalDefinition) 4989Assert.NotSame(expSymInfo1.Symbol.OriginalDefinition, expSymInfo3.Symbol.OriginalDefinition) 4997Assert.Same(expSymInfo3.Symbol.OriginalDefinition, list(0).OriginalDefinition) 4998Assert.Same(expSymInfo1.Symbol.OriginalDefinition, list(1).OriginalDefinition) 5000TestSymbolAndTypeInfoForType(model, names(1), expSymInfo3.Symbol.OriginalDefinition) 5002TestSymbolAndTypeInfoForType(model, names(2), expSymInfo1.Symbol.OriginalDefinition) 5003TestSymbolAndTypeInfoForType(model, names(3), expSymInfo1.Symbol.OriginalDefinition) 12076Assert.Same(expected, expSymInfo.Symbol.OriginalDefinition)
Microsoft.CodeAnalysis.Workspaces (10)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
111var assembly = symbol.OriginalDefinition.ContainingAssembly;
FindSymbols\SymbolFinder_Callers.cs (1)
40symbol = symbol.OriginalDefinition;
FindSymbols\SymbolFinder_Hierarchy.cs (5)
40symbol = symbol.OriginalDefinition; 82if (OriginalSymbolsMatch(solution, current.GetOverriddenMember(allowLooseMatch), symbol.OriginalDefinition)) 176SymbolEquivalenceComparer.Instance.Equals(implementation.OriginalDefinition, symbol.OriginalDefinition)) 379results.Add(bestDef.OriginalDefinition);
Shared\Extensions\ISymbolExtensions.cs (1)
431var index = symbol.OriginalDefinition.GetAllTypeParameters().IndexOf(p => p.Name == typeParamName.Value);
Shared\Extensions\ITypeSymbolExtensions.cs (1)
85var originalInterfaceMember = interfaceMember.OriginalDefinition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
398return symbol?.OriginalDefinition;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
996Assert.Equal(symbol.OriginalDefinition, found.OriginalDefinition);
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
475Diag(DiagDescriptors.InaccessibleValidationAttribute, location, attributeType.Name, member.OriginalDefinition.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), validatorType.Name);
Microsoft.VisualStudio.LanguageServices (2)
Library\VsNavInfo\NavInfoFactory.cs (1)
116memberSymbol = memberSymbol.OriginalDefinition;
Workspace\VisualStudioSymbolNavigationService.cs (1)
57symbol = symbol.OriginalDefinition;