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