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