CodeGeneration\SyntaxGeneratorTests.vb (2246)
62VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0), "0")
63VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1), "1")
64VerifySyntax(Of UnaryExpressionSyntax)(Generator.LiteralExpression(-1), "-1")
65VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Integer.MinValue), "Global.System.Int32.MinValue")
66VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Integer.MaxValue), "Global.System.Int32.MaxValue")
68VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0L), "0L")
69VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1L), "1L")
70VerifySyntax(Of UnaryExpressionSyntax)(Generator.LiteralExpression(-1L), "-1L")
71VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Long.MinValue), "Global.System.Int64.MinValue")
72VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Long.MaxValue), "Global.System.Int64.MaxValue")
74VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0UL), "0UL")
75VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1UL), "1UL")
76VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(ULong.MinValue), "0UL")
77VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(ULong.MaxValue), "Global.System.UInt64.MaxValue")
79VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0.0F), "0F")
80VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1.0F), "1F")
81VerifySyntax(Of UnaryExpressionSyntax)(Generator.LiteralExpression(-1.0F), "-1F")
82VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.MinValue), "Global.System.Single.MinValue")
83VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.MaxValue), "Global.System.Single.MaxValue")
84VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.Epsilon), "Global.System.Single.Epsilon")
85VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.NaN), "Global.System.Single.NaN")
86VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.NegativeInfinity), "Global.System.Single.NegativeInfinity")
87VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Single.PositiveInfinity), "Global.System.Single.PositiveInfinity")
89VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0.0), "0R")
90VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1.0), "1R")
91VerifySyntax(Of UnaryExpressionSyntax)(Generator.LiteralExpression(-1.0), "-1R")
92VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.MinValue), "Global.System.Double.MinValue")
93VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.MaxValue), "Global.System.Double.MaxValue")
94VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.Epsilon), "Global.System.Double.Epsilon")
95VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.NaN), "Global.System.Double.NaN")
96VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.NegativeInfinity), "Global.System.Double.NegativeInfinity")
97VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Double.PositiveInfinity), "Global.System.Double.PositiveInfinity")
99VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0D), "0D")
100VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(0.00D), "0.00D")
101VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("1.00", CultureInfo.InvariantCulture)), "1.00D")
102VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("-1.00", CultureInfo.InvariantCulture)), "-1.00D")
103VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("1.0000000000", CultureInfo.InvariantCulture)), "1.0000000000D")
104VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("0.000000", CultureInfo.InvariantCulture)), "0.000000D")
105VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("0.0000000", CultureInfo.InvariantCulture)), "0.0000000D")
106VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(1000000000D), "1000000000D")
107VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(123456789.123456789D), "123456789.123456789D")
108VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("1E-28", NumberStyles.Any, CultureInfo.InvariantCulture)), "0.0000000000000000000000000001D")
109VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("0E-28", NumberStyles.Any, CultureInfo.InvariantCulture)), "0.0000000000000000000000000000D")
110VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("1E-29", NumberStyles.Any, CultureInfo.InvariantCulture)), "0.0000000000000000000000000000D")
111VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(Decimal.Parse("-1E-29", NumberStyles.Any, CultureInfo.InvariantCulture)), "0.0000000000000000000000000000D")
112VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Decimal.MinValue), "Global.System.Decimal.MinValue")
113VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.LiteralExpression(Decimal.MaxValue), "Global.System.Decimal.MaxValue")
115VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression("c"c), """c""c")
117VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression("str"), """str""")
119VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(True), "True")
120VerifySyntax(Of LiteralExpressionSyntax)(Generator.LiteralExpression(False), "False")
125VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
132VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
141VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
150VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
159VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
168VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
181VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
190VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
199VerifySyntax(Of AttributeListSyntax)(Generator.Attribute(GetAttributeData("
218VerifySyntax(Of IdentifierNameSyntax)(Generator.IdentifierName("x"), "x")
219VerifySyntax(Of QualifiedNameSyntax)(Generator.QualifiedName(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x.y")
220VerifySyntax(Of QualifiedNameSyntax)(Generator.DottedName("x.y"), "x.y")
222VerifySyntax(Of GenericNameSyntax)(Generator.GenericName("x", Generator.IdentifierName("y")), "x(Of y)")
223VerifySyntax(Of GenericNameSyntax)(Generator.GenericName("x", Generator.IdentifierName("y"), Generator.IdentifierName("z")), "x(Of y, z)")
226VerifySyntax(Of GenericNameSyntax)(Generator.WithTypeArguments(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x(Of y)")
229VerifySyntax(Of QualifiedNameSyntax)(Generator.WithTypeArguments(Generator.DottedName("x.y"), Generator.IdentifierName("z")), "x.y(Of z)")
232VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.WithTypeArguments(Generator.MemberAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")), "x.y(Of z)")
235Dim gname = Generator.WithTypeArguments(Generator.IdentifierName("x"), Generator.IdentifierName("y"))
237VerifySyntax(Of GenericNameSyntax)(Generator.WithTypeArguments(gname, Generator.IdentifierName("z")), "x(Of z)")
243VerifySyntax(Of TypeSyntax)(Generator.IdentifierName("x"), "x")
244VerifySyntax(Of TypeSyntax)(Generator.QualifiedName(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x.y")
245VerifySyntax(Of TypeSyntax)(Generator.DottedName("x.y"), "x.y")
246VerifySyntax(Of TypeSyntax)(Generator.GenericName("x", Generator.IdentifierName("y")), "x(Of y)")
247VerifySyntax(Of TypeSyntax)(Generator.GenericName("x", Generator.IdentifierName("y"), Generator.IdentifierName("z")), "x(Of y, z)")
249VerifySyntax(Of TypeSyntax)(Generator.ArrayTypeExpression(Generator.IdentifierName("x")), "x()")
250VerifySyntax(Of TypeSyntax)(Generator.ArrayTypeExpression(Generator.ArrayTypeExpression(Generator.IdentifierName("x"))), "x()()")
251VerifySyntax(Of TypeSyntax)(Generator.NullableTypeExpression(Generator.IdentifierName("x")), "x?")
252VerifySyntax(Of TypeSyntax)(Generator.NullableTypeExpression(Generator.NullableTypeExpression(Generator.IdentifierName("x"))), "x?")
255VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(Generator.IdentifierName("x")), "x")
256VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(Generator.IdentifierName("x"), "y"), "y As x")
257VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(intType), "System.Int32")
258VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(intType, "y"), "y As System.Int32")
259VerifySyntax(Of TypeSyntax)(Generator.TupleTypeExpression(Generator.TupleElementExpression(Generator.IdentifierName("x")), Generator.TupleElementExpression(Generator.IdentifierName("y"))), "(x, y)")
260VerifySyntax(Of TypeSyntax)(Generator.TupleTypeExpression(New ITypeSymbol() {intType, intType}), "(System.Int32, System.Int32)")
261VerifySyntax(Of TypeSyntax)(Generator.TupleTypeExpression(New ITypeSymbol() {intType, intType}, New String() {"x", "y"}), "(x As System.Int32, y As System.Int32)")
266VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Byte), "Byte")
267VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_SByte), "SByte")
269VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int16), "Short")
270VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt16), "UShort")
272VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int32), "Integer")
273VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt32), "UInteger")
275VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Int64), "Long")
276VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_UInt64), "ULong")
278VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Single), "Single")
279VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Double), "Double")
281VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Char), "Char")
282VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_String), "String")
284VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Object), "Object")
285VerifySyntax(Of TypeSyntax)(Generator.TypeExpression(SpecialType.System_Decimal), "Decimal")
291VerifySyntax(Of QualifiedNameSyntax)(Generator.TypeExpression(genericType), "Global.System.Collections.Generic.IEnumerable(Of T)")
294VerifySyntax(Of ArrayTypeSyntax)(Generator.TypeExpression(arrayType), "System.Int32()")
299VerifySyntax(Of UnaryExpressionSyntax)(Generator.NegateExpression(Generator.IdentifierName("x")), "-(x)")
300VerifySyntax(Of BinaryExpressionSyntax)(Generator.AddExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) + (y)")
301VerifySyntax(Of BinaryExpressionSyntax)(Generator.SubtractExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) - (y)")
302VerifySyntax(Of BinaryExpressionSyntax)(Generator.MultiplyExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) * (y)")
303VerifySyntax(Of BinaryExpressionSyntax)(Generator.DivideExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) / (y)")
304VerifySyntax(Of BinaryExpressionSyntax)(Generator.ModuloExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) Mod (y)")
306VerifySyntax(Of UnaryExpressionSyntax)(Generator.BitwiseNotExpression(Generator.IdentifierName("x")), "Not(x)")
307VerifySyntax(Of BinaryExpressionSyntax)(Generator.BitwiseAndExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) And (y)")
308VerifySyntax(Of BinaryExpressionSyntax)(Generator.BitwiseOrExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) Or (y)")
310VerifySyntax(Of UnaryExpressionSyntax)(Generator.LogicalNotExpression(Generator.IdentifierName("x")), "Not(x)")
311VerifySyntax(Of BinaryExpressionSyntax)(Generator.LogicalAndExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) AndAlso (y)")
312VerifySyntax(Of BinaryExpressionSyntax)(Generator.LogicalOrExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) OrElse (y)")
317VerifySyntax(Of BinaryExpressionSyntax)(Generator.ReferenceEqualsExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) Is (y)")
318VerifySyntax(Of BinaryExpressionSyntax)(Generator.ValueEqualsExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) = (y)")
320VerifySyntax(Of BinaryExpressionSyntax)(Generator.ReferenceNotEqualsExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) IsNot (y)")
321VerifySyntax(Of BinaryExpressionSyntax)(Generator.ValueNotEqualsExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) <> (y)")
323VerifySyntax(Of BinaryExpressionSyntax)(Generator.LessThanExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) < (y)")
324VerifySyntax(Of BinaryExpressionSyntax)(Generator.LessThanOrEqualExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) <= (y)")
326VerifySyntax(Of BinaryExpressionSyntax)(Generator.GreaterThanExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) > (y)")
327VerifySyntax(Of BinaryExpressionSyntax)(Generator.GreaterThanOrEqualExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "(x) >= (y)")
332VerifySyntax(Of BinaryConditionalExpressionSyntax)(Generator.CoalesceExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "If(x, y)")
333VerifySyntax(Of TernaryConditionalExpressionSyntax)(Generator.ConditionalExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"), Generator.IdentifierName("z")), "If(x, y, z)")
338VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x.y")
339VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.IdentifierName("x"), "y"), "x.y")
340VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.MemberAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")), "x.y.z")
341VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")), "x(y).z")
342VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.ElementAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")), "x(y).z")
343VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.AddExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")), "((x) + (y)).z")
344VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.NegateExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y")), "(-(x)).y")
350Generator.ArrayCreationExpression(Generator.IdentifierName("x"), Generator.LiteralExpression(10)),
354Generator.ArrayCreationExpression(Generator.IdentifierName("x"), {Generator.IdentifierName("y"), Generator.IdentifierName("z")}),
361Generator.ObjectCreationExpression(Generator.IdentifierName("x")),
365Generator.ObjectCreationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")),
373Generator.ObjectCreationExpression(listOfIntType, Generator.IdentifierName("y")),
380Generator.ElementAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")),
384Generator.ElementAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"), Generator.IdentifierName("z")),
388Generator.ElementAccessExpression(Generator.MemberAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")),
392Generator.ElementAccessExpression(Generator.ElementAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")),
396Generator.ElementAccessExpression(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")),
400Generator.ElementAccessExpression(Generator.AddExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), Generator.IdentifierName("z")),
406VerifySyntax(Of DirectCastExpressionSyntax)(Generator.CastExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "DirectCast(y, x)")
407VerifySyntax(Of CTypeExpressionSyntax)(Generator.ConvertExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "CType(y, x)")
412VerifySyntax(Of TypeOfExpressionSyntax)(Generator.IsTypeExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "TypeOf(x) Is y")
413VerifySyntax(Of TryCastExpressionSyntax)(Generator.TryCastExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "TryCast(x, y)")
414VerifySyntax(Of GetTypeExpressionSyntax)(Generator.TypeOfExpression(Generator.IdentifierName("x")), "GetType(x)")
420VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x")), "x()")
421VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x(y)")
422VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"), Generator.IdentifierName("z")), "x(y, z)")
425VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.Argument(Generator.IdentifierName("y"))), "x(y)")
426VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.Argument(RefKind.Ref, Generator.IdentifierName("y"))), "x(y)")
427VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.Argument(RefKind.Out, Generator.IdentifierName("y"))), "x(y)")
429VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.MemberAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), "x.y()")
430VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.ElementAccessExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), "x(y)()")
431VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.InvocationExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), "x(y)()")
432VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.AddExpression(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), "((x) + (y))()")
437VerifySyntax(Of AssignmentStatementSyntax)(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y")), "x = y")
442VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.IdentifierName("x")), "x")
443VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("x"))), "x()")
448VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "y"), "Dim y As x")
449VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "y", Generator.IdentifierName("z")), "Dim y As x = z")
450VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement("y", Generator.IdentifierName("z")), "Dim y = z")
452VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "y", isConst:=True), "Const y As x")
453VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "y", Generator.IdentifierName("z"), isConst:=True), "Const y As x = z")
454VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(DirectCast(Nothing, SyntaxNode), "y", Generator.IdentifierName("z"), isConst:=True), "Const y = z")
459VerifySyntax(Of AwaitExpressionSyntax)(Generator.AwaitExpression(Generator.IdentifierName("x")), "Await x")
464VerifySyntax(Of NameOfExpressionSyntax)(Generator.NameOfExpression(Generator.IdentifierName("x")), "NameOf(x)")
469VerifySyntax(Of TupleExpressionSyntax)(Generator.TupleExpression(
470{Generator.IdentifierName("x"), Generator.IdentifierName("y")}), "(x, y)")
471VerifySyntax(Of TupleExpressionSyntax)(Generator.TupleExpression(
472{Generator.Argument("goo", RefKind.None, Generator.IdentifierName("x")),
473Generator.Argument("bar", RefKind.None, Generator.IdentifierName("y"))}), "(goo:=x, bar:=y)")
478VerifySyntax(Of ReturnStatementSyntax)(Generator.ReturnStatement(), "Return")
479VerifySyntax(Of ReturnStatementSyntax)(Generator.ReturnStatement(Generator.IdentifierName("x")), "Return x")
484VerifySyntax(Of YieldStatementSyntax)(Generator.YieldReturnStatement(Generator.LiteralExpression(1)), "Yield 1")
485VerifySyntax(Of YieldStatementSyntax)(Generator.YieldReturnStatement(Generator.IdentifierName("x")), "Yield x")
490VerifySyntax(Of ThrowStatementSyntax)(Generator.ThrowStatement(), "Throw")
491VerifySyntax(Of ThrowStatementSyntax)(Generator.ThrowStatement(Generator.IdentifierName("x")), "Throw x")
497Generator.IfStatement(Generator.IdentifierName("x"), New SyntaxNode() {}),
502Generator.IfStatement(Generator.IdentifierName("x"), Nothing),
507Generator.IfStatement(Generator.IdentifierName("x"), New SyntaxNode() {}, New SyntaxNode() {}),
513Generator.IfStatement(Generator.IdentifierName("x"),
514{Generator.IdentifierName("y")}),
520Generator.IfStatement(Generator.IdentifierName("x"),
521{Generator.IdentifierName("y")},
522{Generator.IdentifierName("z")}),
530Generator.IfStatement(Generator.IdentifierName("x"),
531{Generator.IdentifierName("y")},
532{Generator.IfStatement(Generator.IdentifierName("p"), {Generator.IdentifierName("q")})}),
540Generator.IfStatement(Generator.IdentifierName("x"),
541{Generator.IdentifierName("y")},
542Generator.IfStatement(Generator.IdentifierName("p"),
543{Generator.IdentifierName("q")},
544{Generator.IdentifierName("z")})),
558Generator.SwitchStatement(Generator.IdentifierName("x"),
559Generator.SwitchSection(Generator.IdentifierName("y"),
560{Generator.IdentifierName("z")})),
567Generator.SwitchStatement(Generator.IdentifierName("x"),
568Generator.SwitchSection(
569{Generator.IdentifierName("y"), Generator.IdentifierName("p"), Generator.IdentifierName("q")},
570{Generator.IdentifierName("z")})),
577Generator.SwitchStatement(Generator.IdentifierName("x"),
578Generator.SwitchSection(Generator.IdentifierName("y"),
579{Generator.IdentifierName("z")}),
580Generator.SwitchSection(Generator.IdentifierName("a"),
581{Generator.IdentifierName("b")})),
590Generator.SwitchStatement(Generator.IdentifierName("x"),
591Generator.SwitchSection(Generator.IdentifierName("y"),
592{Generator.IdentifierName("z")}),
593Generator.DefaultSwitchSection(
594{Generator.IdentifierName("b")})),
603Generator.SwitchStatement(Generator.IdentifierName("x"),
604Generator.SwitchSection(Generator.IdentifierName("y"),
605{Generator.ExitSwitchStatement()})),
615Generator.UsingStatement(Generator.IdentifierName("x"), {Generator.IdentifierName("y")}),
621Generator.UsingStatement("x", Generator.IdentifierName("y"), {Generator.IdentifierName("z")}),
627Generator.UsingStatement(Generator.IdentifierName("x"), "y", Generator.IdentifierName("z"), {Generator.IdentifierName("q")}),
636Generator.LockStatement(Generator.IdentifierName("x"), {Generator.IdentifierName("y")}),
646Generator.TryCatchStatement(
647{Generator.IdentifierName("x")},
648Generator.CatchClause(Generator.IdentifierName("y"), "z",
649{Generator.IdentifierName("a")})),
657Generator.TryCatchStatement(
658{Generator.IdentifierName("s")},
659Generator.CatchClause(Generator.IdentifierName("x"), "y",
660{Generator.IdentifierName("z")}),
661Generator.CatchClause(Generator.IdentifierName("a"), "b",
662{Generator.IdentifierName("c")})),
672Generator.TryCatchStatement(
673{Generator.IdentifierName("s")},
674{Generator.CatchClause(Generator.IdentifierName("x"), "y",
675{Generator.IdentifierName("z")})},
676{Generator.IdentifierName("a")}),
686Generator.TryFinallyStatement(
687{Generator.IdentifierName("x")},
688{Generator.IdentifierName("a")}),
700Generator.WhileStatement(Generator.IdentifierName("x"), {Generator.IdentifierName("y")}),
706Generator.WhileStatement(Generator.IdentifierName("x"), Nothing),
714Generator.ValueReturningLambdaExpression("x", Generator.IdentifierName("y")),
718Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, Generator.IdentifierName("z")),
722Generator.ValueReturningLambdaExpression(New SyntaxNode() {}, Generator.IdentifierName("y")),
726Generator.VoidReturningLambdaExpression("x", Generator.IdentifierName("y")),
730Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, Generator.IdentifierName("z")),
734Generator.VoidReturningLambdaExpression(New SyntaxNode() {}, Generator.IdentifierName("y")),
738Generator.ValueReturningLambdaExpression("x", {Generator.ReturnStatement(Generator.IdentifierName("y"))}),
744Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, {Generator.ReturnStatement(Generator.IdentifierName("z"))}),
750Generator.ValueReturningLambdaExpression(New SyntaxNode() {}, {Generator.ReturnStatement(Generator.IdentifierName("y"))}),
756Generator.VoidReturningLambdaExpression("x", {Generator.IdentifierName("y")}),
762Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, {Generator.IdentifierName("z")}),
768Generator.VoidReturningLambdaExpression(New SyntaxNode() {}, {Generator.IdentifierName("y")}),
774Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x", Generator.IdentifierName("y"))}, Generator.IdentifierName("z")),
778Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x", Generator.IdentifierName("y")), Generator.LambdaParameter("a", Generator.IdentifierName("b"))}, Generator.IdentifierName("z")),
782Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x", Generator.IdentifierName("y"))}, Generator.IdentifierName("z")),
786Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x", Generator.IdentifierName("y")), Generator.LambdaParameter("a", Generator.IdentifierName("b"))}, Generator.IdentifierName("z")),
819Assert.Equal("<MyAttribute>", Generator.GetAttributes(decl).Single().ToString())
828Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32)),
832Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), initializer:=Generator.LiteralExpression(0)),
836Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility:=Accessibility.Public),
840Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), modifiers:=DeclarationModifiers.Static Or DeclarationModifiers.ReadOnly Or DeclarationModifiers.WithEvents),
847Generator.MethodDeclaration("m"),
852Generator.MethodDeclaration("m", typeParameters:={"x", "y"}),
857Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x")),
862Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), statements:={Generator.ReturnStatement(Generator.IdentifierName("y"))}),
868Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, returnType:=Generator.IdentifierName("x")),
873Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("z", Generator.IdentifierName("y"), Generator.IdentifierName("a"))}, returnType:=Generator.IdentifierName("x")),
878Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.None),
883Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Abstract),
887Generator.MethodDeclaration("m", accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Partial),
895Dim md = Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Sealed)
896Assert.Equal(DeclarationModifiers.Sealed, Generator.GetModifiers(md))
902Dim md2 = Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Sealed + DeclarationModifiers.Override)
903Assert.Equal(DeclarationModifiers.Sealed + DeclarationModifiers.Override, Generator.GetModifiers(md2))
909Dim cd = Generator.ClassDeclaration("c", modifiers:=DeclarationModifiers.Sealed)
910Assert.Equal(DeclarationModifiers.Sealed, Generator.GetModifiers(cd))
920Dim md = Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract)
921Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(md))
926Dim cd = Generator.ClassDeclaration("c", modifiers:=DeclarationModifiers.Abstract)
927Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(cd))
942Dim parameters = parameterTypes.Select(Function(t, i) Generator.ParameterDeclaration("p" & i, Generator.TypeExpression(t))).ToList()
943Dim returnType = Generator.TypeExpression(SpecialType.System_Boolean)
946Generator.OperatorDeclaration(OperatorKind.Addition, parameters, returnType),
951Generator.OperatorDeclaration(OperatorKind.BitwiseAnd, parameters, returnType),
956Generator.OperatorDeclaration(OperatorKind.BitwiseOr, parameters, returnType),
961Generator.OperatorDeclaration(OperatorKind.Division, parameters, returnType),
966Generator.OperatorDeclaration(OperatorKind.Equality, parameters, returnType),
971Generator.OperatorDeclaration(OperatorKind.ExclusiveOr, parameters, returnType),
976Generator.OperatorDeclaration(OperatorKind.False, parameters, returnType),
981Generator.OperatorDeclaration(OperatorKind.GreaterThan, parameters, returnType),
986Generator.OperatorDeclaration(OperatorKind.GreaterThanOrEqual, parameters, returnType),
991Generator.OperatorDeclaration(OperatorKind.Inequality, parameters, returnType),
996Generator.OperatorDeclaration(OperatorKind.LeftShift, parameters, returnType),
1001Generator.OperatorDeclaration(OperatorKind.LessThan, parameters, returnType),
1006Generator.OperatorDeclaration(OperatorKind.LessThanOrEqual, parameters, returnType),
1011Generator.OperatorDeclaration(OperatorKind.LogicalNot, parameters, returnType),
1016Generator.OperatorDeclaration(OperatorKind.Modulus, parameters, returnType),
1021Generator.OperatorDeclaration(OperatorKind.Multiply, parameters, returnType),
1026Generator.OperatorDeclaration(OperatorKind.RightShift, parameters, returnType),
1031Generator.OperatorDeclaration(OperatorKind.Subtraction, parameters, returnType),
1036Generator.OperatorDeclaration(OperatorKind.True, parameters, returnType),
1041Generator.OperatorDeclaration(OperatorKind.UnaryNegation, parameters, returnType),
1046Generator.OperatorDeclaration(OperatorKind.UnaryPlus, parameters, returnType),
1053Generator.OperatorDeclaration(OperatorKind.ImplicitConversion, parameters, returnType),
1058Generator.OperatorDeclaration(OperatorKind.ExplicitConversion, parameters, returnType),
1070Generator.Declaration(Conversion),
1078Generator.Declaration(Conversion),
1095Generator.OperatorDeclaration(additionOperatorSymbol),
1111Generator.MethodDeclaration(symbol),
1119Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1123Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1127Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly),
1134Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly),
1141Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
1145Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly, getAccessorStatements:={Generator.IdentifierName("y")}),
1153Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly, setAccessorStatements:={Generator.IdentifierName("y")}),
1161Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), setAccessorStatements:={Generator.IdentifierName("y")}),
1175Generator.WithAccessorDeclarations(Generator.PropertyDeclaration("p", Generator.IdentifierName("x"))),
1179Generator.WithAccessorDeclarations(
1180Generator.PropertyDeclaration("p", Generator.IdentifierName("x")),
1181Generator.GetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()})),
1189Generator.WithAccessorDeclarations(
1190Generator.PropertyDeclaration("p", Generator.IdentifierName("x")),
1191Generator.GetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()}),
1192Generator.SetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()})),
1204Generator.WithAccessorDeclarations(
1205Generator.PropertyDeclaration("p", Generator.IdentifierName("x")),
1206Generator.GetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})),
1214Generator.WithAccessorDeclarations(
1215Generator.PropertyDeclaration("p", Generator.IdentifierName("x")),
1216Generator.SetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})),
1224Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x"))),
1228Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1229Generator.GetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})),
1237Generator.WithAccessorDeclarations(
1238Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("x")),
1239Generator.SetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})),
1250Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1254Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1258Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
1262Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly),
1269Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly),
1276Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.ReadOnly,
1277getAccessorStatements:={Generator.IdentifierName("a")}),
1285Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.WriteOnly,
1286setAccessorStatements:={Generator.IdentifierName("a")}),
1294Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.None),
1304Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1305setAccessorStatements:={Generator.IdentifierName("a")}),
1316Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"),
1317getAccessorStatements:={Generator.IdentifierName("a")}, setAccessorStatements:={Generator.IdentifierName("b")}),
1333Generator.EventDeclaration("ev", Generator.IdentifierName("t")),
1337Generator.EventDeclaration("ev", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Static),
1341Generator.CustomEventDeclaration("ev", Generator.IdentifierName("t")),
1353Dim params = {Generator.ParameterDeclaration("sender", Generator.TypeExpression(SpecialType.System_Object)), Generator.ParameterDeclaration("args", Generator.IdentifierName("EventArgs"))}
1355Generator.CustomEventDeclaration("ev", Generator.IdentifierName("t"), parameters:=params),
1372Generator.ConstructorDeclaration("c"),
1377Generator.ConstructorDeclaration("c", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Static),
1382Generator.ConstructorDeclaration("c", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}),
1387Generator.ConstructorDeclaration("c",
1388parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))},
1389baseConstructorArguments:={Generator.IdentifierName("p")}),
1398Generator.ClassDeclaration("c"),
1403Generator.ClassDeclaration("c", typeParameters:={"x", "y"}),
1408Generator.ClassDeclaration("c", accessibility:=Accessibility.Public),
1413Generator.ClassDeclaration("c", baseType:=Generator.IdentifierName("x")),
1420Generator.ClassDeclaration("c", interfaceTypes:={Generator.IdentifierName("x")}),
1427Generator.ClassDeclaration("c", baseType:=Generator.IdentifierName("x"), interfaceTypes:={Generator.IdentifierName("y"), Generator.IdentifierName("z")}),
1435Generator.ClassDeclaration("c", interfaceTypes:={}),
1440Generator.ClassDeclaration("c", members:={Generator.FieldDeclaration("y", type:=Generator.IdentifierName("x"))}),
1451Generator.StructDeclaration("s"),
1456Generator.StructDeclaration("s", typeParameters:={"x", "y"}),
1461Generator.StructDeclaration("s", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Partial),
1466Generator.StructDeclaration("s", interfaceTypes:={Generator.IdentifierName("x")}),
1473Generator.StructDeclaration("s", interfaceTypes:={Generator.IdentifierName("x"), Generator.IdentifierName("y")}),
1480Generator.StructDeclaration("s", interfaceTypes:={}),
1485Generator.StructDeclaration("s", members:={Generator.FieldDeclaration("y", Generator.IdentifierName("x"))}),
1492Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"))}),
1500Generator.StructDeclaration("s",
1501members:={Generator.ConstructorDeclaration(accessibility:=Accessibility.NotApplicable, modifiers:=DeclarationModifiers.None)}),
1512Generator.InterfaceDeclaration("i"),
1517Generator.InterfaceDeclaration("i", typeParameters:={"x", "y"}),
1522Generator.InterfaceDeclaration("i", interfaceTypes:={Generator.IdentifierName("a")}),
1529Generator.InterfaceDeclaration("i", interfaceTypes:={Generator.IdentifierName("a"), Generator.IdentifierName("b")}),
1536Generator.InterfaceDeclaration("i", interfaceTypes:={}),
1541Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1549Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1557Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.ReadOnly)}),
1565Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)}),
1573Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}),
1591Generator.Declaration(symbol),
1599Generator.EnumDeclaration("e"),
1604Generator.EnumDeclaration("e", members:={Generator.EnumMember("a"), Generator.EnumMember("b"), Generator.EnumMember("c")}),
1612Generator.EnumDeclaration("e", members:={Generator.IdentifierName("a"), Generator.EnumMember("b"), Generator.IdentifierName("c")}),
1620Generator.EnumDeclaration("e", members:={Generator.EnumMember("a", Generator.LiteralExpression(0)), Generator.EnumMember("b"), Generator.EnumMember("c", Generator.LiteralExpression(5))}),
1631Generator.DelegateDeclaration("d"),
1635Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}),
1639Generator.DelegateDeclaration("d", returnType:=Generator.IdentifierName("t")),
1643Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, returnType:=Generator.IdentifierName("t")),
1647Generator.DelegateDeclaration("d", accessibility:=Accessibility.Public),
1652Generator.DelegateDeclaration("d", modifiers:=DeclarationModifiers.Static),
1659Generator.NamespaceImportDeclaration(Generator.IdentifierName("n")),
1663Generator.NamespaceImportDeclaration("n"),
1667Generator.NamespaceImportDeclaration("n.m"),
1674Generator.NamespaceDeclaration("n"),
1679Generator.NamespaceDeclaration("n.m"),
1684Generator.NamespaceDeclaration("n",
1685Generator.NamespaceImportDeclaration("m")),
1692Generator.NamespaceDeclaration("n",
1693Generator.ClassDeclaration("c"),
1694Generator.NamespaceImportDeclaration("m")),
1707Generator.CompilationUnit(),
1711Generator.CompilationUnit(
1712Generator.NamespaceDeclaration("n")),
1718Generator.CompilationUnit(
1719Generator.NamespaceImportDeclaration("n")),
1724Generator.CompilationUnit(
1725Generator.ClassDeclaration("c"),
1726Generator.NamespaceImportDeclaration("m")),
1734Generator.CompilationUnit(
1735Generator.NamespaceImportDeclaration("n"),
1736Generator.NamespaceDeclaration("n",
1737Generator.NamespaceImportDeclaration("m"),
1738Generator.ClassDeclaration("c"))),
1754Generator.AsPublicInterfaceImplementation(
1755Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract),
1756Generator.IdentifierName("i")),
1761Generator.AsPublicInterfaceImplementation(
1762Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.None),
1763Generator.IdentifierName("i")),
1768Generator.AsPublicInterfaceImplementation(
1769Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1770Generator.IdentifierName("i")),
1780Generator.AsPublicInterfaceImplementation(
1781Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.None),
1782Generator.IdentifierName("i")),
1792Generator.AsPublicInterfaceImplementation(
1793Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Internal, DeclarationModifiers.Abstract),
1794Generator.IdentifierName("i")),
1804Dim pim = Generator.AsPrivateInterfaceImplementation(
1805Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t")),
1806Generator.IdentifierName("i"))
1809Generator.AsPublicInterfaceImplementation(pim, Generator.IdentifierName("i2")),
1814Generator.AsPublicInterfaceImplementation(pim, Generator.IdentifierName("i2"), "m2"),
1822Generator.AsPrivateInterfaceImplementation(
1823Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1824Generator.IdentifierName("i")),
1829Generator.AsPrivateInterfaceImplementation(
1830Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1831Generator.TypeExpression(Me._ienumerableInt)),
1836Generator.AsPrivateInterfaceImplementation(
1837Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal, modifiers:=DeclarationModifiers.Abstract),
1838Generator.IdentifierName("i")),
1848Generator.AsPrivateInterfaceImplementation(
1849Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Protected, DeclarationModifiers.Abstract),
1850Generator.IdentifierName("i")),
1860Dim pim = Generator.AsPublicInterfaceImplementation(
1861Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t")),
1862Generator.IdentifierName("i"))
1865Generator.AsPrivateInterfaceImplementation(pim, Generator.IdentifierName("i2")),
1870Generator.AsPrivateInterfaceImplementation(pim, Generator.IdentifierName("i2"), "m2"),
1878Generator.WithTypeParameters(
1879Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract),
1884Generator.WithTypeParameters(
1885Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.None),
1892Generator.WithTypeParameters(
1893Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract)),
1897Generator.WithTypeParameters(
1898Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.None)),
1904Generator.WithTypeParameters(Generator.WithTypeParameters(
1905Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract),
1910Generator.WithTypeParameters(Generator.WithTypeParameters(
1911Generator.MethodDeclaration("m"),
1918Generator.WithTypeParameters(
1919Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract),
1924Generator.WithTypeParameters(
1925Generator.MethodDeclaration("m"),
1931Generator.WithTypeParameters(
1932Generator.ClassDeclaration("c"),
1938Generator.WithTypeParameters(
1939Generator.StructDeclaration("s"),
1945Generator.WithTypeParameters(
1946Generator.InterfaceDeclaration("i"),
1957Generator.WithTypeConstraint(
1958Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
1959"a", Generator.IdentifierName("b")),
1963Generator.WithTypeConstraint(
1964Generator.WithTypeParameters(Generator.MethodDeclaration("m"), "a"),
1965"a", Generator.IdentifierName("b")),
1971Generator.WithTypeConstraint(
1972Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
1973"a", Generator.IdentifierName("b"), Generator.IdentifierName("c")),
1977Generator.WithTypeConstraint(
1978Generator.WithTypeParameters(Generator.MethodDeclaration("m"), "a"),
1979"a", Generator.IdentifierName("b"), Generator.IdentifierName("c")),
1985Generator.WithTypeConstraint(
1986Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
1991Generator.WithTypeConstraint(
1992Generator.WithTypeParameters(Generator.MethodDeclaration("m"), "a"),
1999Generator.WithTypeConstraint(Generator.WithTypeConstraint(
2000Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2001"a", Generator.IdentifierName("b"), Generator.IdentifierName("c")), "a"),
2005Generator.WithTypeConstraint(Generator.WithTypeConstraint(
2006Generator.WithTypeParameters(Generator.MethodDeclaration("m"), "a"),
2007"a", Generator.IdentifierName("b"), Generator.IdentifierName("c")), "a"),
2013Generator.WithTypeConstraint(
2014Generator.WithTypeConstraint(
2015Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a", "x"),
2016"a", Generator.IdentifierName("b"), Generator.IdentifierName("c")),
2017"x", Generator.IdentifierName("y")),
2022Generator.WithTypeConstraint(
2023Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2029Generator.WithTypeConstraint(
2030Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2036Generator.WithTypeConstraint(
2037Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2043Generator.WithTypeConstraint(
2044Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2050Generator.WithTypeConstraint(
2051Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2057Generator.WithTypeConstraint(
2058Generator.WithTypeParameters(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), "a"),
2059"a", SpecialTypeConstraintKind.ReferenceType, Generator.IdentifierName("b"), Generator.IdentifierName("c")),
2064Generator.WithTypeConstraint(
2065Generator.WithTypeParameters(
2066Generator.ClassDeclaration("c"),
2068"a", Generator.IdentifierName("x")),
2074Generator.WithTypeConstraint(
2075Generator.WithTypeParameters(
2076Generator.StructDeclaration("s"),
2078"a", Generator.IdentifierName("x")),
2084Generator.WithTypeConstraint(
2085Generator.WithTypeParameters(
2086Generator.InterfaceDeclaration("i"),
2088"a", Generator.IdentifierName("x")),
2097Generator.Attribute(Generator.IdentifierName("a")),
2101Generator.Attribute("a"),
2105Generator.Attribute("a.b"),
2109Generator.Attribute("a", {}),
2113Generator.Attribute("a", {Generator.IdentifierName("x")}),
2117Generator.Attribute("a", {Generator.AttributeArgument(Generator.IdentifierName("x"))}),
2121Generator.Attribute("a", {Generator.AttributeArgument("x", Generator.IdentifierName("y"))}),
2125Generator.Attribute("a", {Generator.IdentifierName("x"), Generator.IdentifierName("y")}),
2132Generator.AddAttributes(
2133Generator.FieldDeclaration("y", Generator.IdentifierName("x")),
2134Generator.Attribute("a")),
2139Generator.AddAttributes(
2140Generator.AddAttributes(
2141Generator.FieldDeclaration("y", Generator.IdentifierName("x")),
2142Generator.Attribute("a")),
2143Generator.Attribute("b")),
2149Generator.AddAttributes(
2150Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract),
2151Generator.Attribute("a")),
2156Generator.AddReturnAttributes(
2157Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract),
2158Generator.Attribute("a")),
2162Generator.AddAttributes(
2163Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.None),
2164Generator.Attribute("a")),
2170Generator.AddReturnAttributes(
2171Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.None),
2172Generator.Attribute("a")),
2177Generator.AddAttributes(
2178Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
2179Generator.Attribute("a")),
2184Generator.AddAttributes(
2185Generator.PropertyDeclaration("p", Generator.IdentifierName("x")),
2186Generator.Attribute("a")),
2197Generator.AddAttributes(
2198Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract),
2199Generator.Attribute("a")),
2204Generator.AddAttributes(
2205Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.IdentifierName("y"))}, Generator.IdentifierName("x")),
2206Generator.Attribute("a")),
2217Generator.AddAttributes(
2218Generator.ClassDeclaration("c"),
2219Generator.Attribute("a")),
2225Generator.AddAttributes(
2226Generator.ParameterDeclaration("p", Generator.IdentifierName("t")),
2227Generator.Attribute("a")),
2231Generator.AddAttributes(
2232Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
2233Generator.Attribute("a")),
2240Generator.AddAttributes(
2241Generator.AddAttributes(
2242Generator.CompilationUnit(Generator.NamespaceDeclaration("n")),
2243Generator.Attribute("a")),
2244Generator.Attribute("b")),
2252Generator.AddAttributes(
2253Generator.DelegateDeclaration("d"),
2254Generator.Attribute("a")),
2262Dim prop = Generator.PropertyDeclaration("P", Generator.IdentifierName("T"))
2279CheckAddRemoveAttribute(Generator.GetAccessor(prop, DeclarationKind.GetAccessor))
2280CheckAddRemoveAttribute(Generator.GetAccessor(prop, DeclarationKind.SetAccessor))
2281CheckAddRemoveAttribute(Generator.GetAccessor(evnt, DeclarationKind.AddAccessor))
2282CheckAddRemoveAttribute(Generator.GetAccessor(evnt, DeclarationKind.RemoveAccessor))
2283CheckAddRemoveAttribute(Generator.GetAccessor(evnt, DeclarationKind.RaiseAccessor))
2287Dim initialAttributes = Generator.GetAttributes(declaration)
2290Dim withAttribute = Generator.AddAttributes(declaration, Generator.Attribute("a"))
2291Dim attrsAdded = Generator.GetAttributes(withAttribute)
2294Dim withoutAttribute = Generator.RemoveNode(withAttribute, attrsAdded(0))
2295Dim attrsRemoved = Generator.GetAttributes(withoutAttribute)
2306Dim added = Generator.AddAttributes(cls, Generator.Attribute("a"))
2314Dim removed = Generator.RemoveAllAttributes(added)
2321Dim attrWithComment = Generator.GetAttributes(added).First()
2332Generator.Declaration(_emptyCompilation.GetTypeByMetadataName("System.ComponentModel.INotifyPropertyChanged")),
2342VerifySyntax(Of EnumBlockSyntax)(Generator.Declaration(_emptyCompilation.GetTypeByMetadataName("System.DateTimeKind")),
2352VerifySyntax(Of EnumBlockSyntax)(Generator.Declaration(_emptyCompilation.GetTypeByMetadataName("System.Security.SecurityRuleSet")),
2364VerifySyntax(Of DelegateStatementSyntax)(Generator.Declaration(type), "Public Delegate Sub D()")
2378VerifySyntax(Of MethodBlockSyntax)(Generator.Declaration(method),
2399VerifySyntax(Of PropertyBlockSyntax)(Generator.Declaration(method),
2425VerifySyntax(Of PropertyBlockSyntax)(Generator.Declaration(method),
2446VerifySyntax(Of MethodBlockSyntax)(Generator.Declaration(method),
2466VerifySyntax(Of FieldDeclarationSyntax)(Generator.Declaration(field),
2474VerifySyntax(Of FieldDeclarationSyntax)(Generator.Declaration(field),
2492Dim newCu = Generator.RemoveNode(cu, summary)
2513Dim newCu = Generator.ReplaceNode(cu, summary, summary2)
2533Dim newCu = Generator.InsertNodesAfter(cu, text, {text})
2553Dim newCu = Generator.InsertNodesBefore(cu, text, {text})
2565Assert.Equal(DeclarationKind.CompilationUnit, Generator.GetDeclarationKind(Generator.CompilationUnit()))
2566Assert.Equal(DeclarationKind.Class, Generator.GetDeclarationKind(Generator.ClassDeclaration("c")))
2567Assert.Equal(DeclarationKind.Struct, Generator.GetDeclarationKind(Generator.StructDeclaration("s")))
2568Assert.Equal(DeclarationKind.Interface, Generator.GetDeclarationKind(Generator.InterfaceDeclaration("i")))
2569Assert.Equal(DeclarationKind.Enum, Generator.GetDeclarationKind(Generator.EnumDeclaration("e")))
2570Assert.Equal(DeclarationKind.Delegate, Generator.GetDeclarationKind(Generator.DelegateDeclaration("d")))
2571Assert.Equal(DeclarationKind.Method, Generator.GetDeclarationKind(Generator.MethodDeclaration("m")))
2572Assert.Equal(DeclarationKind.Method, Generator.GetDeclarationKind(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract)))
2573Assert.Equal(DeclarationKind.Constructor, Generator.GetDeclarationKind(Generator.ConstructorDeclaration()))
2574Assert.Equal(DeclarationKind.Parameter, Generator.GetDeclarationKind(Generator.ParameterDeclaration("p")))
2575Assert.Equal(DeclarationKind.Property, Generator.GetDeclarationKind(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))))
2576Assert.Equal(DeclarationKind.Property, Generator.GetDeclarationKind(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2577Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"))))
2578Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2579Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(Generator.FieldDeclaration("f", Generator.IdentifierName("t"))))
2580Assert.Equal(DeclarationKind.EnumMember, Generator.GetDeclarationKind(Generator.EnumMember("v")))
2581Assert.Equal(DeclarationKind.Event, Generator.GetDeclarationKind(Generator.EventDeclaration("e", Generator.IdentifierName("t"))))
2582Assert.Equal(DeclarationKind.CustomEvent, Generator.GetDeclarationKind(Generator.CustomEventDeclaration("ce", Generator.IdentifierName("t"))))
2583Assert.Equal(DeclarationKind.Namespace, Generator.GetDeclarationKind(Generator.NamespaceDeclaration("n")))
2584Assert.Equal(DeclarationKind.NamespaceImport, Generator.GetDeclarationKind(Generator.NamespaceImportDeclaration("u")))
2585Assert.Equal(DeclarationKind.Variable, Generator.GetDeclarationKind(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2586Assert.Equal(DeclarationKind.Attribute, Generator.GetDeclarationKind(Generator.Attribute("a")))
2591Assert.Equal("c", Generator.GetName(Generator.ClassDeclaration("c")))
2592Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s")))
2593Assert.Equal("i", Generator.GetName(Generator.EnumDeclaration("i")))
2594Assert.Equal("e", Generator.GetName(Generator.EnumDeclaration("e")))
2595Assert.Equal("d", Generator.GetName(Generator.DelegateDeclaration("d")))
2596Assert.Equal("m", Generator.GetName(Generator.MethodDeclaration("m")))
2597Assert.Equal("m", Generator.GetName(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract)))
2598Assert.Equal("", Generator.GetName(Generator.ConstructorDeclaration()))
2599Assert.Equal("p", Generator.GetName(Generator.ParameterDeclaration("p")))
2600Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2601Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))))
2602Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"))))
2603Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2604Assert.Equal("f", Generator.GetName(Generator.FieldDeclaration("f", Generator.IdentifierName("t"))))
2605Assert.Equal("v", Generator.GetName(Generator.EnumMember("v")))
2606Assert.Equal("ef", Generator.GetName(Generator.EventDeclaration("ef", Generator.IdentifierName("t"))))
2607Assert.Equal("ep", Generator.GetName(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"))))
2608Assert.Equal("n", Generator.GetName(Generator.NamespaceDeclaration("n")))
2609Assert.Equal("u", Generator.GetName(Generator.NamespaceImportDeclaration("u")))
2610Assert.Equal("loc", Generator.GetName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2611Assert.Equal("a", Generator.GetName(Generator.Attribute("a")))
2616Assert.Equal("c", Generator.GetName(Generator.WithName(Generator.ClassDeclaration("x"), "c")))
2617Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s")))
2618Assert.Equal("i", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "i")))
2619Assert.Equal("e", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "e")))
2620Assert.Equal("d", Generator.GetName(Generator.WithName(Generator.DelegateDeclaration("x"), "d")))
2621Assert.Equal("m", Generator.GetName(Generator.WithName(Generator.MethodDeclaration("x"), "m")))
2622Assert.Equal("m", Generator.GetName(Generator.WithName(Generator.MethodDeclaration("x", modifiers:=DeclarationModifiers.Abstract), "m")))
2623Assert.Equal("", Generator.GetName(Generator.WithName(Generator.ConstructorDeclaration(), ".ctor")))
2624Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.ParameterDeclaration("x"), "p")))
2625Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.IdentifierName("t")), "p")))
2626Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "p")))
2627Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), "X")))
2628Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "X")))
2629Assert.Equal("f", Generator.GetName(Generator.WithName(Generator.FieldDeclaration("x", Generator.IdentifierName("t")), "f")))
2630Assert.Equal("v", Generator.GetName(Generator.WithName(Generator.EnumMember("x"), "v")))
2631Assert.Equal("ef", Generator.GetName(Generator.WithName(Generator.EventDeclaration("x", Generator.IdentifierName("t")), "ef")))
2632Assert.Equal("ep", Generator.GetName(Generator.WithName(Generator.CustomEventDeclaration("x", Generator.IdentifierName("t")), "ep")))
2633Assert.Equal("n", Generator.GetName(Generator.WithName(Generator.NamespaceDeclaration("x"), "n")))
2634Assert.Equal("u", Generator.GetName(Generator.WithName(Generator.NamespaceImportDeclaration("x"), "u")))
2635Assert.Equal("loc", Generator.GetName(Generator.WithName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "x"), "loc")))
2636Assert.Equal("a", Generator.GetName(Generator.WithName(Generator.Attribute("x"), "a")))
2641Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.ClassDeclaration("c", accessibility:=Accessibility.Internal)))
2642Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.StructDeclaration("s", accessibility:=Accessibility.Internal)))
2643Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.InterfaceDeclaration("i", accessibility:=Accessibility.Internal)))
2644Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.EnumDeclaration("e", accessibility:=Accessibility.Internal)))
2645Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.DelegateDeclaration("d", accessibility:=Accessibility.Internal)))
2646Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.MethodDeclaration("m", accessibility:=Accessibility.Internal)))
2647Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.ConstructorDeclaration(accessibility:=Accessibility.Internal)))
2648Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.ParameterDeclaration("p")))
2649Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2650Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2651Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2652Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.EnumMember("v")))
2653Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2654Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal)))
2655Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceDeclaration("n")))
2656Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceImportDeclaration("u")))
2657Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2658Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.Attribute("a")))
2659Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(SyntaxFactory.TypeParameter("tp")))
2664Assert.Equal(Accessibility.Public, Generator.GetAccessibility(m))
2669Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ClassDeclaration("c", accessibility:=Accessibility.Internal), Accessibility.Private)))
2670Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility:=Accessibility.Internal), Accessibility.Private)))
2671Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("i", accessibility:=Accessibility.Internal), Accessibility.Private)))
2672Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("e", accessibility:=Accessibility.Internal), Accessibility.Private)))
2673Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.DelegateDeclaration("d", accessibility:=Accessibility.Internal), Accessibility.Private)))
2674Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.MethodDeclaration("m", accessibility:=Accessibility.Internal), Accessibility.Private)))
2675Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ConstructorDeclaration(accessibility:=Accessibility.Internal), Accessibility.Private)))
2676Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ParameterDeclaration("p"), Accessibility.Private)))
2677Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2678Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2679Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2680Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumMember("v"), Accessibility.Private)))
2681Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2682Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2683Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private)))
2684Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceImportDeclaration("u"), Accessibility.Private)))
2685Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Accessibility.Private)))
2686Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.Attribute("a"), Accessibility.Private)))
2687Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(SyntaxFactory.TypeParameter("tp"), Accessibility.Private)))
2692Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.WithAccessibility(m, Accessibility.Internal)))
2697Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.ClassDeclaration("c", modifiers:=DeclarationModifiers.Abstract)))
2698Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.StructDeclaration("s", modifiers:=DeclarationModifiers.Partial)))
2699Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.EnumDeclaration("e", modifiers:=DeclarationModifiers.[New])))
2700Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.DelegateDeclaration("d", modifiers:=DeclarationModifiers.[New])))
2701Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Static)))
2702Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.ConstructorDeclaration(modifiers:=DeclarationModifiers.Static)))
2703Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.ParameterDeclaration("p")))
2704Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2705Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2706Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Const)))
2707Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Static)))
2708Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Static)))
2709Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.EnumMember("v")))
2710Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.NamespaceDeclaration("n")))
2711Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.NamespaceImportDeclaration("u")))
2712Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2713Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.Attribute("a")))
2714Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(SyntaxFactory.TypeParameter("tp")))
2719Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.ClassDeclaration("c"), DeclarationModifiers.Abstract)))
2720Assert.Equal(DeclarationModifiers.Partial, Generator.GetModifiers(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial)))
2721Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.WithModifiers(Generator.EnumDeclaration("e"), DeclarationModifiers.[New])))
2722Assert.Equal(DeclarationModifiers.[New], Generator.GetModifiers(Generator.WithModifiers(Generator.DelegateDeclaration("d"), DeclarationModifiers.[New])))
2723Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.MethodDeclaration("m"), DeclarationModifiers.Static)))
2724Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.ConstructorDeclaration(), DeclarationModifiers.Static)))
2725Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.ParameterDeclaration("p"), DeclarationModifiers.Abstract)))
2726Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2727Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2728Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), DeclarationModifiers.Const)))
2729Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.IdentifierName("t")), DeclarationModifiers.Static)))
2730Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")), DeclarationModifiers.Static)))
2731Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.EnumMember("v"), DeclarationModifiers.Partial)))
2732Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.NamespaceDeclaration("n"), DeclarationModifiers.Abstract)))
2733Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.NamespaceImportDeclaration("u"), DeclarationModifiers.Abstract)))
2734Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), DeclarationModifiers.Abstract)))
2735Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.Attribute("a"), DeclarationModifiers.Abstract)))
2736Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(SyntaxFactory.TypeParameter("tp"), DeclarationModifiers.Abstract)))
2741Dim classBlock = DirectCast(Generator.ClassDeclaration("C"), ClassBlockSyntax)
2742Dim classBlockWithModifiers = Generator.WithModifiers(classBlock, DeclarationModifiers.Sealed)
2747Dim classStatementWithModifiers = Generator.WithModifiers(classStatement, DeclarationModifiers.Sealed)
2753Dim classBlock = DirectCast(Generator.ClassDeclaration("C"), ClassBlockSyntax)
2754classBlock = DirectCast(Generator.AddMembers(classBlock, Generator.WithModifiers(Generator.MethodDeclaration("Goo"), DeclarationModifiers.Sealed)), ClassBlockSyntax)
2764Assert.Equal("t", Generator.GetType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"))).ToString())
2765Assert.Null(Generator.GetType(Generator.MethodDeclaration("m")))
2767Assert.Equal("t", Generator.GetType(Generator.FieldDeclaration("f", Generator.IdentifierName("t"))).ToString())
2768Assert.Equal("t", Generator.GetType(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).ToString())
2769Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("t"))).ToString())
2770Assert.Equal("t", Generator.GetType(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))).ToString())
2772Assert.Equal("t", Generator.GetType(Generator.EventDeclaration("ef", Generator.IdentifierName("t"))).ToString())
2773Assert.Equal("t", Generator.GetType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"))).ToString())
2775Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("t"))).ToString())
2776Assert.Null(Generator.GetType(Generator.DelegateDeclaration("d")))
2778Assert.Equal("t", Generator.GetType(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "v")).ToString())
2780Assert.Null(Generator.GetType(Generator.ClassDeclaration("c")))
2781Assert.Null(Generator.GetType(Generator.IdentifierName("x")))
2786Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2787Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m"), Generator.IdentifierName("t"))).ToString())
2788Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.FieldDeclaration("f", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2789Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.PropertyDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2790Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2791Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.ParameterDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2793Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2794Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.IdentifierName("t"))).ToString())
2796Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.EventDeclaration("ef", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2797Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString())
2799Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "v"), Generator.IdentifierName("t"))).ToString())
2800Assert.Null(Generator.GetType(Generator.WithType(Generator.ClassDeclaration("c"), Generator.IdentifierName("t"))))
2801Assert.Null(Generator.GetType(Generator.WithType(Generator.IdentifierName("x"), Generator.IdentifierName("t"))))
2807Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x")), Nothing),
2812Generator.WithType(Generator.MethodDeclaration("m"), Generator.IdentifierName("x")),
2817Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), modifiers:=DeclarationModifiers.Abstract), Nothing),
2821Generator.WithType(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), Generator.IdentifierName("x")),
2825Generator.WithType(Generator.DelegateDeclaration("d", returnType:=Generator.IdentifierName("x")), Nothing),
2829Generator.WithType(Generator.DelegateDeclaration("d"), Generator.IdentifierName("x")),
2836Assert.Equal(0, Generator.GetParameters(Generator.MethodDeclaration("m")).Count)
2837Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2838Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))})).Count)
2840Assert.Equal(0, Generator.GetParameters(Generator.ConstructorDeclaration()).Count)
2841Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2842Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))})).Count)
2844Assert.Equal(0, Generator.GetParameters(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
2846Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))}, Generator.IdentifierName("t"))).Count)
2847Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.ParameterDeclaration("p2", Generator.IdentifierName("t2"))}, Generator.IdentifierName("t"))).Count)
2849Assert.Equal(0, Generator.GetParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr"))).Count)
2850Assert.Equal(1, Generator.GetParameters(Generator.ValueReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count)
2852Assert.Equal(0, Generator.GetParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr"))).Count)
2853Assert.Equal(1, Generator.GetParameters(Generator.VoidReturningLambdaExpression("p1", Generator.IdentifierName("expr"))).Count)
2855Assert.Equal(0, Generator.GetParameters(Generator.DelegateDeclaration("d")).Count)
2856Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2858Assert.Equal(0, Generator.GetParameters(Generator.ClassDeclaration("c")).Count)
2859Assert.Equal(0, Generator.GetParameters(Generator.IdentifierName("x")).Count)
2864Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2865Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2866Assert.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)
2868Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.LambdaParameter("p")})).Count)
2869Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.LambdaParameter("p")})).Count)
2871Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2873Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2874Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.IdentifierName("x"), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2875Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), {Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))})).Count)
2881Assert.Equal("x", Generator.GetExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), initializer:=Generator.IdentifierName("x"))).ToString())
2882Assert.Equal("x", Generator.GetExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"), initializer:=Generator.IdentifierName("x"))).ToString())
2883Assert.Equal("x", Generator.GetExpression(Generator.LocalDeclarationStatement("loc", initializer:=Generator.IdentifierName("x"))).ToString())
2886Assert.Null(Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")})))
2887Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")})).Count)
2888Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x"))).ToString())
2889Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x"))).ToString())
2890Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString())
2891Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString())
2893Assert.Null(Generator.GetExpression(Generator.IdentifierName("e")))
2899Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString())
2900Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString())
2901Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Generator.IdentifierName("x"))).ToString())
2904Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString())
2905Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", {Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString())
2906Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString())
2907Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString())
2908Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString())
2909Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString())
2910Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString())
2911Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString())
2914Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.IdentifierName("s")}), Generator.IdentifierName("e")),
2917Assert.Null(Generator.GetExpression(Generator.WithExpression(Generator.IdentifierName("e"), Generator.IdentifierName("x"))))
2924Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.IdentifierName("s")}), Generator.IdentifierName("e")),
2929Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.IdentifierName("s")}), Generator.IdentifierName("e")),
2934Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), Nothing),
2940Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), Nothing),
2946Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.IdentifierName("s")}), Nothing),
2953Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.IdentifierName("s")}), Nothing),
2958Assert.Null(Generator.GetExpression(Generator.WithExpression(Generator.IdentifierName("e"), Generator.IdentifierName("x"))))
2963Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))}
2965Assert.Equal(0, Generator.GetStatements(Generator.MethodDeclaration("m")).Count)
2966Assert.Equal(2, Generator.GetStatements(Generator.MethodDeclaration("m", statements:=stmts)).Count)
2968Assert.Equal(0, Generator.GetStatements(Generator.ConstructorDeclaration()).Count)
2969Assert.Equal(2, Generator.GetStatements(Generator.ConstructorDeclaration(statements:=stmts)).Count)
2971Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2972Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression({})).Count)
2973Assert.Equal(2, Generator.GetStatements(Generator.VoidReturningLambdaExpression(stmts)).Count)
2975Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e"))).Count)
2976Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression({})).Count)
2977Assert.Equal(2, Generator.GetStatements(Generator.ValueReturningLambdaExpression(stmts)).Count)
2979Assert.Equal(0, Generator.GetStatements(Generator.IdentifierName("x")).Count)
2984Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))}
2986Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.MethodDeclaration("m"), stmts)).Count)
2987Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ConstructorDeclaration(), stmts)).Count)
2989Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression({}), stmts)).Count)
2990Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression({}), stmts)).Count)
2992Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2993Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), stmts)).Count)
2995Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.IdentifierName("x"), stmts)).Count)
3000Dim stmts = {Generator.ExpressionStatement(Generator.IdentifierName("x")), Generator.ExpressionStatement(Generator.IdentifierName("y"))}
3003Generator.WithStatements(Generator.VoidReturningLambdaExpression({}), stmts),
3010Generator.WithStatements(Generator.ValueReturningLambdaExpression({}), stmts),
3017Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), stmts),
3024Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), stmts),
3031Generator.WithStatements(Generator.VoidReturningLambdaExpression(stmts), {}),
3036Generator.WithStatements(Generator.ValueReturningLambdaExpression(stmts), {}),
3041Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("e")), {}),
3046Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("e")), {}),
3053Dim _g = Me.Generator
3100Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))}
3102Dim p = Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))
3105Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
3106Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), getAccessorStatements:=stmts)).Count)
3108Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"))).Count)
3109Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"), getAccessorStatements:=stmts)).Count)
3111Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IdentifierName("x")).Count)
3114Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).Count)
3115Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), setAccessorStatements:=stmts)).Count)
3117Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"))).Count)
3118Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t"), setAccessorStatements:=stmts)).Count)
3120Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IdentifierName("x")).Count)
3125Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.IdentifierName("x"), Generator.IdentifierName("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.IdentifierName("fn"), Generator.IdentifierName("arg")))}
3127Dim p = Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))
3130Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count)
3131Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t")), stmts)).Count)
3132Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count)
3135Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), stmts)).Count)
3136Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.IdentifierName("t")), stmts)).Count)
3137Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IdentifierName("x"), stmts)).Count)
3141Dim actualNames = actualNodes.Select(Function(n) Generator.GetName(n)).ToArray()
3149AssertNamesEqual(expectedNames, Generator.GetMembers(declaration))
3158AssertMemberNamesEqual("m", Generator.ClassDeclaration("c", members:={Generator.MethodDeclaration("m")}))
3159AssertMemberNamesEqual("m", Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")}))
3160AssertMemberNamesEqual("m", Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m")}))
3161AssertMemberNamesEqual("v", Generator.EnumDeclaration("e", members:={Generator.EnumMember("v")}))
3162AssertMemberNamesEqual("c", Generator.NamespaceDeclaration("n", declarations:={Generator.ClassDeclaration("c")}))
3163AssertMemberNamesEqual("c", Generator.CompilationUnit(declarations:={Generator.ClassDeclaration("c")}))
3168AssertMemberNamesEqual("m", Generator.AddMembers(Generator.ClassDeclaration("d"), {Generator.MethodDeclaration("m")}))
3169AssertMemberNamesEqual("m", Generator.AddMembers(Generator.StructDeclaration("s"), {Generator.MethodDeclaration("m")}))
3170AssertMemberNamesEqual("m", Generator.AddMembers(Generator.InterfaceDeclaration("i"), {Generator.MethodDeclaration("m")}))
3171AssertMemberNamesEqual("v", Generator.AddMembers(Generator.EnumDeclaration("e"), {Generator.EnumMember("v")}))
3172AssertMemberNamesEqual("n2", Generator.AddMembers(Generator.NamespaceDeclaration("n"), {Generator.NamespaceDeclaration("n2")}))
3173AssertMemberNamesEqual("n", Generator.AddMembers(Generator.CompilationUnit(), {Generator.NamespaceDeclaration("n")}))
3175AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.ClassDeclaration("d", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")}))
3176AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")}))
3177AssertMemberNamesEqual({"m", "m2"}, Generator.AddMembers(Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m")}), {Generator.MethodDeclaration("m2")}))
3178AssertMemberNamesEqual({"v", "v2"}, Generator.AddMembers(Generator.EnumDeclaration("i", members:={Generator.EnumMember("v")}), {Generator.EnumMember("v2")}))
3179AssertMemberNamesEqual({"n1", "n2"}, Generator.AddMembers(Generator.NamespaceDeclaration("n", {Generator.NamespaceDeclaration("n1")}), {Generator.NamespaceDeclaration("n2")}))
3180AssertMemberNamesEqual({"n1", "n2"}, Generator.AddMembers(Generator.CompilationUnit(declarations:={Generator.NamespaceDeclaration("n1")}), {Generator.NamespaceDeclaration("n2")}))
3185TestRemoveAllMembers(Generator.ClassDeclaration("d", members:={Generator.MethodDeclaration("m")}))
3186TestRemoveAllMembers(Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m")}))
3187TestRemoveAllMembers(Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m")}))
3188TestRemoveAllMembers(Generator.EnumDeclaration("i", members:={Generator.EnumMember("v")}))
3189TestRemoveAllMembers(Generator.AddMembers(Generator.NamespaceDeclaration("n", {Generator.NamespaceDeclaration("n1")})))
3190TestRemoveAllMembers(Generator.AddMembers(Generator.CompilationUnit(declarations:={Generator.NamespaceDeclaration("n1")})))
3194Assert.Equal(0, Generator.GetMembers(Generator.RemoveNodes(declaration, Generator.GetMembers(declaration))).Count)
3205Dim baseListBI = Generator.GetBaseAndInterfaceTypes(classBI)
3217Dim baseListXY = Generator.GetBaseAndInterfaceTypes(ifaceI)
3227Dim baseListN = Generator.GetBaseAndInterfaceTypes(classN)
3241Dim baseList = Generator.GetBaseAndInterfaceTypes(classC)
3245Generator.RemoveNode(classC, baseList(0)),
3252Generator.RemoveNode(classC, baseList(1)),
3260Generator.RemoveNode(classC, baseList(2)),
3268Generator.RemoveNodes(classC, {baseList(1), baseList(2)}),
3275Generator.RemoveNodes(classC, baseList),
3302Generator.AddBaseType(classC, Generator.IdentifierName("T")),
3309Generator.AddBaseType(classCB, Generator.IdentifierName("T")),
3316Generator.AddBaseType(structS, Generator.IdentifierName("T")),
3321Generator.AddBaseType(ifaceI, Generator.IdentifierName("T")),
3354Generator.AddInterfaceType(classC, Generator.IdentifierName("T")),
3361Generator.AddInterfaceType(classCB, Generator.IdentifierName("T")),
3369Generator.AddInterfaceType(classCI, Generator.IdentifierName("T")),
3376Generator.AddInterfaceType(structS, Generator.IdentifierName("T")),
3383Generator.AddInterfaceType(ifaceI, Generator.IdentifierName("T")),
3398Generator.AddInterfaceType(classC, Generator.IdentifierName("X")), "
3407Generator.AddInterfaceType(interfaceI, Generator.IdentifierName("X")), "
3417Generator.AddInterfaceType(classCX, Generator.IdentifierName("Y")), "
3428Generator.AddInterfaceType(interfaceIX, Generator.IdentifierName("Y")), "
3440Generator.AddInterfaceType(classCXY, Generator.IdentifierName("Z")), "
3453Generator.AddInterfaceType(interfaceIXY, Generator.IdentifierName("Z")), "
3474Dim declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.Select(Function(x) x.GetSyntax()).First())
3475Dim declX = Generator.GetDeclaration(symbolX.DeclaringSyntaxReferences.Select(Function(x) x.GetSyntax()).First())
3476Dim declY = Generator.GetDeclaration(symbolY.DeclaringSyntaxReferences.Select(Function(x) x.GetSyntax()).First())
3477Dim declZ = Generator.GetDeclaration(symbolZ.DeclaringSyntaxReferences.Select(Function(x) x.GetSyntax()).First())
3483Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(declX))
3484Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(declY))
3485Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(declZ))
3487Assert.NotNull(Generator.GetType(declX))
3488Assert.Equal("Integer", Generator.GetType(declX).ToString())
3489Assert.Equal("X", Generator.GetName(declX))
3490Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declX))
3491Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(declX))
3493Assert.NotNull(Generator.GetType(declY))
3494Assert.Equal("Integer", Generator.GetType(declY).ToString())
3495Assert.Equal("Y", Generator.GetName(declY))
3496Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declY))
3497Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(declY))
3499Assert.NotNull(Generator.GetType(declZ))
3500Assert.Equal("Integer", Generator.GetType(declZ).ToString())
3501Assert.Equal("Z", Generator.GetName(declZ))
3502Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declZ))
3503Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(declZ))
3505Dim xTypedT = Generator.WithType(declX, Generator.IdentifierName("T"))
3506Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xTypedT))
3508Assert.Equal("T", Generator.GetType(xTypedT).ToString())
3510Dim xNamedQ = Generator.WithName(declX, "Q")
3511Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xNamedQ))
3513Assert.Equal("Q", Generator.GetName(xNamedQ).ToString())
3515Dim xInitialized = Generator.WithExpression(declX, Generator.IdentifierName("e"))
3516Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xInitialized))
3518Assert.Equal("e", Generator.GetExpression(xInitialized).ToString())
3520Dim xPrivate = Generator.WithAccessibility(declX, Accessibility.Private)
3521Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xPrivate))
3523Assert.Equal(Accessibility.Private, Generator.GetAccessibility(xPrivate))
3525Dim xReadOnly = Generator.WithModifiers(declX, DeclarationModifiers.ReadOnly)
3526Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xReadOnly))
3528Assert.Equal(DeclarationModifiers.ReadOnly, Generator.GetModifiers(xReadOnly))
3530Dim xAttributed = Generator.AddAttributes(declX, Generator.Attribute("A"))
3531Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(xAttributed))
3533Assert.Equal(1, Generator.GetAttributes(xAttributed).Count)
3534Assert.Equal("<A>", Generator.GetAttributes(xAttributed)(0).ToString())
3536Dim membersC = Generator.GetMembers(declC)
3544Generator.ClassDeclaration("C", members:={declX, declY}),
3553Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.IdentifierName("T"))),
3563Generator.InsertMembers(declC, 1, Generator.FieldDeclaration("A", Generator.IdentifierName("T"))),
3575Generator.InsertMembers(declC, 2, Generator.FieldDeclaration("A", Generator.IdentifierName("T"))),
3587Generator.InsertMembers(declC, 3, Generator.FieldDeclaration("A", Generator.IdentifierName("T"))),
3597Generator.ReplaceNode(declC, declX, Generator.WithType(declX, Generator.IdentifierName("T"))),
3607Generator.ReplaceNode(declC, declX, Generator.WithExpression(declX, Generator.IdentifierName("e"))),
3617Generator.ReplaceNode(declC, declX, Generator.WithName(declX, "Q")),
3625Generator.ReplaceNode(declC, declX.GetAncestorOrThis(Of ModifiedIdentifierSyntax), SyntaxFactory.ModifiedIdentifier("Q")),
3633Generator.ReplaceNode(declC, declY, Generator.WithType(declY, Generator.IdentifierName("T"))),
3645Generator.ReplaceNode(declC, declZ, Generator.WithType(declZ, Generator.IdentifierName("T"))),
3655Generator.ReplaceNode(declC, declX, declZ),
3664Generator.RemoveNode(declC, declX),
3672Generator.RemoveNode(declC, declY),
3680Generator.RemoveNode(declC, declZ),
3688Generator.RemoveNodes(declC, {declX, declY}),
3696Generator.RemoveNodes(declC, {declX, declZ}),
3704Generator.RemoveNodes(declC, {declY, declZ}),
3712Generator.RemoveNodes(declC, {declX, declY, declZ}),
3728Dim declC = Generator.GetDeclaration(symbolC.DeclaringSyntaxReferences.First().GetSyntax())
3730Dim attrs = Generator.GetAttributes(declC)
3738Assert.Equal("X", Generator.GetName(declX))
3739Assert.Equal("Y", Generator.GetName(declY))
3740Assert.Equal("Z", Generator.GetName(declZ))
3742Dim xNamedQ = Generator.WithName(declX, "Q")
3743Assert.Equal(DeclarationKind.Attribute, Generator.GetDeclarationKind(xNamedQ))
3747Dim xWithArg = Generator.AddAttributeArguments(declX, {Generator.AttributeArgument(Generator.IdentifierName("e"))})
3748Assert.Equal(DeclarationKind.Attribute, Generator.GetDeclarationKind(xWithArg))
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")),
3796Generator.ReplaceNode(declC, declX, Generator.InsertAttributeArguments(declX, 0, {Generator.AttributeArgument(Generator.IdentifierName("e"))})),
3804Generator.RemoveNode(declC, declX),
3811Generator.RemoveNode(declC, declY),
3818Generator.RemoveNode(declC, declZ),
3825Generator.RemoveNodes(declC, {declX, declY}),
3832Generator.RemoveNodes(declC, {declX, declZ}),
3839Generator.RemoveNodes(declC, {declY, declZ}),
3846Generator.RemoveNodes(declC, {declX, declY, declZ}),
3862Dim imps = Generator.GetNamespaceImports(declCU)
3868Dim xRenamedQ = Generator.WithName(declX, "Q")
3869Assert.Equal(DeclarationKind.NamespaceImport, Generator.GetDeclarationKind(xRenamedQ))
3875Generator.InsertNamespaceImports(declCU, 0, Generator.NamespaceImportDeclaration("N")),
3882Generator.InsertNamespaceImports(declCU, 1, Generator.NamespaceImportDeclaration("N")),
3890Generator.InsertNamespaceImports(declCU, 2, Generator.NamespaceImportDeclaration("N")),
3898Generator.InsertNamespaceImports(declCU, 3, Generator.NamespaceImportDeclaration("N")),
3906Generator.ReplaceNode(declCU, declX, Generator.NamespaceImportDeclaration("N")),
3913Generator.RemoveNode(declCU, declX),
3920Generator.RemoveNode(declCU, declY),
3927Generator.RemoveNode(declCU, declZ),
3934Generator.RemoveNodes(declCU, {declX, declY}),
3941Generator.RemoveNodes(declCU, {declX, declZ}),
3948Generator.RemoveNodes(declCU, {declY, declZ}),
3955Generator.RemoveNodes(declCU, {declX, declY, declZ}),