48 references to ApplicationSyntaxReference
Microsoft.AspNetCore.App.Analyzers (3)
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
213if (authorizeAttribute.AttributeData.ApplicationSyntaxReference is { } syntaxReference)
Mvc\MvcAnalyzer.cs (2)
172if (attribute.ConstructorArguments.IsEmpty || attribute.ApplicationSyntaxReference is null) 177if (attribute.ApplicationSyntaxReference.GetSyntax(cancellationToken) is AttributeSyntax attributeSyntax &&
Microsoft.AspNetCore.Mvc.Analyzers (1)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
139var syntax = attribute.ApplicationSyntaxReference.GetSyntax(context.CancellationToken);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
101.ApplicationSyntaxReference
Microsoft.CodeAnalysis (2)
PEWriter\MetadataWriter.cs (1)
3446if (customAttribute is AttributeData { ApplicationSyntaxReference: { } syntaxReference })
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
163if (attribute.ApplicationSyntaxReference?.SyntaxTree == targetSyntaxTree &&
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
590if (attribute.ApplicationSyntaxReference == null || 596var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
183return info.Context.ReuseSyntax && attribute.ApplicationSyntaxReference != null 184? attribute.ApplicationSyntaxReference.GetSyntax() as T
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
370if (attributeToRemove.ApplicationSyntaxReference == null) 375var attributeSyntaxToRemove = attributeToRemove.ApplicationSyntaxReference.GetSyntax(cancellationToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
370if (attributeToRemove.ApplicationSyntaxReference == null) 375var attributeSyntaxToRemove = attributeToRemove.ApplicationSyntaxReference.GetSyntax(cancellationToken);
Microsoft.CodeAnalysis.Features (4)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (2)
50public override SyntaxTree SyntaxTreeToModify => _attribute.ApplicationSyntaxReference.SyntaxTree; 54var attributeNode = await _attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
590if (attribute.ApplicationSyntaxReference == null || 596var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (2)
360If attributeToRemove.ApplicationSyntaxReference Is Nothing Then 364Dim attributeSyntaxToRemove = attributeToRemove.ApplicationSyntaxReference.GetSyntax(cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (2)
360If attributeToRemove.ApplicationSyntaxReference Is Nothing Then 364Dim attributeSyntaxToRemove = attributeToRemove.ApplicationSyntaxReference.GetSyntax(cancellationToken)
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
183return info.Context.ReuseSyntax && attribute.ApplicationSyntaxReference != null 184? attribute.ApplicationSyntaxReference.GetSyntax() as T
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
353var attrLoc = attribute.ApplicationSyntaxReference?.GetSyntax().GetLocation();
Microsoft.Gen.Logging (4)
Parsing\Parser.LogProperties.cs (2)
255Diag(DiagDescriptors.InvalidAttributeUsage, logPropertiesAttribute.ApplicationSyntaxReference?.GetSyntax(_cancellationToken).GetLocation(), "LogProperties"); 295Diag(DiagDescriptors.InvalidAttributeUsage, tagProviderAttribute.ApplicationSyntaxReference?.GetSyntax(_cancellationToken).GetLocation(), "TagProvider");
Parsing\Parser.TagProvider.cs (2)
35tagProviderAttribute.ApplicationSyntaxReference!.GetSyntax(_cancellationToken).GetLocation()); 63tagProviderAttribute.ApplicationSyntaxReference!.GetSyntax(_cancellationToken).GetLocation());
Microsoft.Gen.Metrics (2)
Parser.cs (2)
323if (attribute.ApplicationSyntaxReference != null && 324attribute.ApplicationSyntaxReference.GetSyntax(_cancellationToken) is AttributeSyntax syntax &&
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
323if (attribute.ApplicationSyntaxReference != null && 324attribute.ApplicationSyntaxReference.GetSyntax(_cancellationToken) is AttributeSyntax syntax &&
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
99var comImportAttribute = await declaringType.GetAttributes().First(attr => attr.AttributeClass.Equals(comImportAttributeType, SymbolEqualityComparer.Default)).ApplicationSyntaxReference.GetSyntaxAsync(ct).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportFixer.cs (1)
216var dllImportSyntax = (AttributeSyntax)await dllImportAttr!.ApplicationSyntaxReference!.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
Analyzers\CustomMarshallerAttributeFixer.cs (2)
183attr.ApplicationSyntaxReference.SyntaxTree == locationInAttribute.SourceTree 184&& attr.ApplicationSyntaxReference.Span.Contains(locationInAttribute.SourceSpan)).ConstructorArguments[0].Value!;
Microsoft.Interop.SourceGeneration (8)
DiagnosticExtensions.cs (4)
34SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; 48SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; 138SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference; 152SyntaxReference? syntaxReference = attributeData.ApplicationSyntaxReference;
TypePositionInfo.cs (4)
130outAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span); 135inAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span);
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
66var diagnostic = Diagnostic.Create(Rule, attribute.ApplicationSyntaxReference.GetSyntax().GetLocation(), context.Symbol.Name);
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
33SyntaxReference? reference = attributeData.ApplicationSyntaxReference;