50 references to AddAttributes
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
601
logMethod = gen.
AddAttributes
(logMethod, attr);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
CodeGeneration\SyntaxGeneratorTests.cs (22)
224
var attributes = Generator.GetAttributes(Generator.
AddAttributes
(
1843
Generator.
AddAttributes
(
1849
Generator.
AddAttributes
(
1850
Generator.
AddAttributes
(
1857
Generator.
AddAttributes
(
1869
Generator.
AddAttributes
(
1881
Generator.
AddAttributes
(
1887
Generator.
AddAttributes
(
1893
Generator.
AddAttributes
(
1899
Generator.
AddAttributes
(
1905
Generator.
AddAttributes
(
1911
Generator.
AddAttributes
(
1917
Generator.
AddAttributes
(
1923
Generator.
AddAttributes
(
1929
Generator.
AddAttributes
(
1930
Generator.
AddAttributes
(
1937
Generator.
AddAttributes
(
1943
Generator.
AddAttributes
(
1949
Generator.
AddAttributes
(
1971
var withAttribute = Generator.
AddAttributes
(declaration, Generator.Attribute("a"));
1986
var added = Generator.
AddAttributes
(cls, Generator.Attribute("a"));
3839
var xAttributed = Generator.
AddAttributes
(declX, Generator.Attribute("A"));
Formatting\FormattingElasticTriviaTests.cs (1)
112
var newDecl = generator.
AddAttributes
(decl, generator.Attribute("Some")).WithAdditionalAnnotations(Formatter.Annotation);
Formatting\FormattingTreeEditTests.cs (2)
44
var root1 = root.ReplaceNode(param, g.
AddAttributes
(param, g.Attribute("MyAttr")));
58
var root2 = root.ReplaceNode(method, g.
AddAttributes
(method, g.Attribute("MyAttr")));
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (18)
CodeGeneration\SyntaxGeneratorTests.vb (18)
2132
Generator.
AddAttributes
(
2139
Generator.
AddAttributes
(
2140
Generator.
AddAttributes
(
2149
Generator.
AddAttributes
(
2162
Generator.
AddAttributes
(
2177
Generator.
AddAttributes
(
2184
Generator.
AddAttributes
(
2197
Generator.
AddAttributes
(
2204
Generator.
AddAttributes
(
2217
Generator.
AddAttributes
(
2225
Generator.
AddAttributes
(
2231
Generator.
AddAttributes
(
2240
Generator.
AddAttributes
(
2241
Generator.
AddAttributes
(
2252
Generator.
AddAttributes
(
2290
Dim withAttribute = Generator.
AddAttributes
(declaration, Generator.Attribute("a"))
2306
Dim added = Generator.
AddAttributes
(cls, Generator.Attribute("a"))
3530
Dim xAttributed = Generator.
AddAttributes
(declX, Generator.Attribute("A"))
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\AddGeneratedComClassFixer.cs (1)
29
var updatedNode = gen.
AddAttributes
(node, attribute);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248
generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.
AddAttributes
(generatedParameterSyntax,
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
64
editor.Generator.
AddAttributes
(
Analyzers\ConvertToLibraryImportFixer.cs (1)
256
generatedDeclaration = generator.
AddAttributes
(generatedDeclaration, unmanagedCallConvAttributeMaybe);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
248
generatedDeclaration = generator.ReplaceNode(generatedDeclaration, generatedParameterSyntax, generator.
AddAttributes
(generatedParameterSyntax,
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
232
newMethod = (MethodDeclarationSyntax)generator.
AddAttributes
(newMethod, attributes);