59 references to AddAttributes
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
601logMethod = gen.AddAttributes(logMethod, attr);
Microsoft.CodeAnalysis.Analyzers (1)
MetaAnalyzers\Fixers\ApplyDiagnosticAnalyzerAttributeFix.cs (1)
75SyntaxNode newClassDecl = generator.AddAttributes(classDecl, attribute);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
CodeGeneration\SyntaxGeneratorTests.cs (22)
224var attributes = Generator.GetAttributes(Generator.AddAttributes( 1861Generator.AddAttributes( 1867Generator.AddAttributes( 1868Generator.AddAttributes( 1875Generator.AddAttributes( 1887Generator.AddAttributes( 1899Generator.AddAttributes( 1905Generator.AddAttributes( 1911Generator.AddAttributes( 1917Generator.AddAttributes( 1923Generator.AddAttributes( 1929Generator.AddAttributes( 1935Generator.AddAttributes( 1941Generator.AddAttributes( 1947Generator.AddAttributes( 1948Generator.AddAttributes( 1955Generator.AddAttributes( 1961Generator.AddAttributes( 1967Generator.AddAttributes( 1989var withAttribute = Generator.AddAttributes(declaration, Generator.Attribute("a")); 2004var added = Generator.AddAttributes(cls, Generator.Attribute("a")); 3857var xAttributed = Generator.AddAttributes(declX, Generator.Attribute("A"));
Formatting\FormattingElasticTriviaTests.cs (1)
112var newDecl = generator.AddAttributes(decl, generator.Attribute("Some")).WithAdditionalAnnotations(Formatter.Annotation);
Formatting\FormattingTreeEditTests.cs (2)
44var root1 = root.ReplaceNode(param, g.AddAttributes(param, g.Attribute("MyAttr"))); 58var root2 = root.ReplaceNode(method, g.AddAttributes(method, g.Attribute("MyAttr")));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (18)
CodeGeneration\SyntaxGeneratorTests.vb (18)
2132Generator.AddAttributes( 2139Generator.AddAttributes( 2140Generator.AddAttributes( 2149Generator.AddAttributes( 2162Generator.AddAttributes( 2177Generator.AddAttributes( 2184Generator.AddAttributes( 2197Generator.AddAttributes( 2204Generator.AddAttributes( 2217Generator.AddAttributes( 2225Generator.AddAttributes( 2231Generator.AddAttributes( 2240Generator.AddAttributes( 2241Generator.AddAttributes( 2252Generator.AddAttributes( 2290Dim withAttribute = Generator.AddAttributes(declaration, Generator.Attribute("a")) 2306Dim added = Generator.AddAttributes(cls, Generator.Attribute("a")) 3530Dim xAttributed = Generator.AddAttributes(declX, Generator.Attribute("A"))
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\AddGeneratedComClassFixer.cs (1)
29var updatedNode = gen.AddAttributes(node, attribute);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
64editor.Generator.AddAttributes(
Analyzers\ConvertToLibraryImportFixer.cs (1)
256generatedDeclaration = generator.AddAttributes(generatedDeclaration, unmanagedCallConvAttributeMaybe);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.AddAttributes(generatedParameterSyntax,
Roslyn.Diagnostics.Analyzers (8)
AbstractApplyTraitToClass`1.cs (1)
117newTypeDeclaration = syntaxGenerator.AddAttributes(newTypeDeclaration, attribute.WithAdditionalAnnotations(Formatter.Annotation));
AbstractRunIterations`1.cs (2)
106updatedMethod = syntaxGenerator.AddAttributes(updatedMethod, syntaxGenerator.Attribute(WellKnownTypeNames.XunitCombinatorialDataAttribute).WithAddImportsAnnotation()); 113syntaxGenerator.AddAttributes(
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (2)
117importingConstructor = generator.AddAttributes(importingConstructor, generator.Attribute(generator.TypeExpression(importingConstructorAttributeSymbol).WithAddImportsAnnotation())); 203var newDeclaration = generator.AddAttributes(declaration, generator.Attribute(generator.TypeExpression(importingConstructorAttributeSymbol).WithAddImportsAnnotation()));
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
115var newDeclaration = generator.AddAttributes(declaration, obsoleteAttribute);
PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs (1)
64var newDeclaration = generator.AddAttributes(declaration, generator.Attribute(typeof(SharedAttribute).FullName));
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (1)
101var newDeclaration = generator.AddAttributes(declaration, generator.Attribute(generator.TypeExpression(partNotDiscoverableAttributeSymbol).WithAddImportsAnnotation()));
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
232newMethod = (MethodDeclarationSyntax)generator.AddAttributes(newMethod, attributes);