100 references to AnonymousMethodExpressionSyntax
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Lambda.cs (2)
89var anon = (AnonymousMethodExpressionSyntax)syntax;
Binder\Binder_Statements.cs (2)
1998AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.DelegateKeyword.GetLocation(), 3407case AnonymousMethodExpressionSyntax anonymousMethodSyntax:
Binder\ExpressionVariableFinder.cs (1)
291public override void VisitAnonymousMethodExpression(AnonymousMethodExpressionSyntax node) { }
Binder\LocalBinderFactory.cs (1)
515public override void VisitAnonymousMethodExpression(AnonymousMethodExpressionSyntax node)
BoundTree\UnboundLambda.cs (1)
1511return ((AnonymousMethodExpressionSyntax)syntax).ParameterList!.Parameters[index].Identifier.GetLocation();
Parser\LanguageParser.cs (3)
13186private AnonymousMethodExpressionSyntax ParseAnonymousMethodExpression() 13193var result = parseAnonymousMethodExpressionWorker(); 13200AnonymousMethodExpressionSyntax parseAnonymousMethodExpressionWorker()
Symbols\Source\LambdaSymbol.cs (1)
237AnonymousMethodExpressionSyntax syntax => syntax.DelegateKeyword.GetLocation(),
Syntax\AnonymousMethodExpressionSyntax.cs (6)
14public new AnonymousMethodExpressionSyntax WithBody(CSharpSyntaxNode body) 19public AnonymousMethodExpressionSyntax Update(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, CSharpSyntaxNode body) 28public new AnonymousMethodExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 31public AnonymousMethodExpressionSyntax Update(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, BlockSyntax block, ExpressionSyntax expressionBody) 41public static AnonymousMethodExpressionSyntax AnonymousMethodExpression() 49public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, BlockSyntax block, ExpressionSyntax expressionBody)
Syntax\LookupPosition.cs (2)
495AnonymousMethodExpressionSyntax anon = (AnonymousMethodExpressionSyntax)lambdaExpressionOrQueryNode;
Syntax\SyntaxFactory.cs (3)
2766public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(CSharpSyntaxNode body) 2769public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(ParameterListSyntax? parameterList, CSharpSyntaxNode body) 2774public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, CSharpSyntaxNode body)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
290AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.ParameterList?.Parameters ?? default,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
152AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
160case AnonymousMethodExpressionSyntax anonymousMethod:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (1)
87AnonymousMethodExpressionSyntax anonymousMethod => (anonymousMethod.DelegateKeyword, anonymousMethod.GetLastToken(includeZeroWidth: true)),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
38case AnonymousMethodExpressionSyntax method: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(method);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
56AnonymousMethodExpressionSyntax method => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(method)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
30internal static SyntaxNode WithoutAsyncModifier(AnonymousMethodExpressionSyntax method)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
277case AnonymousMethodExpressionSyntax anonymousMethod:
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\AnonymousMethodExpressionStructureTests.cs (1)
15public class AnonymousMethodExpressionStructureTests : AbstractCSharpSyntaxNodeStructureTests<AnonymousMethodExpressionSyntax>
SymbolKey\SymbolKeyTestBase.cs (1)
375tmp = body.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>();
Microsoft.CodeAnalysis.CSharp.Features (18)
ChangeSignature\CSharpChangeSignatureService.cs (1)
356if (updatedNode is AnonymousMethodExpressionSyntax anonymousMethod)
Completion\CompletionProviders\AwaitCompletionProvider.cs (2)
46AnonymousMethodExpressionSyntax anonymous => anonymous.DelegateKeyword.SpanStart, 65AnonymousMethodExpressionSyntax anonymous => null,
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1875return ((AnonymousMethodExpressionSyntax)node).DelegateKeyword.Span; 1960return ((AnonymousMethodExpressionSyntax)lambda).ParameterList!.Parameters[ordinal].Identifier.Span;
EditAndContinue\SyntaxComparer.cs (2)
999var anonymous = (AnonymousMethodExpressionSyntax)nestedFunction;
ExtractMethod\CSharpSelectionResult.StatementResult.cs (2)
37AnonymousMethodExpressionSyntax anonymous => anonymous.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 57AnonymousMethodExpressionSyntax or
ExtractMethod\Extensions.cs (1)
49case AnonymousMethodExpressionSyntax a: return a.Block;
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
290AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.ParameterList?.Parameters ?? default,
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (1)
38case AnonymousMethodExpressionSyntax method: return RemoveAsyncModifierHelpers.WithoutAsyncModifier(method);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
56AnonymousMethodExpressionSyntax method => AnnotateBlock(generator, RemoveAsyncModifierHelpers.WithoutAsyncModifier(method)),
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
30internal static SyntaxNode WithoutAsyncModifier(AnonymousMethodExpressionSyntax method)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
277case AnonymousMethodExpressionSyntax anonymousMethod:
Structure\CSharpBlockStructureProvider.cs (1)
21builder.Add<AnonymousMethodExpressionSyntax, AnonymousMethodExpressionStructureProvider>();
Structure\Providers\AnonymousMethodExpressionStructureProvider.cs (2)
12internal class AnonymousMethodExpressionStructureProvider : AbstractSyntaxNodeStructureProvider<AnonymousMethodExpressionSyntax> 16AnonymousMethodExpressionSyntax anonymousMethod,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\AnonymousFunctionTests.cs (4)
983var anonymousMethodSyntax = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 1017var anonymousMethodSyntax = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Semantics\BindingAsyncTests.cs (2)
87var del = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Semantics\RefFieldTests.cs (4)
16591var anonymousMethod = tree.GetRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 16630var anonymousMethod = tree.GetRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
6735var semanticInfo = GetSemanticInfoForTest<AnonymousMethodExpressionSyntax>(sourceCode);
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
721CheckLambdaDeclaringSyntax<AnonymousMethodExpressionSyntax>(comp, tree, "/*3*/");
Symbols\Source\DelegateTests.cs (5)
738var anonymousMethod = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 765var anonymousMethod = root.DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single(); 834lambdaSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<AnonymousMethodExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (27)
Generated\Syntax.Test.xml.Generated.cs (5)
10391private static AnonymousMethodExpressionSyntax GenerateAnonymousMethodExpression() 11591var node = GenerateAnonymousMethodExpression(); 11598var newNode = node.WithModifiers(node.Modifiers).WithDelegateKeyword(node.DelegateKeyword).WithParameterList(node.ParameterList).WithBlock(node.Block).WithExpressionBody(node.ExpressionBody); 15503var oldNode = GenerateAnonymousMethodExpression(); 15519var oldNode = GenerateAnonymousMethodExpression();
Parsing\ExpressionParsingTests.cs (6)
1951var am = (AnonymousMethodExpressionSyntax)expr; 1982var am = (AnonymousMethodExpressionSyntax)expr; 2012var am = (AnonymousMethodExpressionSyntax)expr;
Parsing\ParserErrorMessageTests.cs (3)
3779var anonymousMethodExpression = (AnonymousMethodExpressionSyntax)tree.GetRoot().DescendantNodes().Single(node => node is AnonymousMethodExpressionSyntax);
Syntax\SyntaxNodeTests.cs (13)
3893var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 3920var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 3947var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 3974var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 4001var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 4011var expression = (AnonymousMethodExpressionSyntax)SyntaxFactory.ParseExpression(text); 4012var withAsync = expression.WithAsyncKeyword(default);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2465SyntaxKind.AnonymousMethodExpression => (((AnonymousMethodExpressionSyntax)declaration).Body as BlockSyntax)?.Statements,
ReassignedVariable\CSharpReassignedVariableService.cs (1)
45if (current is BlockSyntax or SwitchSectionSyntax or ArrowExpressionClauseSyntax or AnonymousMethodExpressionSyntax or MemberDeclarationSyntax)
Recommendations\CSharpRecommendationServiceRunner.cs (1)
34AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.ParameterList?.Parameters.Count ?? -1,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
152AnonymousMethodExpressionSyntax anonymousMethod => anonymousMethod.ParameterList,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
160case AnonymousMethodExpressionSyntax anonymousMethod:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (1)
87AnonymousMethodExpressionSyntax anonymousMethod => (anonymousMethod.DelegateKeyword, anonymousMethod.GetLastToken(includeZeroWidth: true)),