19 references to AttributeTargetSpecifier
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
464.WithTarget(AttributeTargetSpecifier(PropertyKeyword))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
162a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
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\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
464.WithTarget(AttributeTargetSpecifier(PropertyKeyword))
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
162a => a.WithTarget(AttributeTargetSpecifier(MethodKeyword)).WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation)));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1096.Select(list => list.WithTarget(SyntaxFactory.AttributeTargetSpecifier(ReturnKeyword))); 1101return [.. attributes.Select(list => list.WithTarget(SyntaxFactory.AttributeTargetSpecifier(AssemblyKeyword)))];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
34target.HasValue ? AttributeTargetSpecifier(target.Value) : null, 55? AttributeTargetSpecifier(target.Value)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\AddAttributesTests.cs (1)
48AttributeTargetSpecifier(
Formatting\FormattingElasticTriviaTests.cs (1)
38AttributeTargetSpecifier(
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
475localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
350localDllImport = localDllImport.AddAttributeLists(returnTypeAttributes.WithTarget(AttributeTargetSpecifier(Token(SyntaxKind.ReturnKeyword))));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
1703SyntaxFactory.AttributeTargetSpecifier(SyntaxFactory.Identifier(target)));
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
32=> ((AttributeListSyntax)attributeList).WithTarget(AttributeTargetSpecifier(MethodKeyword));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
34target.HasValue ? AttributeTargetSpecifier(target.Value) : null, 55? AttributeTargetSpecifier(target.Value)