271 references to LambdaExpressionSyntax
ILLink.CodeFixProvider (1)
BaseAttributeCodeFixProvider.cs (1)
98 case LambdaExpressionSyntax:
Microsoft.AspNetCore.App.CodeFixes (1)
WebApplicationBuilderFixer.cs (1)
114|| initArgument.Expression is not LambdaExpressionSyntax lambdaExpr)
Microsoft.CodeAnalysis.CSharp (17)
Binder\Binder_Lambda.cs (1)
58if (syntax is LambdaExpressionSyntax lambdaSyntax)
Binder\Binder_Statements.cs (2)
1997LambdaExpressionSyntax lambda => lambda.ArrowToken.GetLocation(), 3403case LambdaExpressionSyntax lambdaSyntax:
Binder\LocalBinderFactory.cs (1)
379private void VisitLambdaExpression(LambdaExpressionSyntax node)
FlowAnalysis\NullableWalker.cs (1)
8746if (lambda.Syntax is LambdaExpressionSyntax lambdaSyntax)
Parser\LanguageParser.cs (5)
13297private LambdaExpressionSyntax TryParseLambdaExpression() 13300var result = ParseLambdaExpression(); 13312private LambdaExpressionSyntax ParseLambdaExpression() 13320var result = parseLambdaExpressionWorker(); 13327LambdaExpressionSyntax parseLambdaExpressionWorker()
SourceGeneration\CSharpSyntaxHelper.cs (1)
56=> node is LambdaExpressionSyntax;
Symbols\Source\LambdaSymbol.cs (2)
238LambdaExpressionSyntax syntax => syntax.ArrowToken.GetLocation(), 275return _syntax is LambdaExpressionSyntax lambdaSyntax ?
Syntax\LambdaExpressionSyntax.cs (3)
12public new LambdaExpressionSyntax WithBody(CSharpSyntaxNode body) 17public new LambdaExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 18=> (LambdaExpressionSyntax)WithAsyncKeywordCore(asyncKeyword);
Syntax\SyntaxNodeExtensions.cs (1)
121return ((LambdaExpressionSyntax)parent).Body == expression;
Microsoft.CodeAnalysis.CSharp.CodeStyle (20)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
308if (current.Parent is LambdaExpressionSyntax lambda &&
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (5)
40LambdaExpressionSyntax lambda, 60LambdaExpressionSyntax whereLambda, 91[NotNullWhen(true)] out LambdaExpressionSyntax? whereLambda, 110ArgumentList.Arguments: [{ Expression: LambdaExpressionSyntax whereLambda1 }], 150Expression: LambdaExpressionSyntax
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (4)
62var declaration = (LambdaExpressionSyntax)context.Node; 72LambdaExpressionSyntax declaration, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 103private static Location GetDiagnosticLocation(LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (4)
23LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 68SemanticModel semanticModel, ExpressionBodyPreference preference, LambdaExpressionSyntax declaration, LanguageVersion languageVersion, CancellationToken cancellationToken) 89internal static ExpressionSyntax? GetBodyAsExpression(LambdaExpressionSyntax declaration) 110LambdaExpressionSyntax declaration,
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
128LambdaExpressionSyntax => true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
927LambdaExpressionSyntax lambda => GetTargetTypeForLambdaExpression(lambda, topExpression), 1009ITypeSymbol? GetTargetTypeForLambdaExpression(LambdaExpressionSyntax lambda, ExpressionSyntax expression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
166LambdaExpressionSyntax lambdaExpressionSyntax => lambdaExpressionSyntax.AttributeLists, 794if (current is LambdaExpressionSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
318if (!conversion.Exists && expression is LambdaExpressionSyntax && semanticModel.Compilation.LanguageVersion() >= LanguageVersion.CSharp10)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (22)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
75return location.Parent is ArrowExpressionClauseSyntax or LambdaExpressionSyntax;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
78var lambda = (LambdaExpressionSyntax)parent;
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (10)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 25private static LambdaExpressionSyntax UpdateWorker( 26SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 34private static LambdaExpressionSyntax WithExpressionBody( 35SemanticModel semanticModel, LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 43var updatedDecl = declaration.WithBody(expressionBody); 56private static LambdaExpressionSyntax WithBlockBody( 57SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, ExpressionSyntax expressionBody) 80SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (2)
22internal sealed class UseExpressionBodyForLambdaCodeFixProvider() : ForkingSyntaxEditorBasedCodeFixProvider<LambdaExpressionSyntax> 36LambdaExpressionSyntax lambdaExpression,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
227? ArrowExpressionClause(((LambdaExpressionSyntax)anonymousFunction).ArrowToken, expression)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (6)
169LambdaExpressionSyntax lambdaExpression => InferTypeInLambdaExpression(lambdaExpression), 237LambdaExpressionSyntax lambdaExpression => InferTypeInLambdaExpression(lambdaExpression, token), 1604private IEnumerable<TypeInferenceInfo> InferTypeInLambdaExpression(LambdaExpressionSyntax lambdaExpression, SyntaxToken? previousToken = null) 1767if (IsUnusableType(typeArg) && argumentExpression is LambdaExpressionSyntax lambdaExpression) 1782LambdaExpressionSyntax lambdaExpression) 1813LambdaExpressionSyntax lambdaExpression, ParameterSyntax parameter)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (2)
895var lambdas = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToArray(); 947var lambdas = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToArray();
CodeGen\CodeGenFunctionPointersTests.cs (3)
7415var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 10804var lambdas = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToArray();
CodeGen\CodeGenTupleTest.cs (4)
17240var n5 = nodes.OfType<LambdaExpressionSyntax>().Single(); 17301var n5 = nodes.OfType<LambdaExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (9)
Attributes\AttributeTests_WellKnownAttributes.cs (3)
11398var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 11423var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 11454var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray();
FlowAnalysis\RegionAnalysisTests.cs (6)
5536var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 5580var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 5623var node = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Features (43)
CodeRefactorings\InlineMethod\CSharpInlineMethodRefactoringProvider.cs (1)
115LambdaExpressionSyntax lambdaExpressionSyntax
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (4)
43: expression.Ancestors().FirstOrDefault(s => s is BlockSyntax or ArrowExpressionClauseSyntax or LambdaExpressionSyntax); 96case LambdaExpressionSyntax lambda: 107LambdaExpressionSyntax oldLambda, 135LambdaExpressionSyntax oldLambda,
Snippets\CSharpConsoleSnippetProvider.cs (2)
22LambdaExpressionSyntax> 35if (syntaxContext.TargetToken is { RawKind: (int)SyntaxKind.EqualsGreaterThanToken, Parent: LambdaExpressionSyntax lambda })
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
308if (current.Parent is LambdaExpressionSyntax lambda &&
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqTypeCheckAndCastDiagnosticAnalyzer.cs (5)
40LambdaExpressionSyntax lambda, 60LambdaExpressionSyntax whereLambda, 91[NotNullWhen(true)] out LambdaExpressionSyntax? whereLambda, 110ArgumentList.Arguments: [{ Expression: LambdaExpressionSyntax whereLambda1 }], 150Expression: LambdaExpressionSyntax
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (4)
62var declaration = (LambdaExpressionSyntax)context.Node; 72LambdaExpressionSyntax declaration, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) 103private static Location GetDiagnosticLocation(LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (4)
23LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 68SemanticModel semanticModel, ExpressionBodyPreference preference, LambdaExpressionSyntax declaration, LanguageVersion languageVersion, CancellationToken cancellationToken) 89internal static ExpressionSyntax? GetBodyAsExpression(LambdaExpressionSyntax declaration) 110LambdaExpressionSyntax declaration,
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
128LambdaExpressionSyntax => true,
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
75return location.Parent is ArrowExpressionClauseSyntax or LambdaExpressionSyntax;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (2)
78var lambda = (LambdaExpressionSyntax)parent;
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (10)
22internal static LambdaExpressionSyntax Update(SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 25private static LambdaExpressionSyntax UpdateWorker( 26SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, CancellationToken cancellationToken) 34private static LambdaExpressionSyntax WithExpressionBody( 35SemanticModel semanticModel, LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 43var updatedDecl = declaration.WithBody(expressionBody); 56private static LambdaExpressionSyntax WithBlockBody( 57SemanticModel semanticModel, LambdaExpressionSyntax lambdaExpression, ExpressionSyntax expressionBody) 80SemanticModel semanticModel, LambdaExpressionSyntax declaration)
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (2)
22internal sealed class UseExpressionBodyForLambdaCodeFixProvider() : ForkingSyntaxEditorBasedCodeFixProvider<LambdaExpressionSyntax> 36LambdaExpressionSyntax lambdaExpression,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
227? ArrowExpressionClause(((LambdaExpressionSyntax)anonymousFunction).ArrowToken, expression)
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
68var containingLambda = node.FirstAncestorOrSelf<LambdaExpressionSyntax>();
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (3)
165var lambdaNode = await document.TryGetRelevantNodeAsync<LambdaExpressionSyntax>(span, cancellationToken).ConfigureAwait(false); 195Document document, SyntaxNode root, LambdaExpressionSyntax declaration, CancellationToken cancellationToken) 199var updatedDeclaration = UseExpressionBodyForLambdaCodeActionHelpers.Update(
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
260case LambdaExpressionSyntax lambda:
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
EditAndContinue\SyntaxUtilitiesTests.cs (4)
192var l1 = m3.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "l1").Initializer. 193DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 195var l2 = m3.DescendantNodes().OfType<VariableDeclaratorSyntax>().Single(m => m.Identifier.ValueText == "l2").Initializer. 196DescendantNodes().OfType<LambdaExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (5)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (4)
410var lambdaSyntax = (LambdaExpressionSyntax)variableDeclaration.Declaration.Variables.Single().Initializer.Value; 490var lambdaSyntax = (LambdaExpressionSyntax)variableDeclaration.Declaration.Variables.Single().Initializer.Value;
IOperation\IOperationTests_IDelegateCreationExpression.cs (1)
76VerifyOperationTreeAndDiagnosticsForTest<LambdaExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (66)
Semantics\DelegateTypeTests.cs (2)
14777var expr = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single();
Semantics\LambdaDiscardParametersTests.cs (1)
386var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>();
Semantics\LambdaTests.cs (55)
2120var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2166var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2212var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2258var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2304var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2334var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2361var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 2415foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 2461foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 2507foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 2540foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 2573foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 2610foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 3612var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>(); 3630static string getAttributesInternal(LambdaExpressionSyntax expr, ISymbol symbol) 3636static string getAttributesPublic(LambdaExpressionSyntax expr, ISymbol symbol) 3642static string format(LambdaExpressionSyntax expr, IEnumerable<object> methodAttributes, IEnumerable<object> returnAttributes, IEnumerable<object> parameterAttributes) 3893var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 4093var expr = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 4122var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4157var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4185var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4212var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4787var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4872var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4927var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4954var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 4982var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 5028var expr = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 6221private static LambdaSymbol GetLambdaSymbol(SemanticModel model, LambdaExpressionSyntax syntax) 7108var lambdas = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ToArray(); 8058var lambda = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 8087var newLambda = newMethod.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 8126var defaultValue = decls[1].DescendantNodes().OfType<LambdaExpressionSyntax>().Single() 8157var defaultValue = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single() 8360var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray(); 8393var exprs = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().ToImmutableArray();
Semantics\NullableReferenceTypesTests.cs (4)
3334foreach (var lambda in tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>()) 56619var lambdaNode = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Last();
Semantics\RefFieldTests.cs (2)
16775var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Last();
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (2)
715var input = ctx.ForAttributeWithMetadataName<LambdaExpressionSyntax>("System.CLSCompliantAttribute"); 724step => Assert.True(step.Outputs.Single().Value is LambdaExpressionSyntax));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (46)
Compilation\SemanticModelAPITests.cs (2)
3785var localFunctionBody = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single();
Symbols\Source\NullablePublicAPITests.cs (44)
1626var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 1669var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 1712var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3488var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3537var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 3540var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3598var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 3601var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3661var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3732var localFunctionBody = tree.GetRoot().DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3769var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3808var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().Single(); 3854var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 3862var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3913var fieldLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 3927var propertyLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3978var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 3981var innerLambda1 = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 3991var innerLambda2 = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 4114var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First(); 4116var innerLambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().ElementAt(1); 4177var lambda = root.DescendantNodes().OfType<LambdaExpressionSyntax>().First();
Microsoft.CodeAnalysis.CSharp.Workspaces (18)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1215LambdaExpressionSyntax lambdaExpression => lambdaExpression.WithAttributeLists(attributeLists),
Rename\CSharpRenameRewriterLanguageService.cs (2)
1159var lambdaExpression = ((LambdaExpressionSyntax)possibleLambdaExpression);
Simplification\CSharpSimplificationService.Expander.cs (4)
113private bool TryGetLambdaExpressionBodyWithCast(LambdaExpressionSyntax lambdaExpression, LambdaExpressionSyntax newLambdaExpression, out ExpressionSyntax newLambdaExpressionBodyWithCast) 139var parentLambda = node.FirstAncestorOrSelf<LambdaExpressionSyntax>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
927LambdaExpressionSyntax lambda => GetTargetTypeForLambdaExpression(lambda, topExpression), 1009ITypeSymbol? GetTargetTypeForLambdaExpression(LambdaExpressionSyntax lambda, ExpressionSyntax expression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
166LambdaExpressionSyntax lambdaExpressionSyntax => lambdaExpressionSyntax.AttributeLists, 794if (current is LambdaExpressionSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
318if (!conversion.Exists && expression is LambdaExpressionSyntax && semanticModel.Compilation.LanguageVersion() >= LanguageVersion.CSharp10)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (6)
169LambdaExpressionSyntax lambdaExpression => InferTypeInLambdaExpression(lambdaExpression), 237LambdaExpressionSyntax lambdaExpression => InferTypeInLambdaExpression(lambdaExpression, token), 1604private IEnumerable<TypeInferenceInfo> InferTypeInLambdaExpression(LambdaExpressionSyntax lambdaExpression, SyntaxToken? previousToken = null) 1767if (IsUnusableType(typeArg) && argumentExpression is LambdaExpressionSyntax lambdaExpression) 1782LambdaExpressionSyntax lambdaExpression) 1813LambdaExpressionSyntax lambdaExpression, ParameterSyntax parameter)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
1948VerifySyntax<LambdaExpressionSyntax>(
Microsoft.Maui.Controls.BindingSourceGen (8)
BindingSourceGenerator.cs (7)
134 private static Result<LambdaExpressionSyntax> GetLambda(InvocationExpressionSyntax invocation, InterceptedMethodType methodType) 144 if (expression is not LambdaExpressionSyntax lambda) 146 return Result<LambdaExpressionSyntax>.Failure(DiagnosticsFactory.GetterIsNotLambda(expression.GetLocation())); 152 return Result<LambdaExpressionSyntax>.Failure(DiagnosticsFactory.LambdaIsNotStatic(lambda.GetLocation())); 155 return Result<LambdaExpressionSyntax>.Success(lambda); 158 private static Result<ITypeSymbol> GetLambdaReturnType(LambdaExpressionSyntax lambda, SemanticModel semanticModel, CancellationToken t) 174 private static Result<ITypeSymbol> GetLambdaParameterType(LambdaExpressionSyntax lambda, SemanticModel semanticModel, CancellationToken t)
InvocationParser.cs (1)
96 if (secondArgument is not LambdaExpressionSyntax)
System.Private.CoreLib.Generators (1)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (1)
579if (ancestorNode is LambdaExpressionSyntax)