133 references to SimpleLambdaExpressionSyntax
Microsoft.AspNetCore.App.Analyzers (2)
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (2)
369
var
lambdaExpression = arguments?.Expression as
SimpleLambdaExpressionSyntax
;
Microsoft.AspNetCore.App.CodeFixes (1)
Authorization\AddAuthorizationBuilderFixer.cs (1)
62
&& arguments[0].Expression is
SimpleLambdaExpressionSyntax
lambda)
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder_Expressions.cs (1)
10993
resultIsUsed = (((
SimpleLambdaExpressionSyntax
)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda, Compilation);
Binder\Binder_Lambda.cs (2)
71
var
simple = (
SimpleLambdaExpressionSyntax
)syntax;
Binder\ExpressionVariableFinder.cs (1)
290
public override void VisitSimpleLambdaExpression(
SimpleLambdaExpressionSyntax
node) { }
Binder\LocalBinderFactory.cs (1)
374
public override void VisitSimpleLambdaExpression(
SimpleLambdaExpressionSyntax
node)
BoundTree\UnboundLambda.cs (1)
1507
return ((
SimpleLambdaExpressionSyntax
)syntax).Parameter.Identifier.GetLocation();
Compilation\MemberSemanticModel.cs (2)
834
var
simpleLambda = parameter.Parent as
SimpleLambdaExpressionSyntax
;
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
613
var
lambdaSyntax = (
SimpleLambdaExpressionSyntax
)node.Syntax;
Syntax\LookupPosition.cs (2)
483
SimpleLambdaExpressionSyntax
simple = (
SimpleLambdaExpressionSyntax
)lambdaExpressionOrQueryNode;
Syntax\SimpleLambdaExpressionSyntax.cs (9)
11
public new
SimpleLambdaExpressionSyntax
WithBody(CSharpSyntaxNode body)
16
public
SimpleLambdaExpressionSyntax
Update(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, CSharpSyntaxNode body)
27
public new
SimpleLambdaExpressionSyntax
WithAsyncKeyword(SyntaxToken asyncKeyword)
30
public
SimpleLambdaExpressionSyntax
Update(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
33
public
SimpleLambdaExpressionSyntax
Update(SyntaxTokenList modifiers, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
42
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
45
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(ParameterSyntax parameter, BlockSyntax? block, ExpressionSyntax? expressionBody)
48
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(SyntaxTokenList modifiers, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
51
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(SyntaxTokenList modifiers, ParameterSyntax parameter, BlockSyntax? block, ExpressionSyntax? expressionBody)
Syntax\SyntaxFactory.cs (2)
2743
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(ParameterSyntax parameter, CSharpSyntaxNode body)
2748
public static
SimpleLambdaExpressionSyntax
SimpleLambdaExpression(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, CSharpSyntaxNode body)
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
295
SimpleLambdaExpressionSyntax
simpleLambda => [simpleLambda.Parameter],
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
154
case
SimpleLambdaExpressionSyntax
simpleLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
237
var
originalSimpleLambda = (
SimpleLambdaExpressionSyntax
)originalLambda;
238
var
replacedSimpleLambda = (
SimpleLambdaExpressionSyntax
)replacedLambda;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
40
case
SimpleLambdaExpressionSyntax
lambda: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
58
SimpleLambdaExpressionSyntax
lambda => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
27
internal static SyntaxNode WithoutAsyncModifier(
SimpleLambdaExpressionSyntax
lambda)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
273
case
SimpleLambdaExpressionSyntax
simpleLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1772
else if (lambdaExpression is
SimpleLambdaExpressionSyntax
simpleLambda)
1790
SimpleLambdaExpressionSyntax
lambdaExpression)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\SimpleLambdaExpressionStructureTests.cs (1)
15
public class SimpleLambdaExpressionStructureTests : AbstractCSharpSyntaxNodeStructureTests<
SimpleLambdaExpressionSyntax
>
SymbolKey\SymbolKeyTestBase.cs (1)
372
IEnumerable<ExpressionSyntax> exprs = body.DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>();
Microsoft.CodeAnalysis.CSharp.Features (18)
ChangeSignature\CSharpChangeSignatureService.cs (1)
366
if (updatedNode is
SimpleLambdaExpressionSyntax
lambda)
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
49
SimpleLambdaExpressionSyntax
simpleLambda => simpleLambda.Parameter.SpanStart,
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1872
return ((
SimpleLambdaExpressionSyntax
)node).Parameter.Span;
1956
return ((
SimpleLambdaExpressionSyntax
)lambda).Parameter.Identifier.Span;
EditAndContinue\SyntaxComparer.cs (2)
977
var
simple = (
SimpleLambdaExpressionSyntax
)nestedFunction;
ExtractMethod\CSharpSelectionResult.cs (1)
95
SimpleLambdaExpressionSyntax
or
ExtractMethod\CSharpSelectionResult.StatementResult.cs (2)
37
SimpleLambdaExpressionSyntax
lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword,
57
SimpleLambdaExpressionSyntax
or
ExtractMethod\Extensions.cs (1)
47
case
SimpleLambdaExpressionSyntax
s: return s.Body as BlockSyntax;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
295
SimpleLambdaExpressionSyntax
simpleLambda => [simpleLambda.Parameter],
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
40
case
SimpleLambdaExpressionSyntax
lambda: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
58
SimpleLambdaExpressionSyntax
lambda => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
27
internal static SyntaxNode WithoutAsyncModifier(
SimpleLambdaExpressionSyntax
lambda)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
273
case
SimpleLambdaExpressionSyntax
simpleLambda:
Structure\CSharpBlockStructureProvider.cs (1)
48
builder.Add<
SimpleLambdaExpressionSyntax
, SimpleLambdaExpressionStructureProvider>();
Structure\Providers\SimpleLambdaExpressionStructureProvider.cs (2)
12
internal class SimpleLambdaExpressionStructureProvider : AbstractSyntaxNodeStructureProvider<
SimpleLambdaExpressionSyntax
>
16
SimpleLambdaExpressionSyntax
lambdaExpression,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\AnonymousFunctionTests.cs (4)
984
var
simpleLambdaSyntax = root.DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single();
1018
var
simpleLambdaSyntax = root.DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single();
Semantics\BindingAsyncTests.cs (2)
58
var
simple = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single();
Semantics\BindingTests.cs (2)
3939
var
lambda = tree.GetRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single(s => s.Parameter.Identifier.Text == "x");
Semantics\RefFieldTests.cs (1)
11389
var lambdas = tree.GetRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<LambdaSymbol>()).ToArray();
Semantics\SuppressAccessibilityChecksTests.cs (1)
123
var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single().Body;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\GetSemanticInfoTests.cs (2)
2356
var
lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single();
Compilation\SemanticModelAPITests.cs (1)
3127
var syntax = tree.GetRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().Single().
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (3)
4415
var
lambda = (
SimpleLambdaExpressionSyntax
)tree.GetCompilationUnitRoot().DescendantNodes().First(x => x is
SimpleLambdaExpressionSyntax
);
Compilation\SemanticModelGetSemanticInfoTests.cs (2)
5690
var semanticInfo = GetSemanticInfoForTest<
SimpleLambdaExpressionSyntax
>(sourceCode);
6997
var semanticInfo = GetSemanticInfoForTest<
SimpleLambdaExpressionSyntax
>(code);
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
720
CheckLambdaDeclaringSyntax<
SimpleLambdaExpressionSyntax
>(comp, tree, "/*2*/");
Symbols\Source\EventTests.cs (4)
435
var
lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().First();
481
var
lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().First();
Symbols\Source\NullablePublicAPITests.cs (2)
4047
var
lambda = root.DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().First();
Symbols\SymbolEqualityTests.cs (2)
935
var
lambdaSyntax = root.DescendantNodes().OfType<
SimpleLambdaExpressionSyntax
>().First();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Diagnostics\LineSpanDirectiveTests.cs (1)
453
case
SimpleLambdaExpressionSyntax
lambda:
Generated\Syntax.Test.xml.Generated.cs (5)
10394
private static
SimpleLambdaExpressionSyntax
GenerateSimpleLambdaExpression()
11605
var
node = GenerateSimpleLambdaExpression();
11613
var
newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithParameter(node.Parameter).WithArrowToken(node.ArrowToken).WithBlock(node.Block).WithExpressionBody(node.ExpressionBody);
15529
var
oldNode = GenerateSimpleLambdaExpression();
15545
var
oldNode = GenerateSimpleLambdaExpression();
Parsing\ExpressionParsingTests.cs (6)
2037
var
lambda = (
SimpleLambdaExpressionSyntax
)expr;
2055
var
lambda = (
SimpleLambdaExpressionSyntax
)expr;
2073
var
lambda = (
SimpleLambdaExpressionSyntax
)expr;
Syntax\SyntaxNodeTests.cs (8)
3850
var
expression = (
SimpleLambdaExpressionSyntax
)SyntaxFactory.ParseExpression(text);
3877
var
expression = (
SimpleLambdaExpressionSyntax
)SyntaxFactory.ParseExpression(text);
3904
var
expression = (
SimpleLambdaExpressionSyntax
)SyntaxFactory.ParseExpression(text);
3931
var
expression = (
SimpleLambdaExpressionSyntax
)SyntaxFactory.ParseExpression(text);
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
CodeGeneration\CSharpSyntaxGenerator.cs (7)
2149
: declaration is
SimpleLambdaExpressionSyntax
simpleLambda
2249
var
lambda = (
SimpleLambdaExpressionSyntax
)declaration;
2279
return ((
SimpleLambdaExpressionSyntax
)declaration).Body as ExpressionSyntax;
2335
return ((
SimpleLambdaExpressionSyntax
)declaration).WithBody((CSharpSyntaxNode)expr ?? CreateBlock());
2490
SyntaxKind.SimpleLambdaExpression => (((
SimpleLambdaExpressionSyntax
)declaration).Body as BlockSyntax)?.Statements,
2525
return ((
SimpleLambdaExpressionSyntax
)declaration).WithBody(body);
Recommendations\CSharpRecommendationServiceRunner.cs (1)
42
SimpleLambdaExpressionSyntax
=> 1,
Rename\CSharpRenameRewriterLanguageService.cs (3)
161
var lambdas = node.GetAncestorsOrThis(n => n is
SimpleLambdaExpressionSyntax
or ParenthesizedLambdaExpressionSyntax);
298
var expandParameter = !originalNode.GetAncestorsOrThis(n => n is
SimpleLambdaExpressionSyntax
or ParenthesizedLambdaExpressionSyntax).Any();
1161
? token.GetAncestors(n => n is
SimpleLambdaExpressionSyntax
or ParenthesizedLambdaExpressionSyntax).FirstOrDefault()
Rename\LocalConflictVisitor.cs (1)
112
public override void VisitSimpleLambdaExpression(
SimpleLambdaExpressionSyntax
node)
Simplification\CSharpSimplificationService.Expander.cs (2)
208
public override SyntaxNode VisitSimpleLambdaExpression(
SimpleLambdaExpressionSyntax
node)
212
if (newNode is
SimpleLambdaExpressionSyntax
simpleLambda)
Simplification\Reducers\CSharpEscapingReducer.cs (2)
55
var enclosingLambdaExpression = parent.GetAncestorsOrThis(n => (n is
SimpleLambdaExpressionSyntax
or ParenthesizedLambdaExpressionSyntax)).FirstOrDefault();
58
if (enclosingLambdaExpression is
SimpleLambdaExpressionSyntax
simpleLambda)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
98
var
newSimpleLambda = SyntaxFactory.SimpleLambdaExpression(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
154
case
SimpleLambdaExpressionSyntax
simpleLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
237
var
originalSimpleLambda = (
SimpleLambdaExpressionSyntax
)originalLambda;
238
var
replacedSimpleLambda = (
SimpleLambdaExpressionSyntax
)replacedLambda;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1772
else if (lambdaExpression is
SimpleLambdaExpressionSyntax
simpleLambda)
1790
SimpleLambdaExpressionSyntax
lambdaExpression)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
710
VerifySyntax<
SimpleLambdaExpressionSyntax
>(
722
VerifySyntax<
SimpleLambdaExpressionSyntax
>(
734
VerifySyntax<
SimpleLambdaExpressionSyntax
>(
746
VerifySyntax<
SimpleLambdaExpressionSyntax
>(