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