94 references to Attribute
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (59)
CodeGeneration\SyntaxGeneratorTests.cs (55)
226
Generator.
Attribute
("Attr")));
1811
Generator.
Attribute
("a"),
1815
Generator.
Attribute
("a.b"),
1845
Generator.
Attribute
("a")),
1852
Generator.
Attribute
("a")),
1853
Generator.
Attribute
("b")),
1859
Generator.
Attribute
("a")),
1865
Generator.
Attribute
("a")),
1871
Generator.
Attribute
("a")),
1877
Generator.
Attribute
("a")),
1883
Generator.
Attribute
("a")),
1889
Generator.
Attribute
("a")),
1895
Generator.
Attribute
("a")),
1901
Generator.
Attribute
("a")),
1907
Generator.
Attribute
("a")),
1913
Generator.
Attribute
("a")),
1919
Generator.
Attribute
("a")),
1925
Generator.
Attribute
("a")),
1932
Generator.
Attribute
("a")),
1933
Generator.
Attribute
("b")),
1939
Generator.
Attribute
("a")),
1945
Generator.
Attribute
("a")),
1951
Generator.
Attribute
("a")),
1971
var withAttribute = Generator.AddAttributes(declaration, Generator.
Attribute
("a"));
1986
var added = Generator.AddAttributes(cls, Generator.
Attribute
("a"));
2891
Assert.Equal(DeclarationKind.Attribute, Generator.GetDeclarationKind(Generator.
Attribute
("a")));
2914
Assert.Equal("a", Generator.GetName(Generator.
Attribute
("a")));
2937
Assert.Equal("a", Generator.GetName(Generator.WithName(Generator.
Attribute
("x"), "a")));
2960
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
Attribute
("a")));
2984
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
Attribute
("a"), Accessibility.Private)));
3008
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
Attribute
("a")));
3031
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
Attribute
("a"), DeclarationModifiers.Abstract)));
3839
var xAttributed = Generator.AddAttributes(declX, Generator.
Attribute
("A"));
4154
Generator.InsertAttributes(declC, 0, Generator.
Attribute
("A")),
4162
Generator.InsertAttributes(declC, 1, Generator.
Attribute
("A")),
4171
Generator.InsertAttributes(declC, 2, Generator.
Attribute
("A")),
4180
Generator.InsertAttributes(declC, 3, Generator.
Attribute
("A")),
4238
Generator.ReplaceNode(declC, attrX, Generator.
Attribute
("A")),
4245
Generator.ReplaceNode(declC, attrY, Generator.
Attribute
("A")),
4252
Generator.ReplaceNode(declC, attrZ, Generator.
Attribute
("A")),
4334
Generator.InsertReturnAttributes(declM, 0, Generator.
Attribute
("A")),
4342
Generator.InsertReturnAttributes(declM, 1, Generator.
Attribute
("A")),
4351
Generator.InsertReturnAttributes(declM, 2, Generator.
Attribute
("A")),
4360
Generator.InsertReturnAttributes(declM, 3, Generator.
Attribute
("A")),
4369
Generator.ReplaceNode(declM, attrX, Generator.
Attribute
("Q")),
4442
Generator.InsertAttributes(declM, 0, Generator.
Attribute
("Q")),
4454
Generator.InsertAttributes(declM, 1, Generator.
Attribute
("Q")),
4466
Generator.InsertAttributes(declM, 2, Generator.
Attribute
("Q")),
4479
Generator.InsertAttributes(declM, 3, Generator.
Attribute
("Q")),
4491
Generator.InsertAttributes(declM, 4, Generator.
Attribute
("Q")),
4503
Generator.InsertReturnAttributes(declM, 0, Generator.
Attribute
("Q")),
4515
Generator.InsertReturnAttributes(declM, 1, Generator.
Attribute
("Q")),
4527
Generator.InsertReturnAttributes(declM, 2, Generator.
Attribute
("Q")),
4540
Generator.InsertReturnAttributes(declM, 3, Generator.
Attribute
("Q")),
4553
Generator.InsertReturnAttributes(declM, 4, Generator.
Attribute
("Q")),
Formatting\FormattingElasticTriviaTests.cs (1)
112
var newDecl = generator.AddAttributes(decl, generator.
Attribute
("Some")).WithAdditionalAnnotations(Formatter.Annotation);
Formatting\FormattingTreeEditTests.cs (3)
40
var attr = g.
Attribute
("MyAttr");
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 (34)
CodeGeneration\SyntaxGeneratorTests.vb (34)
2101
Generator.
Attribute
("a"),
2105
Generator.
Attribute
("a.b"),
2134
Generator.
Attribute
("a")),
2142
Generator.
Attribute
("a")),
2143
Generator.
Attribute
("b")),
2151
Generator.
Attribute
("a")),
2158
Generator.
Attribute
("a")),
2164
Generator.
Attribute
("a")),
2172
Generator.
Attribute
("a")),
2179
Generator.
Attribute
("a")),
2186
Generator.
Attribute
("a")),
2199
Generator.
Attribute
("a")),
2206
Generator.
Attribute
("a")),
2219
Generator.
Attribute
("a")),
2227
Generator.
Attribute
("a")),
2233
Generator.
Attribute
("a")),
2243
Generator.
Attribute
("a")),
2244
Generator.
Attribute
("b")),
2254
Generator.
Attribute
("a")),
2290
Dim withAttribute = Generator.AddAttributes(declaration, Generator.
Attribute
("a"))
2306
Dim added = Generator.AddAttributes(cls, Generator.
Attribute
("a"))
2586
Assert.Equal(DeclarationKind.Attribute, Generator.GetDeclarationKind(Generator.
Attribute
("a")))
2611
Assert.Equal("a", Generator.GetName(Generator.
Attribute
("a")))
2636
Assert.Equal("a", Generator.GetName(Generator.WithName(Generator.
Attribute
("x"), "a")))
2658
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.
Attribute
("a")))
2686
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
Attribute
("a"), Accessibility.Private)))
2713
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.
Attribute
("a")))
2735
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.
Attribute
("a"), DeclarationModifiers.Abstract)))
3530
Dim xAttributed = Generator.AddAttributes(declX, Generator.
Attribute
("A"))
3754
Generator.InsertAttributes(declC, 0, Generator.
Attribute
("A")),
3762
Generator.InsertAttributes(declC, 1, Generator.
Attribute
("A")),
3771
Generator.InsertAttributes(declC, 2, Generator.
Attribute
("A")),
3780
Generator.InsertAttributes(declC, 3, Generator.
Attribute
("A")),
3789
Generator.ReplaceNode(declC, declX, Generator.
Attribute
("A")),
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
1015
=>
Attribute
(name, (IEnumerable<SyntaxNode>)attributeArguments);