6 implementations of DeclaringSyntaxReferences
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (1)
476 references to DeclaringSyntaxReferences
ILLink.RoslynAnalyzer (2)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers (11)
Microsoft.AspNetCore.App.SourceGenerators (1)
Microsoft.AspNetCore.Components.Analyzers (4)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.CodeStyle (29)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (9)
27DeclaringSyntaxReferences.Length: > 0,
31DeclaringSyntaxReferences.Length: > 0,
37var parameterSyntax = parameter.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken);
38var constructorSyntax = constructor.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken);
39if (containingType.DeclaringSyntaxReferences.Any(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken)))
44if (member is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property &&
45property.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken) == parameterSyntax)
63DeclaringSyntaxReferences: [var constructorReference, ..],
69return containingType.DeclaringSyntaxReferences.Any(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken));
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle (25)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (19)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
Microsoft.CodeAnalysis.CSharp.Features (57)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (45)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (12)
4801Assert.Equal("(1, 2)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4824Assert.Equal("(Alice: 1, Bob: 2)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4847Assert.Equal("(1, 1)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4870Assert.Equal("(1, null)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4893Assert.Equal("(Alice:1, Bob:null)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4916Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4939Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4962Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
4997Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
5043Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
5092Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
5115Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (19)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (16)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.Features (49)
Microsoft.CodeAnalysis.Test.Utilities (4)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (8)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Microsoft.CodeAnalysis.VisualBasic.Features (24)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces (40)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (9)
27DeclaringSyntaxReferences.Length: > 0,
31DeclaringSyntaxReferences.Length: > 0,
37var parameterSyntax = parameter.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken);
38var constructorSyntax = constructor.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken);
39if (containingType.DeclaringSyntaxReferences.Any(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken)))
44if (member is IPropertySymbol { DeclaringSyntaxReferences.Length: > 0 } property &&
45property.DeclaringSyntaxReferences[0].GetSyntax(cancellationToken) == parameterSyntax)
63DeclaringSyntaxReferences: [var constructorReference, ..],
69return containingType.DeclaringSyntaxReferences.Any(static (r, arg) => r.GetSyntax(arg.cancellationToken) == arg.constructorSyntax, (constructorSyntax, cancellationToken));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Gen.Logging (6)
Microsoft.Gen.Logging.Unit.Tests (2)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Interop.ComInterfaceGenerator (3)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
Mvc.Api.Analyzers.Test (4)
System.Private.CoreLib.Generators (1)