1 override of IndexerDeclaration
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
464
public override SyntaxNode
IndexerDeclaration
(
41 references to IndexerDeclaration
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (40)
CodeGeneration\SyntaxGeneratorTests.vb (40)
1224
Generator.WithAccessorDeclarations(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x"))),
1228
Generator.WithAccessorDeclarations(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1238
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1250
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1254
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1258
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
1262
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly),
1269
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly),
1276
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly,
1285
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly,
1294
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.None),
1304
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1316
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1565
Generator.InterfaceDeclaration("i", members:={Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)}),
1573
Generator.InterfaceDeclaration("i", members:={Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}),
1793
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Internal, DeclarationModifiers.Abstract),
1849
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Protected, DeclarationModifiers.Abstract),
2198
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
2205
Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x")),
2577
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"))))
2578
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2602
Assert.Equal("Item", Generator.GetName(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"))))
2603
Assert.Equal("Item", Generator.GetName(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2627
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), "X")))
2628
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "X")))
2650
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2678
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2705
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2727
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2769
Assert.Equal("t", Generator.GetType(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("t"))).ToString())
2790
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2846
Assert.Equal(1, Generator.GetParameters(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t"))).Count)
2847
Assert.Equal(2, Generator.GetParameters(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))}, Generator.IdentifierName("t"))).Count)
2866
Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.
IndexerDeclaration
({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t")), {Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2")), Generator.ParameterDeclaration("p3", Generator.IdentifierName("t3"))})).Count)
3108
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t"))).Count)
3109
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t"), getAccessorStatements:=stmts)).Count)
3117
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t"))).Count)
3118
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t"), setAccessorStatements:=stmts)).Count)
3131
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t")), stmts)).Count)
3136
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.
IndexerDeclaration
({p}, Generator.IdentifierName("t")), stmts)).Count)
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SyntaxGenerator.cs (1)
452
var indexerDecl =
IndexerDeclaration
(