2 overrides of LambdaParameter
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3615
public override SyntaxNode
LambdaParameter
(string identifier, SyntaxNode? type = null)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
547
Public Overrides Function
LambdaParameter
(identifier As String, Optional type As SyntaxNode = Nothing) As SyntaxNode
37 references to LambdaParameter
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (16)
CodeGeneration\SyntaxGeneratorTests.cs (16)
715
Generator.ValueReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y") }, Generator.IdentifierName("z")),
727
Generator.VoidReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y") }, Generator.IdentifierName("z")),
739
Generator.ValueReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y") }, [Generator.ReturnStatement(Generator.IdentifierName("z"))]),
751
Generator.VoidReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y") }, [Generator.IdentifierName("z")]),
759
Generator.ValueReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x", Generator.IdentifierName("y")) }, Generator.IdentifierName("z")),
763
Generator.ValueReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x", Generator.IdentifierName("y")), Generator.
LambdaParameter
("a", Generator.IdentifierName("b")) }, Generator.IdentifierName("z")),
767
Generator.VoidReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x", Generator.IdentifierName("y")) }, Generator.IdentifierName("z")),
771
Generator.VoidReturningLambdaExpression(new[] { Generator.
LambdaParameter
("x", Generator.IdentifierName("y")), Generator.
LambdaParameter
("a", Generator.IdentifierName("b")) }, Generator.IdentifierName("z")),
3267
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr")), [Generator.
LambdaParameter
("p")])).Count);
3268
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr")), [Generator.
LambdaParameter
("p")])).Count);
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (16)
CodeGeneration\SyntaxGeneratorTests.vb (16)
718
Generator.ValueReturningLambdaExpression({Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y")}, Generator.IdentifierName("z")),
730
Generator.VoidReturningLambdaExpression({Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y")}, Generator.IdentifierName("z")),
744
Generator.ValueReturningLambdaExpression({Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y")}, {Generator.ReturnStatement(Generator.IdentifierName("z"))}),
762
Generator.VoidReturningLambdaExpression({Generator.
LambdaParameter
("x"), Generator.
LambdaParameter
("y")}, {Generator.IdentifierName("z")}),
774
Generator.ValueReturningLambdaExpression({Generator.
LambdaParameter
("x", Generator.IdentifierName("y"))}, Generator.IdentifierName("z")),
778
Generator.ValueReturningLambdaExpression({Generator.
LambdaParameter
("x", Generator.IdentifierName("y")), Generator.
LambdaParameter
("a", Generator.IdentifierName("b"))}, Generator.IdentifierName("z")),
782
Generator.VoidReturningLambdaExpression({Generator.
LambdaParameter
("x", Generator.IdentifierName("y"))}, Generator.IdentifierName("z")),
786
Generator.VoidReturningLambdaExpression({Generator.
LambdaParameter
("x", Generator.IdentifierName("y")), Generator.
LambdaParameter
("a", Generator.IdentifierName("b"))}, Generator.IdentifierName("z")),
2868
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.
LambdaParameter
("p")})).Count)
2869
Assert.Equal(1, Generator.GetParameters(Generator.AddParameters(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("expr")), {Generator.
LambdaParameter
("p")})).Count)
Microsoft.CodeAnalysis.Workspaces (5)
Editing\SyntaxGenerator.cs (5)
2332
=> ValueReturningLambdaExpression(new[] {
LambdaParameter
(parameterName) }, expression);
2338
=> VoidReturningLambdaExpression(new[] {
LambdaParameter
(parameterName) }, expression);
2344
=> ValueReturningLambdaExpression(new[] {
LambdaParameter
(parameterName) }, statements);
2350
=> VoidReturningLambdaExpression(new[] {
LambdaParameter
(parameterName) }, statements);
2385
=>
LambdaParameter
(identifier, TypeExpression(type));