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