204 references to ParenthesizedLambdaExpressionSyntax
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
429ParenthesizedLambdaExpressionSyntax parenthesizedLambdaExpression => parenthesizedLambdaExpression.ParameterList,
Microsoft.AspNetCore.App.CodeFixes (2)
RouteParameterUnusedParameterFixer.cs (2)
93ParenthesizedLambdaExpressionSyntax lambdaExpressionSyntax => AddParameter(lambdaExpressionSyntax, newParameter, routeParameterInsertIndex), 113private static SyntaxNode AddParameter(ParenthesizedLambdaExpressionSyntax syntax, ParameterSyntax parameterSyntax, int parameterIndex)
Microsoft.CodeAnalysis.CSharp (30)
Binder\Binder_Expressions.cs (1)
10997resultIsUsed = (((ParenthesizedLambdaExpressionSyntax)parent).Body != node) || MethodOrLambdaRequiresValue(ContainingMemberOrLambda, Compilation);
Binder\Binder_Lambda.cs (2)
78var paren = (ParenthesizedLambdaExpressionSyntax)syntax;
Binder\ExpressionVariableFinder.cs (1)
289public override void VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node) { }
Binder\LocalBinderFactory.cs (1)
400public override void VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node)
BoundTree\UnboundLambda.cs (1)
1509return ((ParenthesizedLambdaExpressionSyntax)syntax).ParameterList.Parameters[index].Identifier.GetLocation();
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
595var lambdaSyntax = (ParenthesizedLambdaExpressionSyntax)node.Syntax;
Parser\LanguageParser.cs (1)
13237result is ParenthesizedLambdaExpressionSyntax { ReturnType: NullableTypeSyntax })
Symbols\Source\LambdaSymbol.cs (1)
244private bool HasExplicitReturnType => _syntax is ParenthesizedLambdaExpressionSyntax { ReturnType: not null };
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1530ParenthesizedLambdaExpressionSyntax { ReturnType: { } lambdaReturnType } => lambdaReturnType,
Syntax\LookupPosition.cs (2)
489ParenthesizedLambdaExpressionSyntax parenthesized = (ParenthesizedLambdaExpressionSyntax)lambdaExpressionOrQueryNode;
Syntax\ParenthesizedLambdaExpressionSyntax.cs (11)
11public new ParenthesizedLambdaExpressionSyntax WithBody(CSharpSyntaxNode body) 16public ParenthesizedLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, CSharpSyntaxNode body) 27public new ParenthesizedLambdaExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 30public ParenthesizedLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 33public ParenthesizedLambdaExpressionSyntax Update(SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 36public ParenthesizedLambdaExpressionSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 45public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 48public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(ParameterListSyntax parameterList, BlockSyntax? block, ExpressionSyntax? expressionBody) 51public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 54public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxTokenList modifiers, ParameterListSyntax parameterList, BlockSyntax? block, ExpressionSyntax? expressionBody) 57public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, ParameterListSyntax parameterList, BlockSyntax? block, ExpressionSyntax? expressionBody)
Syntax\SyntaxFactory.cs (3)
2753public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(CSharpSyntaxNode body) 2756public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(ParameterListSyntax parameterList, CSharpSyntaxNode body) 2761public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, CSharpSyntaxNode body)
Syntax\SyntaxFacts.cs (1)
191return ((ParenthesizedLambdaExpressionSyntax)parent).ReturnType == node;
Syntax\SyntaxNodeExtensions.cs (1)
266(current.Parent is ParenthesizedLambdaExpressionSyntax lambda && lambda.ReturnType == current) ||
Syntax\SyntaxNormalizer.cs (1)
883if (next is { RawKind: (int)SyntaxKind.OpenParenToken, Parent.Parent: ParenthesizedLambdaExpressionSyntax lambda } &&
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
296ParenthesizedLambdaExpressionSyntax parenthesizedLambda => parenthesizedLambda.ParameterList.Parameters,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
150ParenthesizedLambdaExpressionSyntax parenthesizedLambda => parenthesizedLambda.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
157case ParenthesizedLambdaExpressionSyntax parenthesizedLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
203var originalParenthesizedLambda = (ParenthesizedLambdaExpressionSyntax)originalLambda; 210var replacedParenthesizedLambda = (ParenthesizedLambdaExpressionSyntax)replacedLambda;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
39case ParenthesizedLambdaExpressionSyntax lambda: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
57ParenthesizedLambdaExpressionSyntax lambda => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
24internal static SyntaxNode WithoutAsyncModifier(ParenthesizedLambdaExpressionSyntax lambda)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
275case ParenthesizedLambdaExpressionSyntax parenthesizedLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1584possibleCommaOrParen.Parent?.Parent is ParenthesizedLambdaExpressionSyntax parenthesizedLambda)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1768if (lambdaExpression is ParenthesizedLambdaExpressionSyntax parenLambda) 1781ParenthesizedLambdaExpressionSyntax lambdaExpression)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\ParenthesizedLambdaStructureTests.cs (1)
15public class ParenthesizedLambdaStructureTests : AbstractCSharpSyntaxNodeStructureTests<ParenthesizedLambdaExpressionSyntax>
SymbolKey\SymbolKeyTestBase.cs (1)
373IEnumerable<ExpressionSyntax> tmp = body.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
FlowAnalysis\RegionAnalysisTests.cs (4)
5490var lambdaExpression = methodBlock.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().First(); 6228var lambda = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
RefStructInterfacesTests.cs (3)
21238var lambda = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 21707var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().ToArray();
Microsoft.CodeAnalysis.CSharp.Features (20)
ChangeSignature\CSharpChangeSignatureService.cs (1)
388if (updatedNode is ParenthesizedLambdaExpressionSyntax parenLambda)
Completion\CompletionProviders\AwaitCompletionProvider.cs (1)
48ParenthesizedLambdaExpressionSyntax parenthesizedLambda => (parenthesizedLambda.ReturnType as SyntaxNode ?? parenthesizedLambda.ParameterList).SpanStart,
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
131return token.Parent.Parent is not null and ParenthesizedLambdaExpressionSyntax;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
1868var parenthesizedLambda = (ParenthesizedLambdaExpressionSyntax)node; 1952return ((ParenthesizedLambdaExpressionSyntax)lambda).ParameterList.Parameters[ordinal].Identifier.Span;
EditAndContinue\SyntaxComparer.cs (2)
988var parenthesized = (ParenthesizedLambdaExpressionSyntax)nestedFunction;
ExtractMethod\CSharpSelectionResult.cs (1)
96ParenthesizedLambdaExpressionSyntax or
ExtractMethod\CSharpSelectionResult.StatementResult.cs (2)
36ParenthesizedLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 56ParenthesizedLambdaExpressionSyntax or
ExtractMethod\Extensions.cs (1)
48case ParenthesizedLambdaExpressionSyntax p: return p.Body as BlockSyntax;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
296ParenthesizedLambdaExpressionSyntax parenthesizedLambda => parenthesizedLambda.ParameterList.Parameters,
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
39case ParenthesizedLambdaExpressionSyntax lambda: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
57ParenthesizedLambdaExpressionSyntax lambda => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(lambda)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
24internal static SyntaxNode WithoutAsyncModifier(ParenthesizedLambdaExpressionSyntax lambda)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
275case ParenthesizedLambdaExpressionSyntax parenthesizedLambda:
Structure\CSharpBlockStructureProvider.cs (1)
44builder.Add<ParenthesizedLambdaExpressionSyntax, ParenthesizedLambdaExpressionStructureProvider>();
Structure\Providers\ParenthesizedLambdaExpressionStructureProvider.cs (2)
12internal class ParenthesizedLambdaExpressionStructureProvider : AbstractSyntaxNodeStructureProvider<ParenthesizedLambdaExpressionSyntax> 16ParenthesizedLambdaExpressionSyntax lambdaExpression,
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (2)
101VerifyOperationTreeAndDiagnosticsForTest<ParenthesizedLambdaExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 185VerifyOperationTreeAndDiagnosticsForTest<ParenthesizedLambdaExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_InvalidExpression.cs (1)
407VerifyOperationTreeAndDiagnosticsForTest<ParenthesizedLambdaExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\AnonymousFunctionTests.cs (4)
985var parenthesizedLambdaSyntax = root.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 1019var parenthesizedLambdaSyntax = root.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Semantics\BindingAsyncTests.cs (2)
61var parens = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>(); 63foreach (var paren in parens)
Semantics\DeconstructionTests.cs (1)
888VerifyOperationTreeAndDiagnosticsForTest<ParenthesizedLambdaExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
Semantics\DelegateTypeTests.cs (2)
19768typeInfo = model.GetTypeInfo(declarator.Initializer!.Value.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single()); 19810typeInfo = model.GetTypeInfo(declarator.Initializer!.Value.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single());
Semantics\ExpressionBodiedMemberTests.cs (2)
426var node = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Semantics\LambdaTests.cs (8)
849var exprs = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>(); 1178var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single().Body; 1238var expr = (ExpressionSyntax)tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single().Body; 2662var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().ToArray(); 2665var lambda = lambdas[0]; 5642var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 6903var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<LambdaSymbol>()).ToArray();
Semantics\RefFieldTests.cs (8)
11128var value = decl.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 16726var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().ToArray(); 23901var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<LambdaSymbol>()).ToArray(); 23937var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<LambdaSymbol>()).ToArray(); 23974var lambdas = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Select(e => model.GetSymbolInfo(e).Symbol.GetSymbol<LambdaSymbol>()).ToArray(); 24761var value = decl.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (19)
Compilation\GetSemanticInfoTests.cs (10)
4785var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5521var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5535var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5620var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single(); 5667var lambdaSyntax = tree.GetRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Compilation\SemanticModelAPITests.cs (4)
1962var lambdaExpression = speculatedStatement.DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().FirstOrDefault(); 2683var lambdaExpression = blockStatement.Statements[0].DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().FirstOrDefault();
Compilation\SemanticModelGetSemanticInfoTests.cs (3)
6755semanticInfo = GetSemanticInfoForTest<ParenthesizedLambdaExpressionSyntax>(sourceCode); 7025var semanticInfo = GetSemanticInfoForTest<ParenthesizedLambdaExpressionSyntax>(code); 8642var semanticInfo = GetSemanticInfoForTest<ParenthesizedLambdaExpressionSyntax>(sourceCode, parseOptions: TestOptions.Regular6);
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
719CheckLambdaDeclaringSyntax<ParenthesizedLambdaExpressionSyntax>(comp, tree, "/*1*/");
Symbols\Source\DelegateTests.cs (1)
827ExpressionSyntax lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ParenthesizedLambdaExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (35)
Diagnostics\LineSpanDirectiveTests.cs (1)
450case ParenthesizedLambdaExpressionSyntax lambda:
Generated\Syntax.Test.xml.Generated.cs (5)
10400private static ParenthesizedLambdaExpressionSyntax GenerateParenthesizedLambdaExpression() 11631var node = GenerateParenthesizedLambdaExpression(); 11640var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithParameterList(node.ParameterList).WithArrowToken(node.ArrowToken).WithBlock(node.Block).WithExpressionBody(node.ExpressionBody); 15581var oldNode = GenerateParenthesizedLambdaExpression(); 15597var oldNode = GenerateParenthesizedLambdaExpression();
Parsing\ExpressionParsingTests.cs (14)
2093var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2113var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2133var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2155var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2179var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2206var lambda = (ParenthesizedLambdaExpressionSyntax)expr; 2231var lambda = (ParenthesizedLambdaExpressionSyntax)expr;
Parsing\ParserErrorMessageTests.cs (3)
3776var lambdaExpression = (ParenthesizedLambdaExpressionSyntax)tree.GetRoot().DescendantNodes().Single(node => node is ParenthesizedLambdaExpressionSyntax);
Syntax\SyntaxFactoryTests.cs (4)
579var lambda = SyntaxFactory.ParenthesizedLambdaExpression(body: SyntaxFactory.Block()); 583var fullySpecified = SyntaxFactory.ParenthesizedLambdaExpression(parameterList: SyntaxFactory.ParameterList(), body: SyntaxFactory.Block()); 590var lambda = SyntaxFactory.ParenthesizedLambdaExpression(body: SyntaxFactory.LiteralExpression(SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal(1))); 594var fullySpecified = SyntaxFactory.ParenthesizedLambdaExpression(
Syntax\SyntaxNodeTests.cs (8)
3841var expression = (ParenthesizedLambdaExpressionSyntax)SyntaxFactory.ParseExpression(text); 3868var expression = (ParenthesizedLambdaExpressionSyntax)SyntaxFactory.ParseExpression(text); 3895var expression = (ParenthesizedLambdaExpressionSyntax)SyntaxFactory.ParseExpression(text); 3922var expression = (ParenthesizedLambdaExpressionSyntax)SyntaxFactory.ParseExpression(text);
Microsoft.CodeAnalysis.CSharp.Workspaces (32)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
2247return ((ParenthesizedLambdaExpressionSyntax)declaration).WithParameterList((ParameterListSyntax)list); 2277return ((ParenthesizedLambdaExpressionSyntax)declaration).Body as ExpressionSyntax; 2332return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ?? CreateBlock()); 2489SyntaxKind.ParenthesizedLambdaExpression => (((ParenthesizedLambdaExpressionSyntax)declaration).Body as BlockSyntax)?.Statements, 2523return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody(body);
Recommendations\CSharpRecommendationServiceRunner.cs (2)
41ParenthesizedLambdaExpressionSyntax parenthesizedLambda => parenthesizedLambda.ParameterList.Parameters.Count, 59if (lambdaSyntax is ParenthesizedLambdaExpressionSyntax parenthesizedLambdaSyntax)
Rename\CSharpRenameRewriterLanguageService.cs (3)
161var lambdas = node.GetAncestorsOrThis(n => n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax); 298var expandParameter = !originalNode.GetAncestorsOrThis(n => n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax).Any(); 1161? token.GetAncestors(n => n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax).FirstOrDefault()
Rename\LocalConflictVisitor.cs (1)
119public override void VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node)
Simplification\CSharpSimplificationService.Expander.cs (4)
157public override SyntaxNode VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node) 161if (newNode is ParenthesizedLambdaExpressionSyntax parenthesizedLambda) 195var newParenthesizedLambda = parenthesizedLambda.WithParameterList(newParameterList); 229var parenthesizedLambda = ParenthesizedLambdaExpression(
Simplification\Reducers\CSharpEscapingReducer.cs (2)
55var enclosingLambdaExpression = parent.GetAncestorsOrThis(n => (n is SimpleLambdaExpressionSyntax or ParenthesizedLambdaExpressionSyntax)).FirstOrDefault(); 66if (enclosingLambdaExpression is ParenthesizedLambdaExpressionSyntax parenLamdba)
Simplification\Reducers\CSharpMiscellaneousReducer.cs (5)
48var oldLambda = parameterSyntax.FirstAncestorOrSelf<ParenthesizedLambdaExpressionSyntax>(); 49var newLambda = oldLambda.ReplaceNode(parameterSyntax, newParameterSyntax); 83private static readonly Func<ParenthesizedLambdaExpressionSyntax, SemanticModel, SimplifierOptions, CancellationToken, SyntaxNode> s_simplifyParenthesizedLambdaExpression = SimplifyParenthesizedLambdaExpression; 86ParenthesizedLambdaExpressionSyntax parenthesizedLambda,
Simplification\Reducers\CSharpMiscellaneousReducer.Rewriter.cs (1)
25public override SyntaxNode? VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
150ParenthesizedLambdaExpressionSyntax parenthesizedLambda => parenthesizedLambda.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
157case ParenthesizedLambdaExpressionSyntax parenthesizedLambda:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (4)
203var originalParenthesizedLambda = (ParenthesizedLambdaExpressionSyntax)originalLambda; 210var replacedParenthesizedLambda = (ParenthesizedLambdaExpressionSyntax)replacedLambda;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1584possibleCommaOrParen.Parent?.Parent is ParenthesizedLambdaExpressionSyntax parenthesizedLambda)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1768if (lambdaExpression is ParenthesizedLambdaExpressionSyntax parenLambda) 1781ParenthesizedLambdaExpressionSyntax lambdaExpression)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (12)
CodeGeneration\SyntaxGeneratorTests.cs (12)
714VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 718VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 726VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 730VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 738VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 742VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 750VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 754VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 758VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 762VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 766VerifySyntax<ParenthesizedLambdaExpressionSyntax>( 770VerifySyntax<ParenthesizedLambdaExpressionSyntax>(