2 overrides of IdentifierName
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3382
public override SyntaxNode
IdentifierName
(string identifier)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
197
Public Overrides Function
IdentifierName
(identifier As String) As SyntaxNode
1548 references to IdentifierName
Microsoft.CodeAnalysis.CodeStyle.Fixes (42)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (2)
108
generator.
IdentifierName
(nameof(Enumerable.Select))),
111
generator.ConvertExpression(iterationVariableType, generator.
IdentifierName
("v"))));
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
259
generator.
IdentifierName
("value")));
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
336
generator.MemberAccessExpression(throughExpression, memberName), generator.
IdentifierName
("value")));
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
168
g.
IdentifierName
(disposedValueField.Name), g.TrueLiteralExpression()));
171
g.LogicalNotExpression(g.
IdentifierName
(disposedValueField.Name)),
202
g.
IdentifierName
(nameof(IDisposable.Dispose)),
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (3)
251
var qualifiedNameSyntaxKind = generator.QualifiedName(generator.
IdentifierName
("ignored"), generator.
IdentifierName
("ignored")).RawKind;
252
var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.
IdentifierName
("ignored"), "ignored").RawKind;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
416
left: generator.
IdentifierName
(AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName),
src\Analyzers\Core\CodeFixes\UseExplicitTupleName\UseExplicitTupleNameCodeFixProvider.cs (1)
48
var newNameNode = generator.
IdentifierName
(preferredName).WithTriviaFrom(oldNameNode);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
147
generator.
IdentifierName
(field.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (17)
48
: codeDefinitionFactory.QualifiedName(codeDefinitionFactory.
IdentifierName
(nameof(System)), codeDefinitionFactory.
IdentifierName
(nameof(NotImplementedException)));
70
return factory.Argument(parameter.RefKind, factory.
IdentifierName
(parameter.Name));
84
return factory.MemberAccessExpression(typeExpression, factory.
IdentifierName
(DefaultName));
109
: generator.
IdentifierName
(method.Name));
120
var name = generator.
IdentifierName
(throughMember.Name);
172
generator.
IdentifierName
(explicitlyImplementedProperty.Name));
187
: factory.
IdentifierName
(classOrStructType.Name);
201
throughExpression, generator.
IdentifierName
(property.Name));
225
throughExpression, generator.
IdentifierName
(property.Name));
233
expression = generator.AssignmentStatement(expression, generator.
IdentifierName
("value"));
339
factory.
IdentifierName
(parameterName),
351
var fieldAccess = factory.MemberAccessExpression(factory.ThisExpression(), factory.
IdentifierName
(fieldName))
402
factory.
IdentifierName
(parameter.Name))));
412
factory.
IdentifierName
(parameter.Name),
425
factory.
IdentifierName
(parameter.Name))).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation);
443
var identifier = factory.
IdentifierName
(identifierName);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (8)
136
var localNameExpression = factory.
IdentifierName
(localName);
137
var objNameExpression = factory.
IdentifierName
(ObjName);
201
factory.
IdentifierName
(EqualsName)),
231
var symbolNameExpression = factory.
IdentifierName
(member.Name);
265
factory.
IdentifierName
(EqualsName)),
281
var otherNameExpression = factory.
IdentifierName
(OtherName);
304
factory.
IdentifierName
(EqualsName)),
356
factory.
IdentifierName
(nameof(ReferenceEquals)),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
59
var localReference = factory.
IdentifierName
(hashName);
139
var hashCodeNameExpression = factory.
IdentifierName
(HashCodeName);
224
var getHashCodeNameExpression = factory.
IdentifierName
(GetHashCodeName);
226
factory.
IdentifierName
(member.Name)).WithAdditionalAnnotations(Simplification.Simplifier.Annotation);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
162
generator.
IdentifierName
(parameter.Name),
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
100
g.
IdentifierName
(nameof(IDisposable.Dispose)),
src\Analyzers\CSharp\CodeFixes\UseNameofInAttribute\CSharpUseNameofInAttributeCodeFixProvider.cs (1)
50
editor.Generator.NameOfExpression(editor.Generator.
IdentifierName
(name)).WithTriviaFrom(expression));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
43
var replacement = g.ReturnStatement(g.NameOfExpression(g.
IdentifierName
("M")));
83
var replacement = (ReturnStatementSyntax)g.ReturnStatement(g.NameOfExpression(g.
IdentifierName
("M")));
Microsoft.CodeAnalysis.CSharp.Features (12)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (3)
58
var getAccessorStatement = generator.ReturnStatement(generator.
IdentifierName
(fieldName));
65
generator.
IdentifierName
(fieldName),
66
generator.
IdentifierName
("value")));
InitializeParameter\CSharpInitializeMemberFromParameterCodeRefactoringProvider.cs (2)
86
var left = (ArgumentSyntax)generator.Argument(generator.MemberAccessExpression(generator.ThisExpression(), generator.
IdentifierName
(fieldOrProperty.Name)));
87
var right = (ArgumentSyntax)generator.Argument(generator.
IdentifierName
(parameter.Name));
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
156
generator.
IdentifierName
("value")))));
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
52
var indexVariable = (ExpressionSyntax)generator.
IdentifierName
(iteratorName);
Snippets\CSharpForLoopSnippetProvider.cs (1)
33
=> (ExpressionSyntax)(inlineExpression ?? generator.
IdentifierName
("length"));
Snippets\CSharpReversedForLoopSnippetProvider.cs (1)
31
var subtractFrom = inlineExpression?.WithoutLeadingTrivia() ?? generator.
IdentifierName
("length");
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
162
generator.
IdentifierName
(parameter.Name),
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
100
g.
IdentifierName
(nameof(IDisposable.Dispose)),
src\Analyzers\CSharp\CodeFixes\UseNameofInAttribute\CSharpUseNameofInAttributeCodeFixProvider.cs (1)
50
editor.Generator.NameOfExpression(editor.Generator.
IdentifierName
(name)).WithTriviaFrom(expression));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (653)
CodeGeneration\SymbolEditorTests.cs (4)
767
var newSymbolC = await editor.SetBaseTypeAsync(symbol, g => g.
IdentifierName
("A"));
808
var newSymbolC = await editor.SetBaseTypeAsync(symbol, g => g.
IdentifierName
("A"));
841
var newSymbolC = await editor.SetBaseTypeAsync(symbol, g => g.
IdentifierName
("A"));
874
var newSymbolC = editor.SetBaseTypeAsync(symbol, g => g.
IdentifierName
("A"));
CodeGeneration\SyntaxGeneratorTests.cs (649)
240
VerifySyntax<IdentifierNameSyntax>(Generator.
IdentifierName
("x"), "x");
241
VerifySyntax<QualifiedNameSyntax>(Generator.QualifiedName(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y");
244
VerifySyntax<GenericNameSyntax>(Generator.GenericName("x", Generator.
IdentifierName
("y")), "x<y>");
245
VerifySyntax<GenericNameSyntax>(Generator.GenericName("x", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x<y, z>");
248
VerifySyntax<GenericNameSyntax>(Generator.WithTypeArguments(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x<y>");
251
VerifySyntax<QualifiedNameSyntax>(Generator.WithTypeArguments(Generator.DottedName("x.y"), Generator.
IdentifierName
("z")), "x.y<z>");
254
VerifySyntax<MemberAccessExpressionSyntax>(Generator.WithTypeArguments(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x.y<z>");
257
var gname = Generator.WithTypeArguments(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"));
259
VerifySyntax<GenericNameSyntax>(Generator.WithTypeArguments(gname, Generator.
IdentifierName
("z")), "x<z>");
266
VerifySyntax<TypeSyntax>(Generator.
IdentifierName
("x"), "x");
267
VerifySyntax<TypeSyntax>(Generator.QualifiedName(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y");
269
VerifySyntax<TypeSyntax>(Generator.GenericName("x", Generator.
IdentifierName
("y")), "x<y>");
270
VerifySyntax<TypeSyntax>(Generator.GenericName("x", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x<y, z>");
272
VerifySyntax<TypeSyntax>(Generator.ArrayTypeExpression(Generator.
IdentifierName
("x")), "x[]");
273
VerifySyntax<TypeSyntax>(Generator.ArrayTypeExpression(Generator.ArrayTypeExpression(Generator.
IdentifierName
("x"))), "x[][]");
274
VerifySyntax<TypeSyntax>(Generator.NullableTypeExpression(Generator.
IdentifierName
("x")), "x?");
275
VerifySyntax<TypeSyntax>(Generator.NullableTypeExpression(Generator.NullableTypeExpression(Generator.
IdentifierName
("x"))), "x?");
278
VerifySyntax<TupleElementSyntax>(Generator.TupleElementExpression(Generator.
IdentifierName
("x")), "x");
279
VerifySyntax<TupleElementSyntax>(Generator.TupleElementExpression(Generator.
IdentifierName
("x"), "y"), "x y");
282
VerifySyntax<TypeSyntax>(Generator.TupleTypeExpression(Generator.TupleElementExpression(Generator.
IdentifierName
("x")), Generator.TupleElementExpression(Generator.
IdentifierName
("y"))), "(x, y)");
325
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.NegateExpression(Generator.
IdentifierName
("x")), "-(x)");
326
VerifySyntax<BinaryExpressionSyntax>(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) + (y)");
327
VerifySyntax<BinaryExpressionSyntax>(Generator.SubtractExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) - (y)");
328
VerifySyntax<BinaryExpressionSyntax>(Generator.MultiplyExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) * (y)");
329
VerifySyntax<BinaryExpressionSyntax>(Generator.DivideExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) / (y)");
330
VerifySyntax<BinaryExpressionSyntax>(Generator.ModuloExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) % (y)");
332
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.BitwiseNotExpression(Generator.
IdentifierName
("x")), "~(x)");
333
VerifySyntax<BinaryExpressionSyntax>(Generator.BitwiseAndExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) & (y)");
334
VerifySyntax<BinaryExpressionSyntax>(Generator.BitwiseOrExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) | (y)");
336
VerifySyntax<PrefixUnaryExpressionSyntax>(Generator.LogicalNotExpression(Generator.
IdentifierName
("x")), "!(x)");
337
VerifySyntax<BinaryExpressionSyntax>(Generator.LogicalAndExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) && (y)");
338
VerifySyntax<BinaryExpressionSyntax>(Generator.LogicalOrExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) || (y)");
344
VerifySyntax<BinaryExpressionSyntax>(Generator.ReferenceEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) == (y)");
345
VerifySyntax<BinaryExpressionSyntax>(Generator.ValueEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) == (y)");
347
VerifySyntax<BinaryExpressionSyntax>(Generator.ReferenceNotEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) != (y)");
348
VerifySyntax<BinaryExpressionSyntax>(Generator.ValueNotEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) != (y)");
350
VerifySyntax<BinaryExpressionSyntax>(Generator.LessThanExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) < (y)");
351
VerifySyntax<BinaryExpressionSyntax>(Generator.LessThanOrEqualExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) <= (y)");
353
VerifySyntax<BinaryExpressionSyntax>(Generator.GreaterThanExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) > (y)");
354
VerifySyntax<BinaryExpressionSyntax>(Generator.GreaterThanOrEqualExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) >= (y)");
360
VerifySyntax<BinaryExpressionSyntax>(Generator.CoalesceExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) ?? (y)");
361
VerifySyntax<ConditionalExpressionSyntax>(Generator.ConditionalExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "(x) ? (y) : (z)");
367
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y");
368
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), "y"), "x.y");
369
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x.y.z");
370
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x(y).z");
371
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x[y].z");
372
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "((x) + (y)).z");
373
VerifySyntax<MemberAccessExpressionSyntax>(Generator.MemberAccessExpression(Generator.NegateExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y")), "(-(x)).y");
380
Generator.ArrayCreationExpression(Generator.
IdentifierName
("x"), Generator.LiteralExpression(10)),
384
Generator.ArrayCreationExpression(Generator.
IdentifierName
("x"), new SyntaxNode[] { Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z") }),
398
Generator.ObjectCreationExpression(Generator.
IdentifierName
("x")),
402
Generator.ObjectCreationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")),
410
Generator.ObjectCreationExpression(listOfIntType, Generator.
IdentifierName
("y")),
418
Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")),
422
Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")),
426
Generator.ElementAccessExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
430
Generator.ElementAccessExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
434
Generator.ElementAccessExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
438
Generator.ElementAccessExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
445
VerifySyntax<CastExpressionSyntax>(Generator.CastExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x)(y)");
446
VerifySyntax<CastExpressionSyntax>(Generator.ConvertExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x)(y)");
452
VerifySyntax<BinaryExpressionSyntax>(Generator.IsTypeExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) is y");
453
VerifySyntax<BinaryExpressionSyntax>(Generator.TryCastExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) as y");
454
VerifySyntax<TypeOfExpressionSyntax>(Generator.TypeOfExpression(Generator.
IdentifierName
("x")), "typeof(x)");
461
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x")), "x()");
462
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x(y)");
463
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x(y, z)");
466
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(Generator.
IdentifierName
("y"))), "x(y)");
467
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(RefKind.Ref, Generator.
IdentifierName
("y"))), "x(ref y)");
468
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(RefKind.Out, Generator.
IdentifierName
("y"))), "x(out y)");
471
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x.y()");
472
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x[y]()");
473
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x(y)()");
474
VerifySyntax<InvocationExpressionSyntax>(Generator.InvocationExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "((x) + (y))()");
479
=> VerifySyntax<AssignmentExpressionSyntax>(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x = (y)");
484
VerifySyntax<ExpressionStatementSyntax>(Generator.ExpressionStatement(Generator.
IdentifierName
("x")), "x;");
485
VerifySyntax<ExpressionStatementSyntax>(Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("x"))), "x();");
491
VerifySyntax<LocalDeclarationStatementSyntax>(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y"), "x y;");
492
VerifySyntax<LocalDeclarationStatementSyntax>(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z")), "x y = z;");
494
VerifySyntax<LocalDeclarationStatementSyntax>(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", isConst: true), "const x y;");
495
VerifySyntax<LocalDeclarationStatementSyntax>(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z"), isConst: true), "const x y = z;");
497
VerifySyntax<LocalDeclarationStatementSyntax>(Generator.LocalDeclarationStatement("y", Generator.
IdentifierName
("z")), "var y = z;");
504
Generator.AddEventHandler(Generator.
IdentifierName
("@event"), Generator.
IdentifierName
("handler")),
512
Generator.RemoveEventHandler(Generator.
IdentifierName
("@event"),
513
Generator.
IdentifierName
("handler")), "@event -= (handler)");
518
=> VerifySyntax<AwaitExpressionSyntax>(Generator.AwaitExpression(Generator.
IdentifierName
("x")), "await x");
522
=> VerifySyntax<InvocationExpressionSyntax>(Generator.NameOfExpression(Generator.
IdentifierName
("x")), "nameof(x)");
528
[Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")]), "(x, y)");
531
Generator.Argument("goo", RefKind.None, Generator.
IdentifierName
("x")),
532
Generator.Argument("bar", RefKind.None, Generator.
IdentifierName
("y"))]), "(goo: x, bar: y)");
539
VerifySyntax<ReturnStatementSyntax>(Generator.ReturnStatement(Generator.
IdentifierName
("x")), "return x;");
546
VerifySyntax<YieldStatementSyntax>(Generator.YieldReturnStatement(Generator.
IdentifierName
("x")), "yield return x;");
553
VerifySyntax<ThrowStatementSyntax>(Generator.ThrowStatement(Generator.
IdentifierName
("x")), "throw x;");
560
Generator.IfStatement(Generator.
IdentifierName
("x"), new SyntaxNode[] { }),
564
Generator.IfStatement(Generator.
IdentifierName
("x"), new SyntaxNode[] { }, new SyntaxNode[] { }),
568
Generator.IfStatement(Generator.
IdentifierName
("x"),
569
new SyntaxNode[] { Generator.
IdentifierName
("y") }),
573
Generator.IfStatement(Generator.
IdentifierName
("x"),
574
new SyntaxNode[] { Generator.
IdentifierName
("y") },
575
new SyntaxNode[] { Generator.
IdentifierName
("z") }),
579
Generator.IfStatement(Generator.
IdentifierName
("x"),
580
new SyntaxNode[] { Generator.
IdentifierName
("y") },
581
Generator.IfStatement(Generator.
IdentifierName
("p"), new SyntaxNode[] { Generator.
IdentifierName
("q") })),
585
Generator.IfStatement(Generator.
IdentifierName
("x"),
586
new SyntaxNode[] { Generator.
IdentifierName
("y") },
587
Generator.IfStatement(Generator.
IdentifierName
("p"), new SyntaxNode[] { Generator.
IdentifierName
("q") }, Generator.
IdentifierName
("z"))),
595
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
596
Generator.SwitchSection(Generator.
IdentifierName
("y"),
597
[Generator.
IdentifierName
("z")])),
601
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
603
[Generator.
IdentifierName
("y"), Generator.
IdentifierName
("p"), Generator.
IdentifierName
("q")],
604
[Generator.
IdentifierName
("z")])),
608
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
609
Generator.SwitchSection(Generator.
IdentifierName
("y"),
610
[Generator.
IdentifierName
("z")]),
611
Generator.SwitchSection(Generator.
IdentifierName
("a"),
612
[Generator.
IdentifierName
("b")])),
616
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
617
Generator.SwitchSection(Generator.
IdentifierName
("y"),
618
[Generator.
IdentifierName
("z")]),
620
[Generator.
IdentifierName
("b")])),
624
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
625
Generator.SwitchSection(Generator.
IdentifierName
("y"),
630
Generator.SwitchStatement(Generator.TupleExpression([Generator.
IdentifierName
("x1"), Generator.
IdentifierName
("x2")]),
631
Generator.SwitchSection(Generator.
IdentifierName
("y"),
632
[Generator.
IdentifierName
("z")])),
641
Generator.UsingStatement(Generator.
IdentifierName
("x"), [Generator.
IdentifierName
("y")]),
645
Generator.UsingStatement("x", Generator.
IdentifierName
("y"), [Generator.
IdentifierName
("z")]),
649
Generator.UsingStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z"), [Generator.
IdentifierName
("q")]),
657
Generator.LockStatement(Generator.
IdentifierName
("x"), [Generator.
IdentifierName
("y")]),
666
[Generator.
IdentifierName
("x")],
667
Generator.CatchClause(Generator.
IdentifierName
("y"), "z",
668
[Generator.
IdentifierName
("a")])),
673
[Generator.
IdentifierName
("s")],
674
Generator.CatchClause(Generator.
IdentifierName
("x"), "y",
675
[Generator.
IdentifierName
("z")]),
676
Generator.CatchClause(Generator.
IdentifierName
("a"), "b",
677
[Generator.
IdentifierName
("c")])),
682
[Generator.
IdentifierName
("s")],
683
[Generator.CatchClause(Generator.
IdentifierName
("x"), "y", [Generator.
IdentifierName
("z")])],
684
[Generator.
IdentifierName
("a")]),
689
[Generator.
IdentifierName
("x")],
690
[Generator.
IdentifierName
("a")]),
698
Generator.WhileStatement(Generator.
IdentifierName
("x"),
699
[Generator.
IdentifierName
("y")]),
703
Generator.WhileStatement(Generator.
IdentifierName
("x"), null),
711
Generator.ValueReturningLambdaExpression("x", Generator.
IdentifierName
("y")),
715
Generator.ValueReturningLambdaExpression(new[] { Generator.LambdaParameter("x"), Generator.LambdaParameter("y") }, Generator.
IdentifierName
("z")),
719
Generator.ValueReturningLambdaExpression(new SyntaxNode[] { }, Generator.
IdentifierName
("y")),
723
Generator.VoidReturningLambdaExpression("x", Generator.
IdentifierName
("y")),
727
Generator.VoidReturningLambdaExpression(new[] { Generator.LambdaParameter("x"), Generator.LambdaParameter("y") }, Generator.
IdentifierName
("z")),
731
Generator.VoidReturningLambdaExpression(new SyntaxNode[] { }, Generator.
IdentifierName
("y")),
735
Generator.ValueReturningLambdaExpression("x", [Generator.ReturnStatement(Generator.
IdentifierName
("y"))]),
739
Generator.ValueReturningLambdaExpression(new[] { Generator.LambdaParameter("x"), Generator.LambdaParameter("y") }, [Generator.ReturnStatement(Generator.
IdentifierName
("z"))]),
743
Generator.ValueReturningLambdaExpression(new SyntaxNode[] { }, [Generator.ReturnStatement(Generator.
IdentifierName
("y"))]),
747
Generator.VoidReturningLambdaExpression("x", [Generator.
IdentifierName
("y")]),
751
Generator.VoidReturningLambdaExpression(new[] { Generator.LambdaParameter("x"), Generator.LambdaParameter("y") }, [Generator.
IdentifierName
("z")]),
755
Generator.VoidReturningLambdaExpression(new SyntaxNode[] { }, [Generator.
IdentifierName
("y")]),
759
Generator.ValueReturningLambdaExpression(new[] { Generator.LambdaParameter("x", Generator.
IdentifierName
("y")) }, Generator.
IdentifierName
("z")),
763
Generator.ValueReturningLambdaExpression(new[] { Generator.LambdaParameter("x", Generator.
IdentifierName
("y")), Generator.LambdaParameter("a", Generator.
IdentifierName
("b")) }, Generator.
IdentifierName
("z")),
767
Generator.VoidReturningLambdaExpression(new[] { Generator.LambdaParameter("x", Generator.
IdentifierName
("y")) }, Generator.
IdentifierName
("z")),
771
Generator.VoidReturningLambdaExpression(new[] { Generator.LambdaParameter("x", Generator.
IdentifierName
("y")), Generator.LambdaParameter("a", Generator.
IdentifierName
("b")) }, Generator.
IdentifierName
("z")),
813
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("x")),
817
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("x"), statements: [Generator.
IdentifierName
("y")]),
821
Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], returnType: Generator.
IdentifierName
("x")),
825
Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("a"))], returnType: Generator.
IdentifierName
("x")),
829
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("x"), accessibility: Accessibility.Public),
833
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("x"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Abstract),
841
Generator.MethodDeclaration("m", modifiers: DeclarationModifiers.Partial, statements: [Generator.
IdentifierName
("y")]),
1020
Generator.ConstructorDeclaration("c", [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))]),
1025
parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))],
1026
baseConstructorArguments: [Generator.
IdentifierName
("p")]),
1034
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.ReadOnly),
1038
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.WriteOnly),
1042
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.ReadOnly),
1046
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.ReadOnly, getAccessorStatements: []),
1050
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.WriteOnly),
1054
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.WriteOnly, setAccessorStatements: []),
1058
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract),
1062
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Required),
1066
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.ReadOnly, getAccessorStatements: [Generator.
IdentifierName
("y")]),
1070
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.WriteOnly, setAccessorStatements: [Generator.
IdentifierName
("y")]),
1074
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), setAccessorStatements: [Generator.
IdentifierName
("y")]),
1078
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), getAccessorStatements: [], setAccessorStatements: [Generator.
IdentifierName
("y")]),
1086
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.ReadOnly),
1090
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract | DeclarationModifiers.WriteOnly),
1094
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract),
1098
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.ReadOnly),
1102
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.WriteOnly),
1106
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.ReadOnly,
1107
getAccessorStatements: [Generator.
IdentifierName
("a")]),
1111
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.WriteOnly,
1112
setAccessorStatements: [Generator.
IdentifierName
("a")]),
1116
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x")),
1120
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"),
1121
setAccessorStatements: [Generator.
IdentifierName
("a")]),
1125
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"),
1126
getAccessorStatements: [Generator.
IdentifierName
("a")], setAccessorStatements: [Generator.
IdentifierName
("b")]),
1134
Generator.EventDeclaration("ef", Generator.
IdentifierName
("t")),
1138
Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public),
1142
Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Static),
1150
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1154
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Abstract),
1158
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t")),
1162
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), addAccessorStatements: [Generator.
IdentifierName
("s")], removeAccessorStatements: [Generator.
IdentifierName
("s2")]),
1171
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1172
Generator.
IdentifierName
("i")),
1177
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract),
1178
Generator.
IdentifierName
("i")),
1183
Generator.IndexerDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("a"))], type: Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal, modifiers: DeclarationModifiers.Abstract),
1184
Generator.
IdentifierName
("i")),
1189
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract),
1190
Generator.
IdentifierName
("i"));
1193
Generator.AsPublicInterfaceImplementation(pim, Generator.
IdentifierName
("i2")),
1197
Generator.AsPublicInterfaceImplementation(pim, Generator.
IdentifierName
("i2"), "m2"),
1233
Generator.
IdentifierName
("i")),
1272
Generator.
IdentifierName
("i")),
1333
Generator.
IdentifierName
("i")),
1353
Generator.
IdentifierName
("i")),
1377
Generator.
IdentifierName
("i")),
1403
Generator.
IdentifierName
("i")),
1434
Generator.
IdentifierName
("i")),
1464
Generator.
IdentifierName
("i")),
1474
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract),
1475
Generator.
IdentifierName
("i")),
1480
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal, modifiers: DeclarationModifiers.Abstract),
1481
Generator.
IdentifierName
("i")),
1486
Generator.IndexerDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("a"))], type: Generator.
IdentifierName
("t"), accessibility: Accessibility.Protected, modifiers: DeclarationModifiers.Abstract),
1487
Generator.
IdentifierName
("i")),
1492
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1493
Generator.
IdentifierName
("i")),
1498
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract),
1499
Generator.
IdentifierName
("i"));
1502
Generator.AsPrivateInterfaceImplementation(pim, Generator.
IdentifierName
("i2")),
1506
Generator.AsPrivateInterfaceImplementation(pim, Generator.
IdentifierName
("i2"), "m2"),
1523
var privateMethod = Generator.AsPrivateInterfaceImplementation(method, Generator.
IdentifierName
("IFace"));
1542
Generator.ClassDeclaration("c", baseType: Generator.
IdentifierName
("x")),
1546
Generator.ClassDeclaration("c", interfaceTypes: [Generator.
IdentifierName
("x")]),
1550
Generator.ClassDeclaration("c", baseType: Generator.
IdentifierName
("x"), interfaceTypes: [Generator.
IdentifierName
("y")]),
1558
Generator.ClassDeclaration("c", members: [Generator.FieldDeclaration("y", type: Generator.
IdentifierName
("x"))]),
1562
Generator.ClassDeclaration("c", members: [Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"))]),
1582
Generator.StructDeclaration("s", interfaceTypes: [Generator.
IdentifierName
("x")]),
1586
Generator.StructDeclaration("s", interfaceTypes: [Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")]),
1594
Generator.StructDeclaration("s", members: [Generator.FieldDeclaration("y", Generator.
IdentifierName
("x"))]),
1598
Generator.StructDeclaration("s", members: [Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"))]),
1618
Generator.InterfaceDeclaration("i", interfaceTypes: [Generator.
IdentifierName
("a")]),
1622
Generator.InterfaceDeclaration("i", interfaceTypes: [Generator.
IdentifierName
("a"), Generator.
IdentifierName
("b")]),
1630
Generator.InterfaceDeclaration("i", members: [Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1634
Generator.InterfaceDeclaration("i", members: [Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1638
Generator.InterfaceDeclaration("i", members: [Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.ReadOnly)]),
1642
Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.
IdentifierName
("x"))], Generator.
IdentifierName
("t"), Accessibility.Public, DeclarationModifiers.Sealed)]),
1646
Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.
IdentifierName
("x"))], Generator.
IdentifierName
("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)]),
1650
Generator.InterfaceDeclaration("i", members: [Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1654
Generator.InterfaceDeclaration("i", members: [Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]),
1658
Generator.InterfaceDeclaration("i", members: [Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]),
1688
Generator.EnumDeclaration("e", members: [Generator.
IdentifierName
("a"), Generator.EnumMember("b"), Generator.
IdentifierName
("c")]),
1696
Generator.EnumDeclaration("e", members: [Generator.FieldDeclaration("a", Generator.
IdentifierName
("e"), initializer: Generator.LiteralExpression(1))]),
1708
Generator.DelegateDeclaration("d", returnType: Generator.
IdentifierName
("t")),
1712
Generator.DelegateDeclaration("d", returnType: Generator.
IdentifierName
("t"), parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("pt"))]),
1736
Generator.NamespaceImportDeclaration(Generator.
IdentifierName
("n")),
1807
Generator.Attribute(Generator.
IdentifierName
("a")),
1823
Generator.Attribute("a", [Generator.
IdentifierName
("x")]),
1827
Generator.Attribute("a", [Generator.AttributeArgument(Generator.
IdentifierName
("x"))]),
1831
Generator.Attribute("a", [Generator.AttributeArgument("x", Generator.
IdentifierName
("y"))]),
1835
Generator.Attribute("a", [Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")]),
1844
Generator.FieldDeclaration("y", Generator.
IdentifierName
("x")),
1851
Generator.FieldDeclaration("y", Generator.
IdentifierName
("x")),
1858
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1864
Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1870
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Abstract),
1876
Generator.IndexerDeclaration([Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))], Generator.
IdentifierName
("x"), modifiers: DeclarationModifiers.Abstract),
1882
Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract),
1888
Generator.EventDeclaration("ef", Generator.
IdentifierName
("t")),
1918
Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")),
1958
var prop = Generator.PropertyDeclaration("P", Generator.
IdentifierName
("T"));
1959
var evnt = Generator.CustomEventDeclaration("E", Generator.
IdentifierName
("T"));
2053
"a", Generator.
IdentifierName
("b")),
2059
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2071
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")), "a"),
2078
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2079
"x", Generator.
IdentifierName
("y")),
2115
"a", SpecialTypeConstraintKind.ReferenceType, Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2124
"a", Generator.
IdentifierName
("x")),
2132
"a", Generator.
IdentifierName
("x")),
2140
"a", Generator.
IdentifierName
("x")),
2148
"a", Generator.
IdentifierName
("x")),
2626
AssertNamesEqual(new[] { "x.y", "z" }, Generator.GetNamespaceImports(Generator.AddNamespaceImports(Generator.CompilationUnit(), Generator.NamespaceImportDeclaration("x.y"), Generator.
IdentifierName
("z"))));
2628
AssertNamesEqual(new[] { "x", "y.z" }, Generator.GetNamespaceImports(Generator.AddNamespaceImports(Generator.CompilationUnit(Generator.
IdentifierName
("x")), Generator.DottedName("y.z"))));
2635
TestRemoveAllNamespaceImports(Generator.CompilationUnit(Generator.NamespaceImportDeclaration("x"), Generator.
IdentifierName
("y")));
2638
TestRemoveNamespaceImport(Generator.CompilationUnit(Generator.NamespaceImportDeclaration("x"), Generator.
IdentifierName
("y")), "x", ["y"]);
2639
TestRemoveNamespaceImport(Generator.CompilationUnit(Generator.NamespaceImportDeclaration("x"), Generator.
IdentifierName
("y")), "y", ["x"]);
2801
method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
2814
getAccessor = getAccessor.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
2818
setAccessor = setAccessor.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.InvocationExpression(Generator.
IdentifierName
("x"))));
2822
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
2882
Assert.Equal(DeclarationKind.Property, Generator.GetDeclarationKind(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))));
2883
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t"))));
2884
Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))));
2886
Assert.Equal(DeclarationKind.Event, Generator.GetDeclarationKind(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"))));
2887
Assert.Equal(DeclarationKind.CustomEvent, Generator.GetDeclarationKind(Generator.CustomEventDeclaration("e", Generator.
IdentifierName
("t"))));
2890
Assert.Equal(DeclarationKind.Variable, Generator.GetDeclarationKind(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")));
2905
Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))));
2906
Assert.Equal("", Generator.GetName(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t"))));
2907
Assert.Equal("f", Generator.GetName(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))));
2909
Assert.Equal("ef", Generator.GetName(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"))));
2910
Assert.Equal("ep", Generator.GetName(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"))));
2913
Assert.Equal("loc", Generator.GetName(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")));
2928
Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.
IdentifierName
("t")), "p")));
2929
Assert.Equal("", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t")), "this")));
2930
Assert.Equal("f", Generator.GetName(Generator.WithName(Generator.FieldDeclaration("x", Generator.
IdentifierName
("t")), "f")));
2932
Assert.Equal("ef", Generator.GetName(Generator.WithName(Generator.EventDeclaration("x", Generator.
IdentifierName
("t")), "ef")));
2933
Assert.Equal("ep", Generator.GetName(Generator.WithName(Generator.CustomEventDeclaration("x", Generator.
IdentifierName
("t")), "ep")));
2936
Assert.Equal("loc", Generator.GetName(Generator.WithName(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "x"), "loc")));
2951
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal)));
2952
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal)));
2953
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal)));
2955
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal)));
2956
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal)));
2959
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")));
2975
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2976
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2977
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2979
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2980
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility: Accessibility.Internal), Accessibility.Private)));
2983
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), Accessibility.Private)));
2999
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract)));
3000
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Abstract)));
3001
Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Const)));
3002
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Static)));
3003
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), modifiers: DeclarationModifiers.Static)));
3007
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")));
3022
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), DeclarationModifiers.Abstract)));
3023
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t")), DeclarationModifiers.Abstract)));
3024
Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t")), DeclarationModifiers.Const)));
3025
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t")), DeclarationModifiers.Static)));
3026
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t")), DeclarationModifiers.Static)));
3030
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), DeclarationModifiers.Abstract)));
3062
Generator.GetModifiers(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t")), allModifiers)));
3078
Generator.GetModifiers(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), allModifiers)));
3082
Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.
IdentifierName
("t")), allModifiers)));
3086
Generator.GetModifiers(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t")), allModifiers)));
3090
Generator.GetModifiers(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t")), allModifiers)));
3194
Assert.Equal("t", Generator.GetType(Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("t"))).ToString());
3197
Assert.Equal("t", Generator.GetType(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))).ToString());
3198
Assert.Equal("t", Generator.GetType(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).ToString());
3199
Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("pt"))], Generator.
IdentifierName
("t"))).ToString());
3200
Assert.Equal("t", Generator.GetType(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))).ToString());
3202
Assert.Equal("t", Generator.GetType(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"))).ToString());
3203
Assert.Equal("t", Generator.GetType(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"))).ToString());
3205
Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType: Generator.
IdentifierName
("t"))).ToString());
3208
Assert.Equal("t", Generator.GetType(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "v")).ToString());
3211
Assert.Null(Generator.GetType(Generator.
IdentifierName
("x")));
3217
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m", returnType: Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3218
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.FieldDeclaration("f", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3219
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3220
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("pt"))], Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3221
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3223
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.
IdentifierName
("t"))).ToString());
3225
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.EventDeclaration("ef", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3226
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString());
3228
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "v"), Generator.
IdentifierName
("t"))).ToString());
3229
Assert.Null(Generator.GetType(Generator.WithType(Generator.ClassDeclaration("c"), Generator.
IdentifierName
("t"))));
3230
Assert.Null(Generator.GetType(Generator.WithType(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("t"))));
3237
Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3238
Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))])).Count);
3241
Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3242
Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))])).Count);
3244
Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))], Generator.
IdentifierName
("t"))).Count);
3245
Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))], Generator.
IdentifierName
("t"))).Count);
3247
Assert.Equal(0, Generator.GetParameters(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("expr"))).Count);
3248
Assert.Equal(1, Generator.GetParameters(Generator.ValueReturningLambdaExpression("p1", Generator.
IdentifierName
("expr"))).Count);
3250
Assert.Equal(0, Generator.GetParameters(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("expr"))).Count);
3251
Assert.Equal(1, Generator.GetParameters(Generator.VoidReturningLambdaExpression("p1", Generator.
IdentifierName
("expr"))).Count);
3254
Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters: [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3257
Assert.Equal(0, Generator.GetParameters(Generator.
IdentifierName
("x")).Count);
3263
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3264
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3265
Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))], Generator.
IdentifierName
("t")), [Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2")), Generator.ParameterDeclaration("p3", Generator.
IdentifierName
("t3"))])).Count);
3267
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("expr")), [Generator.LambdaParameter("p")])).Count);
3268
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("expr")), [Generator.LambdaParameter("p")])).Count);
3270
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3272
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3273
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.StructDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3274
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.InterfaceDeclaration("c"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3275
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.
IdentifierName
("x"), [Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))])).Count);
3282
Assert.Equal("x", Generator.GetExpression(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), initializer: Generator.
IdentifierName
("x"))).ToString());
3283
Assert.Equal("x", Generator.GetExpression(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"), initializer: Generator.
IdentifierName
("x"))).ToString());
3284
Assert.Equal("x", Generator.GetExpression(Generator.LocalDeclarationStatement("loc", initializer: Generator.
IdentifierName
("x"))).ToString());
3287
Assert.Null(Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", [Generator.
IdentifierName
("x")])));
3288
Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", [Generator.
IdentifierName
("x")])).Count);
3289
Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("x"))).ToString());
3290
Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("x"))).ToString());
3291
Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", Generator.
IdentifierName
("x"))).ToString());
3292
Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression("p", Generator.
IdentifierName
("x"))).ToString());
3295
Assert.Null(Generator.GetExpression(Generator.
IdentifierName
("e")));
3300
method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
3307
local = local.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
3316
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t")), Generator.
IdentifierName
("x"))).ToString());
3317
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.
IdentifierName
("x"))).ToString());
3318
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), Generator.
IdentifierName
("x"))).ToString());
3321
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", [Generator.
IdentifierName
("x")]), Generator.
IdentifierName
("y"))).ToString());
3322
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", [Generator.
IdentifierName
("x")]), Generator.
IdentifierName
("y"))).ToString());
3323
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression([Generator.
IdentifierName
("x")]), Generator.
IdentifierName
("y"))).ToString());
3324
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression([Generator.
IdentifierName
("x")]), Generator.
IdentifierName
("y"))).ToString());
3325
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString());
3326
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString());
3327
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString());
3328
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString());
3331
Assert.Null(Generator.GetExpression(Generator.WithExpression(Generator.
IdentifierName
("e"), Generator.
IdentifierName
("x"))));
3336
method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
3338
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(method, Generator.
IdentifierName
("y"))).ToString());
3343
local = local.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.
IdentifierName
("x")));
3345
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(local, Generator.
IdentifierName
("y"))).ToString());
3351
var prop = Generator.PropertyDeclaration("p", Generator.
IdentifierName
("T"));
3403
Generator.WithAccessorDeclarations(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"))),
3408
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
3414
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
3420
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
3425
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))], Generator.
IdentifierName
("x"))),
3429
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))], Generator.
IdentifierName
("x")),
3435
Generator.IndexerDeclaration([Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))], Generator.
IdentifierName
("x")),
3535
Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))),
3538
Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))
3553
Assert.Equal(0, Generator.GetStatements(Generator.
IdentifierName
("x")).Count);
3562
Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))),
3565
Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))
3573
Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.
IdentifierName
("x"), stmts)).Count);
3582
Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))),
3585
Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))
3588
var p = Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"));
3591
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).Count);
3592
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), getAccessorStatements: stmts)).Count);
3594
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t"))).Count);
3595
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t"), getAccessorStatements: stmts)).Count);
3597
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.
IdentifierName
("x")).Count);
3600
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).Count);
3601
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), setAccessorStatements: stmts)).Count);
3603
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t"))).Count);
3604
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t"), setAccessorStatements: stmts)).Count);
3606
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.
IdentifierName
("x")).Count);
3615
Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))),
3618
Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))
3621
var p = Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"));
3624
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), stmts)).Count);
3625
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t")), stmts)).Count);
3626
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.
IdentifierName
("x"), stmts)).Count);
3629
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), stmts)).Count);
3630
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IndexerDeclaration([p], Generator.
IdentifierName
("t")), stmts)).Count);
3631
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.
IdentifierName
("x"), stmts)).Count);
3717
Generator.AddBaseType(classC, Generator.
IdentifierName
("T")),
3723
Generator.AddBaseType(classCI, Generator.
IdentifierName
("T")),
3730
Generator.AddBaseType(classCB, Generator.
IdentifierName
("T")),
3755
Generator.AddInterfaceType(classC, Generator.
IdentifierName
("T")),
3761
Generator.AddInterfaceType(classCI, Generator.
IdentifierName
("T")),
3767
Generator.AddInterfaceType(classCB, Generator.
IdentifierName
("T")),
3814
var xTypedT = Generator.WithType(declX, Generator.
IdentifierName
("T"));
3824
var xInitialized = Generator.WithExpression(declX, Generator.
IdentifierName
("e"));
3852
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3860
Generator.InsertMembers(declC, 1, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3869
Generator.InsertMembers(declC, 2, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3878
Generator.InsertMembers(declC, 3, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3902
Generator.ReplaceNode(declC, declY, Generator.WithType(declY, Generator.
IdentifierName
("T"))),
3911
Generator.ReplaceNode(declC, declZ, Generator.WithType(declZ, Generator.
IdentifierName
("T"))),
3947
Generator.ReplaceNode(declC, declX, Generator.WithExpression(declX, Generator.
IdentifierName
("e"))),
3967
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3985
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
4006
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
4024
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
4042
Generator.InsertMembers(declC, 0, Generator.PropertyDeclaration("A", Generator.
IdentifierName
("T"))),
4060
Generator.InsertMembers(declC, 0, Generator.PropertyDeclaration("A", Generator.
IdentifierName
("T"))),
4096
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
4114
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
4147
var xWithArg = Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.
IdentifierName
("e"))]);
4259
Generator.ReplaceNode(declC, attrX, Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.
IdentifierName
("e"))])),
4327
var xWithArg = Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.
IdentifierName
("e"))]);
4376
Generator.ReplaceNode(declM, attrX, Generator.AddAttributeArguments(attrX, [Generator.AttributeArgument(Generator.
IdentifierName
("e"))])),
4582
var newDecl = Generator.AddInterfaceType(decl, Generator.
IdentifierName
("IDisposable"));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (84)
CodeGeneration\AbstractCodeGenerationTests.cs (1)
53
codeDefFactory.NamespaceImportDeclaration(codeDefFactory.
IdentifierName
("System")),
CodeGeneration\ExpressionGenerationTests.cs (36)
301
f.
IdentifierName
("E"),
302
f.
IdentifierName
("M")),
314
f.
IdentifierName
("E"),
315
f.
IdentifierName
("T"),
316
f.
IdentifierName
("F")),
328
f.
IdentifierName
("E"),
330
f.
IdentifierName
("T"))),
342
f.
IdentifierName
("E"),
344
f.Argument(f.
IdentifierName
("T")))),
356
f.
IdentifierName
("E")),
368
f.
IdentifierName
("E"),
369
f.Argument(f.
IdentifierName
("a"))),
381
f.
IdentifierName
("E"),
382
f.Argument("n", RefKind.None, f.
IdentifierName
("a"))),
394
f.
IdentifierName
("E"),
395
f.Argument(null, RefKind.Out, f.
IdentifierName
("a")),
396
f.Argument(null, RefKind.Ref, f.
IdentifierName
("b"))),
408
f.
IdentifierName
("E"),
409
f.Argument("n1", RefKind.Out, f.
IdentifierName
("a")),
410
f.Argument("n2", RefKind.Ref, f.
IdentifierName
("b"))),
422
f.
IdentifierName
("E")),
434
f.
IdentifierName
("E"),
435
f.Argument(f.
IdentifierName
("a"))),
447
f.
IdentifierName
("E"),
448
f.Argument("n", RefKind.None, f.
IdentifierName
("a"))),
460
f.
IdentifierName
("E"),
461
f.Argument(null, RefKind.Out, f.
IdentifierName
("a")),
462
f.Argument(null, RefKind.Ref, f.
IdentifierName
("b"))),
474
f.
IdentifierName
("E"),
475
f.Argument("n1", RefKind.Out, f.
IdentifierName
("a")),
476
f.Argument("n2", RefKind.Ref, f.
IdentifierName
("b"))),
488
f.
IdentifierName
("a"),
501
f.
IdentifierName
("a"),
514
f.
IdentifierName
("a")),
527
f.
IdentifierName
("a")),
539
f.
IdentifierName
("a")),
CodeGeneration\ExpressionPrecedenceGenerationTests.cs (34)
203
f.
IdentifierName
("M")),
216
f.
IdentifierName
("E1"),
217
f.
IdentifierName
("E2")),
218
f.
IdentifierName
("T"),
219
f.
IdentifierName
("F")),
232
f.
IdentifierName
("E1"),
233
f.
IdentifierName
("T1"),
234
f.
IdentifierName
("F1")),
236
f.
IdentifierName
("E2"),
237
f.
IdentifierName
("T2"),
238
f.
IdentifierName
("F2"))),
253
f.Argument(f.
IdentifierName
("M"))),
266
f.
IdentifierName
("a"),
268
f.
IdentifierName
("M")),
281
f.
IdentifierName
("a"),
282
f.
IdentifierName
("M")),
296
f.
IdentifierName
("a"),
298
f.
IdentifierName
("M")),
311
f.
IdentifierName
("a"),
312
f.
IdentifierName
("M")),
326
f.
IdentifierName
("a")),
327
f.
IdentifierName
("M")),
340
f.
IdentifierName
("a"),
341
f.
IdentifierName
("M"))),
355
f.
IdentifierName
("a")),
356
f.
IdentifierName
("M")),
370
f.
IdentifierName
("a"),
371
f.
IdentifierName
("b"))),
384
f.
IdentifierName
("a"),
385
f.
IdentifierName
("b"))),
398
f.
IdentifierName
("a")),
399
f.
IdentifierName
("M")),
412
f.
IdentifierName
("a"),
413
f.
IdentifierName
("M"))),
CodeGeneration\NameGenerationTests.cs (11)
19
f => f.
IdentifierName
("a"),
30
f => f.
IdentifierName
("int"),
41
f => f.
IdentifierName
("Integer"),
96
f => f.QualifiedName(f.
IdentifierName
("Outer"), f.
IdentifierName
("Inner1")),
107
f => f.QualifiedName(f.
IdentifierName
("int"), f.
IdentifierName
("string")),
118
f => f.QualifiedName(f.
IdentifierName
("Integer"), f.
IdentifierName
("String")),
130
f.
IdentifierName
("One"),
148
f.
IdentifierName
("One")),
CodeGeneration\StatementGenerationTests.cs (2)
29
f.
IdentifierName
("e")),
62
f.
IdentifierName
("e")),
Microsoft.CodeAnalysis.Features (48)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (3)
130
generator.Interpolation(generator.NameOfExpression(generator.
IdentifierName
(DebuggerDisplayMethodName))),
140
generator.NameOfExpression(generator.
IdentifierName
(DebuggerDisplayMethodName))),
172
generator.
IdentifierName
("ToString"))))
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
172
(currentId, g) => g.
IdentifierName
(newName).WithTriviaFrom(currentId));
235
classSymbol.TypeParameters.Select(tp => g.
IdentifierName
(tp.Name)));
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
331
generator.MemberAccessExpression(collectionExpression, generator.
IdentifierName
(nameof(Enumerable.ElementAt))),
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (3)
415
: (TNameSyntax)generator.GenericName(structNameToken, typeParameters.Select(tp => generator.
IdentifierName
(tp.Name)));
860
generator.
IdentifierName
(constructor.Parameters[index].Name),
885
var valueNode = generator.
IdentifierName
(ValueName);
EncapsulateField\AbstractEncapsulateFieldService.cs (5)
382
factory.
IdentifierName
(originalFieldName))
383
: factory.
IdentifierName
(originalFieldName);
388
factory.
IdentifierName
("value")));
401
factory.
IdentifierName
(originalFieldName))
402
: factory.
IdentifierName
(originalFieldName);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
163
var thisExpression = generator.
IdentifierName
(LeftName);
215
generator.
IdentifierName
(RightName));
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (6)
150
generator.
IdentifierName
(LeftName),
152
generator.
IdentifierName
(RightName))
157
generator.
IdentifierName
(LeftName),
158
generator.
IdentifierName
(RightName));
174
generator.
IdentifierName
(LeftName),
175
generator.
IdentifierName
(RightName)));
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (6)
398
generator.
IdentifierName
(methodName)),
399
generator.Argument(generator.
IdentifierName
(parameter.Name)));
545
generator.
IdentifierName
(nameof(System)),
546
generator.
IdentifierName
(type.Name));
557
generator.NameOfExpression(generator.
IdentifierName
(parameter.Name)));
576
var nameofExpression = generator.NameOfExpression(generator.
IdentifierName
(parameter.Name));
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (2)
531
generator.
IdentifierName
(fieldOrProperty.Name)),
532
generator.
IdentifierName
(parameter.Name)));
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (2)
339
syntaxNode: syntaxGenerator.
IdentifierName
(parameterAndName.identifierName)));
342
.Select(kvp => (parameter: kvp.Key, syntaxNode: syntaxGenerator.
IdentifierName
(kvp.Value)));
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (4)
353
var methodName = _generator.
IdentifierName
(newMethodIdentifier);
362
methodName = _generator.MemberBindingExpression(_generator.
IdentifierName
(newMethodIdentifier));
429
: generator.
IdentifierName
(_methodSymbol.Name);
634
var replacement = (TIdentifierNameSyntax)generator.
IdentifierName
(parameterName);
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (2)
61
? generator.QualifiedName(generator.GlobalAliasedName(generator.
IdentifierName
(nameof(System))), generator.
IdentifierName
(typeSymbol.Name))
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
239
var identifier = generator.
IdentifierName
(symbol.Name);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
41
var memberName = generator.
IdentifierName
(propertyBackingField.Name);
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (1)
44
var resultingNode = generator.InvocationExpression(generator.MemberAccessExpression(generator.
IdentifierName
(nameof(Console)), nameof(Console.WriteLine)));
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (2)
108
generator.
IdentifierName
(nameof(Enumerable.Select))),
111
generator.ConvertExpression(iterationVariableType, generator.
IdentifierName
("v"))));
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (3)
251
var qualifiedNameSyntaxKind = generator.QualifiedName(generator.
IdentifierName
("ignored"), generator.
IdentifierName
("ignored")).RawKind;
252
var memberAccessExpressionSyntaxKind = generator.MemberAccessExpression(generator.
IdentifierName
("ignored"), "ignored").RawKind;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
416
left: generator.
IdentifierName
(AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.DiscardVariableName),
src\Analyzers\Core\CodeFixes\UseExplicitTupleName\UseExplicitTupleNameCodeFixProvider.cs (1)
48
var newNameNode = generator.
IdentifierName
(preferredName).WithTriviaFrom(oldNameNode);
Microsoft.CodeAnalysis.VisualBasic.Features (4)
ConvertAutoPropertyToFullProperty\VisualBasicConvertAutoPropertyToFullProperty.vb (3)
46
generator.
IdentifierName
(fieldName)), StatementSyntax))
58
generator.AssignmentStatement(generator.
IdentifierName
(fieldName),
59
generator.
IdentifierName
("Value"))), StatementSyntax))
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
132
fieldReference, generator.
IdentifierName
(setMethod.Parameters(0).Name)))
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (648)
CodeGeneration\SyntaxGeneratorTests.vb (648)
218
VerifySyntax(Of IdentifierNameSyntax)(Generator.
IdentifierName
("x"), "x")
219
VerifySyntax(Of QualifiedNameSyntax)(Generator.QualifiedName(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y")
222
VerifySyntax(Of GenericNameSyntax)(Generator.GenericName("x", Generator.
IdentifierName
("y")), "x(Of y)")
223
VerifySyntax(Of GenericNameSyntax)(Generator.GenericName("x", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x(Of y, z)")
226
VerifySyntax(Of GenericNameSyntax)(Generator.WithTypeArguments(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x(Of y)")
229
VerifySyntax(Of QualifiedNameSyntax)(Generator.WithTypeArguments(Generator.DottedName("x.y"), Generator.
IdentifierName
("z")), "x.y(Of z)")
232
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.WithTypeArguments(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x.y(Of z)")
235
Dim gname = Generator.WithTypeArguments(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))
237
VerifySyntax(Of GenericNameSyntax)(Generator.WithTypeArguments(gname, Generator.
IdentifierName
("z")), "x(Of z)")
243
VerifySyntax(Of TypeSyntax)(Generator.
IdentifierName
("x"), "x")
244
VerifySyntax(Of TypeSyntax)(Generator.QualifiedName(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y")
246
VerifySyntax(Of TypeSyntax)(Generator.GenericName("x", Generator.
IdentifierName
("y")), "x(Of y)")
247
VerifySyntax(Of TypeSyntax)(Generator.GenericName("x", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x(Of y, z)")
249
VerifySyntax(Of TypeSyntax)(Generator.ArrayTypeExpression(Generator.
IdentifierName
("x")), "x()")
250
VerifySyntax(Of TypeSyntax)(Generator.ArrayTypeExpression(Generator.ArrayTypeExpression(Generator.
IdentifierName
("x"))), "x()()")
251
VerifySyntax(Of TypeSyntax)(Generator.NullableTypeExpression(Generator.
IdentifierName
("x")), "x?")
252
VerifySyntax(Of TypeSyntax)(Generator.NullableTypeExpression(Generator.NullableTypeExpression(Generator.
IdentifierName
("x"))), "x?")
255
VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(Generator.
IdentifierName
("x")), "x")
256
VerifySyntax(Of TupleElementSyntax)(Generator.TupleElementExpression(Generator.
IdentifierName
("x"), "y"), "y As x")
259
VerifySyntax(Of TypeSyntax)(Generator.TupleTypeExpression(Generator.TupleElementExpression(Generator.
IdentifierName
("x")), Generator.TupleElementExpression(Generator.
IdentifierName
("y"))), "(x, y)")
299
VerifySyntax(Of UnaryExpressionSyntax)(Generator.NegateExpression(Generator.
IdentifierName
("x")), "-(x)")
300
VerifySyntax(Of BinaryExpressionSyntax)(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) + (y)")
301
VerifySyntax(Of BinaryExpressionSyntax)(Generator.SubtractExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) - (y)")
302
VerifySyntax(Of BinaryExpressionSyntax)(Generator.MultiplyExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) * (y)")
303
VerifySyntax(Of BinaryExpressionSyntax)(Generator.DivideExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) / (y)")
304
VerifySyntax(Of BinaryExpressionSyntax)(Generator.ModuloExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) Mod (y)")
306
VerifySyntax(Of UnaryExpressionSyntax)(Generator.BitwiseNotExpression(Generator.
IdentifierName
("x")), "Not(x)")
307
VerifySyntax(Of BinaryExpressionSyntax)(Generator.BitwiseAndExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) And (y)")
308
VerifySyntax(Of BinaryExpressionSyntax)(Generator.BitwiseOrExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) Or (y)")
310
VerifySyntax(Of UnaryExpressionSyntax)(Generator.LogicalNotExpression(Generator.
IdentifierName
("x")), "Not(x)")
311
VerifySyntax(Of BinaryExpressionSyntax)(Generator.LogicalAndExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) AndAlso (y)")
312
VerifySyntax(Of BinaryExpressionSyntax)(Generator.LogicalOrExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) OrElse (y)")
317
VerifySyntax(Of BinaryExpressionSyntax)(Generator.ReferenceEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) Is (y)")
318
VerifySyntax(Of BinaryExpressionSyntax)(Generator.ValueEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) = (y)")
320
VerifySyntax(Of BinaryExpressionSyntax)(Generator.ReferenceNotEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) IsNot (y)")
321
VerifySyntax(Of BinaryExpressionSyntax)(Generator.ValueNotEqualsExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) <> (y)")
323
VerifySyntax(Of BinaryExpressionSyntax)(Generator.LessThanExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) < (y)")
324
VerifySyntax(Of BinaryExpressionSyntax)(Generator.LessThanOrEqualExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) <= (y)")
326
VerifySyntax(Of BinaryExpressionSyntax)(Generator.GreaterThanExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) > (y)")
327
VerifySyntax(Of BinaryExpressionSyntax)(Generator.GreaterThanOrEqualExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "(x) >= (y)")
332
VerifySyntax(Of BinaryConditionalExpressionSyntax)(Generator.CoalesceExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "If(x, y)")
333
VerifySyntax(Of TernaryConditionalExpressionSyntax)(Generator.ConditionalExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "If(x, y, z)")
338
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x.y")
339
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), "y"), "x.y")
340
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x.y.z")
341
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x(y).z")
342
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "x(y).z")
343
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")), "((x) + (y)).z")
344
VerifySyntax(Of MemberAccessExpressionSyntax)(Generator.MemberAccessExpression(Generator.NegateExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y")), "(-(x)).y")
350
Generator.ArrayCreationExpression(Generator.
IdentifierName
("x"), Generator.LiteralExpression(10)),
354
Generator.ArrayCreationExpression(Generator.
IdentifierName
("x"), {Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")}),
361
Generator.ObjectCreationExpression(Generator.
IdentifierName
("x")),
365
Generator.ObjectCreationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")),
373
Generator.ObjectCreationExpression(listOfIntType, Generator.
IdentifierName
("y")),
380
Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")),
384
Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")),
388
Generator.ElementAccessExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
392
Generator.ElementAccessExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
396
Generator.ElementAccessExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
400
Generator.ElementAccessExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), Generator.
IdentifierName
("z")),
406
VerifySyntax(Of DirectCastExpressionSyntax)(Generator.CastExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "DirectCast(y, x)")
407
VerifySyntax(Of CTypeExpressionSyntax)(Generator.ConvertExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "CType(y, x)")
412
VerifySyntax(Of TypeOfExpressionSyntax)(Generator.IsTypeExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "TypeOf(x) Is y")
413
VerifySyntax(Of TryCastExpressionSyntax)(Generator.TryCastExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "TryCast(x, y)")
414
VerifySyntax(Of GetTypeExpressionSyntax)(Generator.TypeOfExpression(Generator.
IdentifierName
("x")), "GetType(x)")
420
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x")), "x()")
421
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x(y)")
422
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")), "x(y, z)")
425
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(Generator.
IdentifierName
("y"))), "x(y)")
426
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(RefKind.Ref, Generator.
IdentifierName
("y"))), "x(y)")
427
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.Argument(RefKind.Out, Generator.
IdentifierName
("y"))), "x(y)")
429
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.MemberAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x.y()")
430
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.ElementAccessExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x(y)()")
431
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.InvocationExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "x(y)()")
432
VerifySyntax(Of InvocationExpressionSyntax)(Generator.InvocationExpression(Generator.AddExpression(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), "((x) + (y))()")
437
VerifySyntax(Of AssignmentStatementSyntax)(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")), "x = y")
442
VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.
IdentifierName
("x")), "x")
443
VerifySyntax(Of ExpressionStatementSyntax)(Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("x"))), "x()")
448
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y"), "Dim y As x")
449
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z")), "Dim y As x = z")
450
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement("y", Generator.
IdentifierName
("z")), "Dim y = z")
452
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", isConst:=True), "Const y As x")
453
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z"), isConst:=True), "Const y As x = z")
454
VerifySyntax(Of LocalDeclarationStatementSyntax)(Generator.LocalDeclarationStatement(DirectCast(Nothing, SyntaxNode), "y", Generator.
IdentifierName
("z"), isConst:=True), "Const y = z")
459
VerifySyntax(Of AwaitExpressionSyntax)(Generator.AwaitExpression(Generator.
IdentifierName
("x")), "Await x")
464
VerifySyntax(Of NameOfExpressionSyntax)(Generator.NameOfExpression(Generator.
IdentifierName
("x")), "NameOf(x)")
470
{Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")}), "(x, y)")
472
{Generator.Argument("goo", RefKind.None, Generator.
IdentifierName
("x")),
473
Generator.Argument("bar", RefKind.None, Generator.
IdentifierName
("y"))}), "(goo:=x, bar:=y)")
479
VerifySyntax(Of ReturnStatementSyntax)(Generator.ReturnStatement(Generator.
IdentifierName
("x")), "Return x")
485
VerifySyntax(Of YieldStatementSyntax)(Generator.YieldReturnStatement(Generator.
IdentifierName
("x")), "Yield x")
491
VerifySyntax(Of ThrowStatementSyntax)(Generator.ThrowStatement(Generator.
IdentifierName
("x")), "Throw x")
497
Generator.IfStatement(Generator.
IdentifierName
("x"), New SyntaxNode() {}),
502
Generator.IfStatement(Generator.
IdentifierName
("x"), Nothing),
507
Generator.IfStatement(Generator.
IdentifierName
("x"), New SyntaxNode() {}, New SyntaxNode() {}),
513
Generator.IfStatement(Generator.
IdentifierName
("x"),
514
{Generator.
IdentifierName
("y")}),
520
Generator.IfStatement(Generator.
IdentifierName
("x"),
521
{Generator.
IdentifierName
("y")},
522
{Generator.
IdentifierName
("z")}),
530
Generator.IfStatement(Generator.
IdentifierName
("x"),
531
{Generator.
IdentifierName
("y")},
532
{Generator.IfStatement(Generator.
IdentifierName
("p"), {Generator.
IdentifierName
("q")})}),
540
Generator.IfStatement(Generator.
IdentifierName
("x"),
541
{Generator.
IdentifierName
("y")},
542
Generator.IfStatement(Generator.
IdentifierName
("p"),
543
{Generator.
IdentifierName
("q")},
544
{Generator.
IdentifierName
("z")})),
558
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
559
Generator.SwitchSection(Generator.
IdentifierName
("y"),
560
{Generator.
IdentifierName
("z")})),
567
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
569
{Generator.
IdentifierName
("y"), Generator.
IdentifierName
("p"), Generator.
IdentifierName
("q")},
570
{Generator.
IdentifierName
("z")})),
577
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
578
Generator.SwitchSection(Generator.
IdentifierName
("y"),
579
{Generator.
IdentifierName
("z")}),
580
Generator.SwitchSection(Generator.
IdentifierName
("a"),
581
{Generator.
IdentifierName
("b")})),
590
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
591
Generator.SwitchSection(Generator.
IdentifierName
("y"),
592
{Generator.
IdentifierName
("z")}),
594
{Generator.
IdentifierName
("b")})),
603
Generator.SwitchStatement(Generator.
IdentifierName
("x"),
604
Generator.SwitchSection(Generator.
IdentifierName
("y"),
615
Generator.UsingStatement(Generator.
IdentifierName
("x"), {Generator.
IdentifierName
("y")}),
621
Generator.UsingStatement("x", Generator.
IdentifierName
("y"), {Generator.
IdentifierName
("z")}),
627
Generator.UsingStatement(Generator.
IdentifierName
("x"), "y", Generator.
IdentifierName
("z"), {Generator.
IdentifierName
("q")}),
636
Generator.LockStatement(Generator.
IdentifierName
("x"), {Generator.
IdentifierName
("y")}),
647
{Generator.
IdentifierName
("x")},
648
Generator.CatchClause(Generator.
IdentifierName
("y"), "z",
649
{Generator.
IdentifierName
("a")})),
658
{Generator.
IdentifierName
("s")},
659
Generator.CatchClause(Generator.
IdentifierName
("x"), "y",
660
{Generator.
IdentifierName
("z")}),
661
Generator.CatchClause(Generator.
IdentifierName
("a"), "b",
662
{Generator.
IdentifierName
("c")})),
673
{Generator.
IdentifierName
("s")},
674
{Generator.CatchClause(Generator.
IdentifierName
("x"), "y",
675
{Generator.
IdentifierName
("z")})},
676
{Generator.
IdentifierName
("a")}),
687
{Generator.
IdentifierName
("x")},
688
{Generator.
IdentifierName
("a")}),
700
Generator.WhileStatement(Generator.
IdentifierName
("x"), {Generator.
IdentifierName
("y")}),
706
Generator.WhileStatement(Generator.
IdentifierName
("x"), Nothing),
714
Generator.ValueReturningLambdaExpression("x", Generator.
IdentifierName
("y")),
718
Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, Generator.
IdentifierName
("z")),
722
Generator.ValueReturningLambdaExpression(New SyntaxNode() {}, Generator.
IdentifierName
("y")),
726
Generator.VoidReturningLambdaExpression("x", Generator.
IdentifierName
("y")),
730
Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, Generator.
IdentifierName
("z")),
734
Generator.VoidReturningLambdaExpression(New SyntaxNode() {}, Generator.
IdentifierName
("y")),
738
Generator.ValueReturningLambdaExpression("x", {Generator.ReturnStatement(Generator.
IdentifierName
("y"))}),
744
Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, {Generator.ReturnStatement(Generator.
IdentifierName
("z"))}),
750
Generator.ValueReturningLambdaExpression(New SyntaxNode() {}, {Generator.ReturnStatement(Generator.
IdentifierName
("y"))}),
756
Generator.VoidReturningLambdaExpression("x", {Generator.
IdentifierName
("y")}),
762
Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x"), Generator.LambdaParameter("y")}, {Generator.
IdentifierName
("z")}),
768
Generator.VoidReturningLambdaExpression(New SyntaxNode() {}, {Generator.
IdentifierName
("y")}),
774
Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("z")),
778
Generator.ValueReturningLambdaExpression({Generator.LambdaParameter("x", Generator.
IdentifierName
("y")), Generator.LambdaParameter("a", Generator.
IdentifierName
("b"))}, Generator.
IdentifierName
("z")),
782
Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("z")),
786
Generator.VoidReturningLambdaExpression({Generator.LambdaParameter("x", Generator.
IdentifierName
("y")), Generator.LambdaParameter("a", Generator.
IdentifierName
("b"))}, Generator.
IdentifierName
("z")),
857
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x")),
862
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x"), statements:={Generator.ReturnStatement(Generator.
IdentifierName
("y"))}),
868
Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, returnType:=Generator.
IdentifierName
("x")),
873
Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"), Generator.
IdentifierName
("a"))}, returnType:=Generator.
IdentifierName
("x")),
878
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.None),
883
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Abstract),
1119
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1123
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1127
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.ReadOnly),
1134
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.WriteOnly),
1141
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract),
1145
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.ReadOnly, getAccessorStatements:={Generator.
IdentifierName
("y")}),
1153
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.WriteOnly, setAccessorStatements:={Generator.
IdentifierName
("y")}),
1161
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), setAccessorStatements:={Generator.
IdentifierName
("y")}),
1175
Generator.WithAccessorDeclarations(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"))),
1180
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
1190
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
1205
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
1215
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
1224
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, Generator.
IdentifierName
("x"))),
1228
Generator.WithAccessorDeclarations(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, Generator.
IdentifierName
("x")),
1238
Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, Generator.
IdentifierName
("x")),
1250
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.ReadOnly),
1254
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract + DeclarationModifiers.WriteOnly),
1258
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract),
1262
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.ReadOnly),
1269
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.WriteOnly),
1276
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.ReadOnly,
1277
getAccessorStatements:={Generator.
IdentifierName
("a")}),
1285
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.WriteOnly,
1286
setAccessorStatements:={Generator.
IdentifierName
("a")}),
1294
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.None),
1304
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"),
1305
setAccessorStatements:={Generator.
IdentifierName
("a")}),
1316
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"),
1317
getAccessorStatements:={Generator.
IdentifierName
("a")}, setAccessorStatements:={Generator.
IdentifierName
("b")}),
1333
Generator.EventDeclaration("ev", Generator.
IdentifierName
("t")),
1337
Generator.EventDeclaration("ev", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Static),
1341
Generator.CustomEventDeclaration("ev", Generator.
IdentifierName
("t")),
1353
Dim params = {Generator.ParameterDeclaration("sender", Generator.TypeExpression(SpecialType.System_Object)), Generator.ParameterDeclaration("args", Generator.
IdentifierName
("EventArgs"))}
1355
Generator.CustomEventDeclaration("ev", Generator.
IdentifierName
("t"), parameters:=params),
1382
Generator.ConstructorDeclaration("c", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}),
1388
parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))},
1389
baseConstructorArguments:={Generator.
IdentifierName
("p")}),
1413
Generator.ClassDeclaration("c", baseType:=Generator.
IdentifierName
("x")),
1420
Generator.ClassDeclaration("c", interfaceTypes:={Generator.
IdentifierName
("x")}),
1427
Generator.ClassDeclaration("c", baseType:=Generator.
IdentifierName
("x"), interfaceTypes:={Generator.
IdentifierName
("y"), Generator.
IdentifierName
("z")}),
1440
Generator.ClassDeclaration("c", members:={Generator.FieldDeclaration("y", type:=Generator.
IdentifierName
("x"))}),
1466
Generator.StructDeclaration("s", interfaceTypes:={Generator.
IdentifierName
("x")}),
1473
Generator.StructDeclaration("s", interfaceTypes:={Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")}),
1485
Generator.StructDeclaration("s", members:={Generator.FieldDeclaration("y", Generator.
IdentifierName
("x"))}),
1492
Generator.StructDeclaration("s", members:={Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"))}),
1522
Generator.InterfaceDeclaration("i", interfaceTypes:={Generator.
IdentifierName
("a")}),
1529
Generator.InterfaceDeclaration("i", interfaceTypes:={Generator.
IdentifierName
("a"), Generator.
IdentifierName
("b")}),
1541
Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1549
Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}),
1557
Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.ReadOnly)}),
1565
Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.
IdentifierName
("x"))}, Generator.
IdentifierName
("t"), Accessibility.Public, DeclarationModifiers.Sealed)}),
1573
Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.
IdentifierName
("x"))}, Generator.
IdentifierName
("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}),
1612
Generator.EnumDeclaration("e", members:={Generator.
IdentifierName
("a"), Generator.EnumMember("b"), Generator.
IdentifierName
("c")}),
1635
Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}),
1639
Generator.DelegateDeclaration("d", returnType:=Generator.
IdentifierName
("t")),
1643
Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, returnType:=Generator.
IdentifierName
("t")),
1659
Generator.NamespaceImportDeclaration(Generator.
IdentifierName
("n")),
1755
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract),
1756
Generator.
IdentifierName
("i")),
1762
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.None),
1763
Generator.
IdentifierName
("i")),
1769
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1770
Generator.
IdentifierName
("i")),
1781
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.None),
1782
Generator.
IdentifierName
("i")),
1793
Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("a"))}, Generator.
IdentifierName
("t"), Accessibility.Internal, DeclarationModifiers.Abstract),
1794
Generator.
IdentifierName
("i")),
1805
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t")),
1806
Generator.
IdentifierName
("i"))
1809
Generator.AsPublicInterfaceImplementation(pim, Generator.
IdentifierName
("i2")),
1814
Generator.AsPublicInterfaceImplementation(pim, Generator.
IdentifierName
("i2"), "m2"),
1823
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1824
Generator.
IdentifierName
("i")),
1830
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract),
1837
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal, modifiers:=DeclarationModifiers.Abstract),
1838
Generator.
IdentifierName
("i")),
1849
Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("a"))}, Generator.
IdentifierName
("t"), Accessibility.Protected, DeclarationModifiers.Abstract),
1850
Generator.
IdentifierName
("i")),
1861
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t")),
1862
Generator.
IdentifierName
("i"))
1865
Generator.AsPrivateInterfaceImplementation(pim, Generator.
IdentifierName
("i2")),
1870
Generator.AsPrivateInterfaceImplementation(pim, Generator.
IdentifierName
("i2"), "m2"),
1959
"a", Generator.
IdentifierName
("b")),
1965
"a", Generator.
IdentifierName
("b")),
1973
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
1979
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2001
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")), "a"),
2007
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")), "a"),
2016
"a", Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2017
"x", Generator.
IdentifierName
("y")),
2059
"a", SpecialTypeConstraintKind.ReferenceType, Generator.
IdentifierName
("b"), Generator.
IdentifierName
("c")),
2068
"a", Generator.
IdentifierName
("x")),
2078
"a", Generator.
IdentifierName
("x")),
2088
"a", Generator.
IdentifierName
("x")),
2097
Generator.Attribute(Generator.
IdentifierName
("a")),
2113
Generator.Attribute("a", {Generator.
IdentifierName
("x")}),
2117
Generator.Attribute("a", {Generator.AttributeArgument(Generator.
IdentifierName
("x"))}),
2121
Generator.Attribute("a", {Generator.AttributeArgument("x", Generator.
IdentifierName
("y"))}),
2125
Generator.Attribute("a", {Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y")}),
2133
Generator.FieldDeclaration("y", Generator.
IdentifierName
("x")),
2141
Generator.FieldDeclaration("y", Generator.
IdentifierName
("x")),
2150
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract),
2157
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract),
2163
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.None),
2171
Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.None),
2178
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract),
2185
Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")),
2198
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract),
2205
Generator.IndexerDeclaration({Generator.ParameterDeclaration("z", Generator.
IdentifierName
("y"))}, Generator.
IdentifierName
("x")),
2226
Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")),
2262
Dim prop = Generator.PropertyDeclaration("P", Generator.
IdentifierName
("T"))
2575
Assert.Equal(DeclarationKind.Property, Generator.GetDeclarationKind(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))))
2576
Assert.Equal(DeclarationKind.Property, Generator.GetDeclarationKind(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2577
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"))))
2578
Assert.Equal(DeclarationKind.Indexer, Generator.GetDeclarationKind(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2579
Assert.Equal(DeclarationKind.Field, Generator.GetDeclarationKind(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))))
2581
Assert.Equal(DeclarationKind.Event, Generator.GetDeclarationKind(Generator.EventDeclaration("e", Generator.
IdentifierName
("t"))))
2582
Assert.Equal(DeclarationKind.CustomEvent, Generator.GetDeclarationKind(Generator.CustomEventDeclaration("ce", Generator.
IdentifierName
("t"))))
2585
Assert.Equal(DeclarationKind.Variable, Generator.GetDeclarationKind(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")))
2600
Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2601
Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))))
2602
Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"))))
2603
Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2604
Assert.Equal("f", Generator.GetName(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))))
2606
Assert.Equal("ef", Generator.GetName(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"))))
2607
Assert.Equal("ep", Generator.GetName(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"))))
2610
Assert.Equal("loc", Generator.GetName(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")))
2625
Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.
IdentifierName
("t")), "p")))
2626
Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract), "p")))
2627
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t")), "X")))
2628
Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract), "X")))
2629
Assert.Equal("f", Generator.GetName(Generator.WithName(Generator.FieldDeclaration("x", Generator.
IdentifierName
("t")), "f")))
2631
Assert.Equal("ef", Generator.GetName(Generator.WithName(Generator.EventDeclaration("x", Generator.
IdentifierName
("t")), "ef")))
2632
Assert.Equal("ep", Generator.GetName(Generator.WithName(Generator.CustomEventDeclaration("x", Generator.
IdentifierName
("t")), "ep")))
2635
Assert.Equal("loc", Generator.GetName(Generator.WithName(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "x"), "loc")))
2649
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal)))
2650
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal)))
2651
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal)))
2653
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal)))
2654
Assert.Equal(Accessibility.Internal, Generator.GetAccessibility(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal)))
2657
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")))
2677
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2678
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2679
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2681
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2682
Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), accessibility:=Accessibility.Internal), Accessibility.Private)))
2685
Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), Accessibility.Private)))
2704
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2705
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Abstract)))
2706
Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Const)))
2707
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Static)))
2708
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"), modifiers:=DeclarationModifiers.Static)))
2712
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc")))
2726
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), DeclarationModifiers.Abstract)))
2727
Assert.Equal(DeclarationModifiers.Abstract, Generator.GetModifiers(Generator.WithModifiers(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.
IdentifierName
("t")), DeclarationModifiers.Abstract)))
2728
Assert.Equal(DeclarationModifiers.Const, Generator.GetModifiers(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t")), DeclarationModifiers.Const)))
2729
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t")), DeclarationModifiers.Static)))
2730
Assert.Equal(DeclarationModifiers.Static, Generator.GetModifiers(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t")), DeclarationModifiers.Static)))
2734
Assert.Equal(DeclarationModifiers.None, Generator.GetModifiers(Generator.WithModifiers(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), DeclarationModifiers.Abstract)))
2764
Assert.Equal("t", Generator.GetType(Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("t"))).ToString())
2767
Assert.Equal("t", Generator.GetType(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"))).ToString())
2768
Assert.Equal("t", Generator.GetType(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).ToString())
2769
Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("pt"))}, Generator.
IdentifierName
("t"))).ToString())
2770
Assert.Equal("t", Generator.GetType(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))).ToString())
2772
Assert.Equal("t", Generator.GetType(Generator.EventDeclaration("ef", Generator.
IdentifierName
("t"))).ToString())
2773
Assert.Equal("t", Generator.GetType(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("t"))).ToString())
2775
Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType:=Generator.
IdentifierName
("t"))).ToString())
2778
Assert.Equal("t", Generator.GetType(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "v")).ToString())
2781
Assert.Null(Generator.GetType(Generator.
IdentifierName
("x")))
2786
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2787
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m"), Generator.
IdentifierName
("t"))).ToString())
2788
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.FieldDeclaration("f", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2789
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2790
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("pt"))}, Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2791
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2793
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t", returnType:=Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2794
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.
IdentifierName
("t"))).ToString())
2796
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.EventDeclaration("ef", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2797
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.CustomEventDeclaration("ep", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("t"))).ToString())
2799
Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("x"), "v"), Generator.
IdentifierName
("t"))).ToString())
2800
Assert.Null(Generator.GetType(Generator.WithType(Generator.ClassDeclaration("c"), Generator.
IdentifierName
("t"))))
2801
Assert.Null(Generator.GetType(Generator.WithType(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("t"))))
2807
Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x")), Nothing),
2812
Generator.WithType(Generator.MethodDeclaration("m"), Generator.
IdentifierName
("x")),
2817
Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.
IdentifierName
("x"), modifiers:=DeclarationModifiers.Abstract), Nothing),
2821
Generator.WithType(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract), Generator.
IdentifierName
("x")),
2825
Generator.WithType(Generator.DelegateDeclaration("d", returnType:=Generator.
IdentifierName
("x")), Nothing),
2829
Generator.WithType(Generator.DelegateDeclaration("d"), Generator.
IdentifierName
("x")),
2837
Assert.Equal(1, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2838
Assert.Equal(2, Generator.GetParameters(Generator.MethodDeclaration("m", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))})).Count)
2841
Assert.Equal(1, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2842
Assert.Equal(2, Generator.GetParameters(Generator.ConstructorDeclaration(parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))})).Count)
2844
Assert.Equal(0, Generator.GetParameters(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).Count)
2846
Assert.Equal(1, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, Generator.
IdentifierName
("t"))).Count)
2847
Assert.Equal(2, Generator.GetParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2"))}, Generator.
IdentifierName
("t"))).Count)
2849
Assert.Equal(0, Generator.GetParameters(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("expr"))).Count)
2850
Assert.Equal(1, Generator.GetParameters(Generator.ValueReturningLambdaExpression("p1", Generator.
IdentifierName
("expr"))).Count)
2852
Assert.Equal(0, Generator.GetParameters(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("expr"))).Count)
2853
Assert.Equal(1, Generator.GetParameters(Generator.VoidReturningLambdaExpression("p1", Generator.
IdentifierName
("expr"))).Count)
2856
Assert.Equal(1, Generator.GetParameters(Generator.DelegateDeclaration("d", parameters:={Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2859
Assert.Equal(0, Generator.GetParameters(Generator.
IdentifierName
("x")).Count)
2864
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.MethodDeclaration("m"), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2865
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ConstructorDeclaration(), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2866
Assert.Equal(3, Generator.GetParameters(Generator.AddParameters(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))}, Generator.
IdentifierName
("t")), {Generator.ParameterDeclaration("p2", Generator.
IdentifierName
("t2")), Generator.ParameterDeclaration("p3", Generator.
IdentifierName
("t3"))})).Count)
2868
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("expr")), {Generator.LambdaParameter("p")})).Count)
2869
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("expr")), {Generator.LambdaParameter("p")})).Count)
2871
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.DelegateDeclaration("d"), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2873
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.ClassDeclaration("c"), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2874
Assert.Equal(0, Generator.GetParameters(Generator.AddParameters(Generator.
IdentifierName
("x"), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2875
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), {Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))})).Count)
2881
Assert.Equal("x", Generator.GetExpression(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t"), initializer:=Generator.
IdentifierName
("x"))).ToString())
2882
Assert.Equal("x", Generator.GetExpression(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"), initializer:=Generator.
IdentifierName
("x"))).ToString())
2883
Assert.Equal("x", Generator.GetExpression(Generator.LocalDeclarationStatement("loc", initializer:=Generator.
IdentifierName
("x"))).ToString())
2886
Assert.Null(Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", {Generator.
IdentifierName
("x")})))
2887
Assert.Equal(1, Generator.GetStatements(Generator.ValueReturningLambdaExpression("p", {Generator.
IdentifierName
("x")})).Count)
2888
Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("x"))).ToString())
2889
Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("x"))).ToString())
2890
Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", Generator.
IdentifierName
("x"))).ToString())
2891
Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression("p", Generator.
IdentifierName
("x"))).ToString())
2893
Assert.Null(Generator.GetExpression(Generator.
IdentifierName
("e")))
2899
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.FieldDeclaration("f", Generator.
IdentifierName
("t")), Generator.
IdentifierName
("x"))).ToString())
2900
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t")), Generator.
IdentifierName
("x"))).ToString())
2901
Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.LocalDeclarationStatement(Generator.
IdentifierName
("t"), "loc"), Generator.
IdentifierName
("x"))).ToString())
2904
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", {Generator.
IdentifierName
("x")}), Generator.
IdentifierName
("y"))).ToString())
2905
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", {Generator.
IdentifierName
("x")}), Generator.
IdentifierName
("y"))).ToString())
2906
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.
IdentifierName
("x")}), Generator.
IdentifierName
("y"))).ToString())
2907
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.
IdentifierName
("x")}), Generator.
IdentifierName
("y"))).ToString())
2908
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString())
2909
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString())
2910
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString())
2911
Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("x")), Generator.
IdentifierName
("y"))).ToString())
2914
Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.
IdentifierName
("s")}), Generator.
IdentifierName
("e")),
2917
Assert.Null(Generator.GetExpression(Generator.WithExpression(Generator.
IdentifierName
("e"), Generator.
IdentifierName
("x"))))
2924
Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.
IdentifierName
("s")}), Generator.
IdentifierName
("e")),
2929
Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.
IdentifierName
("s")}), Generator.
IdentifierName
("e")),
2934
Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("e")), Nothing),
2940
Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("e")), Nothing),
2946
Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.
IdentifierName
("s")}), Nothing),
2953
Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.
IdentifierName
("s")}), Nothing),
2958
Assert.Null(Generator.GetExpression(Generator.WithExpression(Generator.
IdentifierName
("e"), Generator.
IdentifierName
("x"))))
2963
Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))}
2971
Assert.Equal(0, Generator.GetStatements(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("e"))).Count)
2975
Assert.Equal(0, Generator.GetStatements(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("e"))).Count)
2979
Assert.Equal(0, Generator.GetStatements(Generator.
IdentifierName
("x")).Count)
2984
Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))}
2992
Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("e")), stmts)).Count)
2993
Assert.Equal(2, Generator.GetStatements(Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("e")), stmts)).Count)
2995
Assert.Equal(0, Generator.GetStatements(Generator.WithStatements(Generator.
IdentifierName
("x"), stmts)).Count)
3000
Dim stmts = {Generator.ExpressionStatement(Generator.
IdentifierName
("x")), Generator.ExpressionStatement(Generator.
IdentifierName
("y"))}
3017
Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("e")), stmts),
3024
Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("e")), stmts),
3041
Generator.WithStatements(Generator.VoidReturningLambdaExpression(Generator.
IdentifierName
("e")), {}),
3046
Generator.WithStatements(Generator.ValueReturningLambdaExpression(Generator.
IdentifierName
("e")), {}),
3054
Dim prop = _g.PropertyDeclaration("p", _g.
IdentifierName
("T"))
3100
Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))}
3102
Dim p = Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))
3105
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).Count)
3106
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), getAccessorStatements:=stmts)).Count)
3108
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t"))).Count)
3109
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t"), getAccessorStatements:=stmts)).Count)
3111
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.
IdentifierName
("x")).Count)
3114
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"))).Count)
3115
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t"), setAccessorStatements:=stmts)).Count)
3117
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t"))).Count)
3118
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t"), setAccessorStatements:=stmts)).Count)
3120
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.
IdentifierName
("x")).Count)
3125
Dim stmts = {Generator.ExpressionStatement(Generator.AssignmentStatement(Generator.
IdentifierName
("x"), Generator.
IdentifierName
("y"))), Generator.ExpressionStatement(Generator.InvocationExpression(Generator.
IdentifierName
("fn"), Generator.
IdentifierName
("arg")))}
3127
Dim p = Generator.ParameterDeclaration("p", Generator.
IdentifierName
("t"))
3130
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), stmts)).Count)
3131
Assert.Equal(2, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t")), stmts)).Count)
3132
Assert.Equal(0, Generator.GetGetAccessorStatements(Generator.WithGetAccessorStatements(Generator.
IdentifierName
("x"), stmts)).Count)
3135
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.PropertyDeclaration("p", Generator.
IdentifierName
("t")), stmts)).Count)
3136
Assert.Equal(2, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.IndexerDeclaration({p}, Generator.
IdentifierName
("t")), stmts)).Count)
3137
Assert.Equal(0, Generator.GetSetAccessorStatements(Generator.WithSetAccessorStatements(Generator.
IdentifierName
("x"), stmts)).Count)
3302
Generator.AddBaseType(classC, Generator.
IdentifierName
("T")),
3309
Generator.AddBaseType(classCB, Generator.
IdentifierName
("T")),
3316
Generator.AddBaseType(structS, Generator.
IdentifierName
("T")),
3321
Generator.AddBaseType(ifaceI, Generator.
IdentifierName
("T")),
3354
Generator.AddInterfaceType(classC, Generator.
IdentifierName
("T")),
3361
Generator.AddInterfaceType(classCB, Generator.
IdentifierName
("T")),
3369
Generator.AddInterfaceType(classCI, Generator.
IdentifierName
("T")),
3376
Generator.AddInterfaceType(structS, Generator.
IdentifierName
("T")),
3383
Generator.AddInterfaceType(ifaceI, Generator.
IdentifierName
("T")),
3398
Generator.AddInterfaceType(classC, Generator.
IdentifierName
("X")), "
3407
Generator.AddInterfaceType(interfaceI, Generator.
IdentifierName
("X")), "
3417
Generator.AddInterfaceType(classCX, Generator.
IdentifierName
("Y")), "
3428
Generator.AddInterfaceType(interfaceIX, Generator.
IdentifierName
("Y")), "
3440
Generator.AddInterfaceType(classCXY, Generator.
IdentifierName
("Z")), "
3453
Generator.AddInterfaceType(interfaceIXY, Generator.
IdentifierName
("Z")), "
3505
Dim xTypedT = Generator.WithType(declX, Generator.
IdentifierName
("T"))
3515
Dim xInitialized = Generator.WithExpression(declX, Generator.
IdentifierName
("e"))
3553
Generator.InsertMembers(declC, 0, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3563
Generator.InsertMembers(declC, 1, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3575
Generator.InsertMembers(declC, 2, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3587
Generator.InsertMembers(declC, 3, Generator.FieldDeclaration("A", Generator.
IdentifierName
("T"))),
3597
Generator.ReplaceNode(declC, declX, Generator.WithType(declX, Generator.
IdentifierName
("T"))),
3607
Generator.ReplaceNode(declC, declX, Generator.WithExpression(declX, Generator.
IdentifierName
("e"))),
3633
Generator.ReplaceNode(declC, declY, Generator.WithType(declY, Generator.
IdentifierName
("T"))),
3645
Generator.ReplaceNode(declC, declZ, Generator.WithType(declZ, Generator.
IdentifierName
("T"))),
3747
Dim xWithArg = Generator.AddAttributeArguments(declX, {Generator.AttributeArgument(Generator.
IdentifierName
("e"))})
3796
Generator.ReplaceNode(declC, declX, Generator.InsertAttributeArguments(declX, 0, {Generator.AttributeArgument(Generator.
IdentifierName
("e"))})),
Microsoft.CodeAnalysis.Workspaces (43)
Editing\SyntaxGenerator.cs (3)
1906
name =
IdentifierName
(part);
1910
name = QualifiedName(name,
IdentifierName
(part)).WithAdditionalAnnotations(Simplifier.Annotation);
2182
=> MemberAccessExpression(expression,
IdentifierName
(memberName));
Shared\Extensions\SyntaxGeneratorExtensions.cs (10)
80
codeFactory.
IdentifierName
("value")));
97
codeFactory.
IdentifierName
(getName)),
106
codeFactory.
IdentifierName
(setName)),
116
codeFactory.
IdentifierName
(overriddenProperty.Name)), codeFactory.CreateArguments(overriddenProperty.Parameters))));
123
codeFactory.
IdentifierName
(overriddenProperty.Name)), codeFactory.CreateArguments(overriddenProperty.Parameters)),
124
codeFactory.
IdentifierName
("value")));
135
codeFactory.
IdentifierName
(overriddenProperty.Name))));
141
codeFactory.
IdentifierName
(overriddenProperty.Name)),
142
codeFactory.
IdentifierName
("value")));
264
? codeFactory.
IdentifierName
(overriddenMethod.Name)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
147
generator.
IdentifierName
(field.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (17)
48
: codeDefinitionFactory.QualifiedName(codeDefinitionFactory.
IdentifierName
(nameof(System)), codeDefinitionFactory.
IdentifierName
(nameof(NotImplementedException)));
70
return factory.Argument(parameter.RefKind, factory.
IdentifierName
(parameter.Name));
84
return factory.MemberAccessExpression(typeExpression, factory.
IdentifierName
(DefaultName));
109
: generator.
IdentifierName
(method.Name));
120
var name = generator.
IdentifierName
(throughMember.Name);
172
generator.
IdentifierName
(explicitlyImplementedProperty.Name));
187
: factory.
IdentifierName
(classOrStructType.Name);
201
throughExpression, generator.
IdentifierName
(property.Name));
225
throughExpression, generator.
IdentifierName
(property.Name));
233
expression = generator.AssignmentStatement(expression, generator.
IdentifierName
("value"));
339
factory.
IdentifierName
(parameterName),
351
var fieldAccess = factory.MemberAccessExpression(factory.ThisExpression(), factory.
IdentifierName
(fieldName))
402
factory.
IdentifierName
(parameter.Name))));
412
factory.
IdentifierName
(parameter.Name),
425
factory.
IdentifierName
(parameter.Name))).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation);
443
var identifier = factory.
IdentifierName
(identifierName);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (8)
136
var localNameExpression = factory.
IdentifierName
(localName);
137
var objNameExpression = factory.
IdentifierName
(ObjName);
201
factory.
IdentifierName
(EqualsName)),
231
var symbolNameExpression = factory.
IdentifierName
(member.Name);
265
factory.
IdentifierName
(EqualsName)),
281
var otherNameExpression = factory.
IdentifierName
(OtherName);
304
factory.
IdentifierName
(EqualsName)),
356
factory.
IdentifierName
(nameof(ReferenceEquals)),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (4)
59
var localReference = factory.
IdentifierName
(hashName);
139
var hashCodeNameExpression = factory.
IdentifierName
(HashCodeName);
224
var getHashCodeNameExpression = factory.
IdentifierName
(GetHashCodeName);
226
factory.
IdentifierName
(member.Name)).WithAdditionalAnnotations(Simplification.Simplifier.Annotation);
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\AddMarshalAsToElementFixer.cs (1)
56
gen.
IdentifierName
(unmanagedTypeName.Trim()))));
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
86
gen.AttributeArgument("StringMarshalling", gen.MemberAccessExpression(gen.DottedName(TypeNames.StringMarshalling), gen.
IdentifierName
(nameof(StringMarshalling.Custom)))),
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
268
generator.
IdentifierName
(unmanagedTypeMemberIdentifier))));
297
generator.
IdentifierName
(nameof(UnmanagedType.Error)))));
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\ConvertToLibraryImportFixer.cs (2)
461
generator.
IdentifierName
(nameof(StringMarshalling.Utf16)))));
470
generator.
IdentifierName
(nameof(StringMarshalling.Custom)))));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
268
generator.
IdentifierName
(unmanagedTypeMemberIdentifier))));
297
generator.
IdentifierName
(nameof(UnmanagedType.Error)))));
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
160
SyntaxNode replacement = generator.InvocationExpression(generator.
IdentifierName
(methodName));