16 references to AttributeTargetSpecifier
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
464.WithTarget(AttributeTargetSpecifier(PropertyKeyword))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
160a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
34target.HasValue ? AttributeTargetSpecifier(target.Value) : null, 55? AttributeTargetSpecifier(target.Value)
Microsoft.CodeAnalysis.CSharp.Features (3)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
166var targetSpecifier = AttributeTargetSpecifier(AssemblyKeyword);
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
464.WithTarget(AttributeTargetSpecifier(PropertyKeyword))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
160a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1083.Select(list => list.WithTarget(SyntaxFactory.AttributeTargetSpecifier(ReturnKeyword))); 1088return [.. attributes.Select(list => list.WithTarget(SyntaxFactory.AttributeTargetSpecifier(AssemblyKeyword)))];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
34target.HasValue ? AttributeTargetSpecifier(target.Value) : null, 55? AttributeTargetSpecifier(target.Value)
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
424localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
369localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
32=> ((AttributeListSyntax)attributeList).WithTarget(AttributeTargetSpecifier(MethodKeyword));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
34target.HasValue ? AttributeTargetSpecifier(target.Value) : null, 55? AttributeTargetSpecifier(target.Value)