411 references to LocalFunctionStatementSyntax
Microsoft.CodeAnalysis.CSharp (44)
Binder\Binder_Statements.cs (3)
69
result = BindLocalFunctionStatement((
LocalFunctionStatementSyntax
)node, diagnostics);
551
private BoundStatement BindLocalFunctionStatement(
LocalFunctionStatementSyntax
node, BindingDiagnosticBag diagnostics)
3456
LocalFunctionStatementSyntax
=> (MessageID?)null,
Binder\LocalBinderFactory.cs (2)
364
public override void VisitLocalFunctionStatement(
LocalFunctionStatementSyntax
node)
397
private static LocalFunctionSymbol FindLocalFunction(
LocalFunctionStatementSyntax
node, Binder enclosing)
Binder\LocalScopeBinder.cs (3)
274
var
decl = (
LocalFunctionStatementSyntax
)innerStatement;
299
protected LocalFunctionSymbol MakeLocalFunction(
LocalFunctionStatementSyntax
declaration)
Compilation\CSharpSemanticModel.cs (2)
2935
public abstract ISymbol GetDeclaredSymbol(
LocalFunctionStatementSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
5070
return this.GetDeclaredSymbol((
LocalFunctionStatementSyntax
)node, cancellationToken);
Compilation\MemberSemanticModel.cs (6)
220
LocalFunctionStatementSyntax
ownerOfTypeParametersInScope = null;
244
var
localFunction = (
LocalFunctionStatementSyntax
)stmt;
611
public override ISymbol GetDeclaredSymbol(
LocalFunctionStatementSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
704
internal LocalFunctionSymbol GetDeclaredLocalFunction(
LocalFunctionStatementSyntax
declarationSyntax)
842
var localFunction = GetDeclaredSymbol((
LocalFunctionStatementSyntax
)paramList.Parent, cancellationToken).GetSymbol<MethodSymbol>();
Compilation\PublicSemanticModel.cs (1)
39
LocalFunctionStatementSyntax
or
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
276
public override ISymbol GetDeclaredSymbol(
LocalFunctionStatementSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (2)
1485
public override ISymbol GetDeclaredSymbol(
LocalFunctionStatementSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
2146
case
LocalFunctionStatementSyntax
localDecl:
Lowering\ClosureConversion\ClosureConversion.cs (1)
1435
else if (syntax is
LocalFunctionStatementSyntax
localFunction)
Symbols\MethodSymbolExtensions.cs (1)
207
else if (node is
LocalFunctionStatementSyntax
statement)
Symbols\Source\LocalFunctionSymbol.cs (5)
38
LocalFunctionStatementSyntax
syntax)
91
internal
LocalFunctionStatementSyntax
Syntax => (
LocalFunctionStatementSyntax
)syntaxReferenceOpt.GetSyntax();
439
var
syntax = Syntax;
465
var
syntax = Syntax;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
53
case
LocalFunctionStatementSyntax
localFunction:
1090
LocalFunctionStatementSyntax
{ ReturnType: var localReturnType } => localReturnType,
Syntax\LambdaUtilities.cs (7)
116
return GetLocalFunctionBody((
LocalFunctionStatementSyntax
)newLambda);
127
LocalFunctionStatementSyntax
localFunctionStatementSyntax => (CSharpSyntaxNode?)localFunctionStatementSyntax.Body ?? localFunctionStatementSyntax.ExpressionBody!.Expression,
156
var
localFunction = (
LocalFunctionStatementSyntax
)parent;
161
return arrowExpressionClause.Expression == node && arrowExpressionClause.Parent is
LocalFunctionStatementSyntax
;
350
lambdaBody1 = GetLocalFunctionBody((
LocalFunctionStatementSyntax
)node);
481
private static SyntaxNode GetLocalFunctionBody(
LocalFunctionStatementSyntax
localFunctionStatementSyntax)
Syntax\LocalFunctionStatementSyntax.cs (3)
12
public
LocalFunctionStatementSyntax
Update(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax body, ArrowExpressionClauseSyntax expressionBody, SyntaxToken semicolonToken)
24
public static
LocalFunctionStatementSyntax
LocalFunctionStatement(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax? body, ArrowExpressionClauseSyntax? expressionBody)
30
public static
LocalFunctionStatementSyntax
LocalFunctionStatement(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax? body, ArrowExpressionClauseSyntax? expressionBody, SyntaxToken semicolonToken)
Syntax\LookupPosition.cs (3)
229
internal static bool IsInLocalFunctionTypeParameterScope(int position,
LocalFunctionStatementSyntax
localFunction)
444
LocalFunctionStatementSyntax
localFunctionStmt = (
LocalFunctionStatementSyntax
)statement;
Syntax\SyntaxFacts.cs (1)
188
return ((
LocalFunctionStatementSyntax
)parent).ReturnType == node;
Syntax\SyntaxNodeExtensions.cs (1)
267
(current.Parent is
LocalFunctionStatementSyntax
localFunction && localFunction.ReturnType == current) ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (31)
CSharpAccessibilityFacts.cs (1)
314
LocalFunctionStatementSyntax
localFunc => localFunc.Modifiers,
CSharpHeaderFacts.cs (2)
79
var
node = TryGetAncestorForLocation<
LocalFunctionStatementSyntax
>(root, position);
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
90
LocalFunctionStatementSyntax
localFunction => localFunction.ReturnType,
ElasticTriviaFormattingRule.cs (1)
462
else if (currentToken.Parent is
LocalFunctionStatementSyntax
)
ILocalSymbolExtensions.cs (3)
18
var
localFunctionStatement = destinationBlock.FirstAncestorOrSelf<
LocalFunctionStatementSyntax
>();
38
case
LocalFunctionStatementSyntax
localFunctionStatement:
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (2)
38
var
localFunction = (
LocalFunctionStatementSyntax
)context.Node;
MakeLocalFunctionStaticHelper.cs (5)
17
private static bool TryGetDataFlowAnalysis(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel, [NotNullWhen(returnValue: true)] out DataFlowAnalysis? dataFlow)
23
private static bool CanBeCalledFromStaticContext(
LocalFunctionStatementSyntax
localFunction, DataFlowAnalysis dataFlow)
30
static bool IsChildOrSelf(
LocalFunctionStatementSyntax
containingLocalFunction, ISymbol calledLocationFunction)
38
public static bool CanMakeLocalFunctionStaticBecauseNoCaptures(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel)
43
public static bool CanMakeLocalFunctionStaticByRefactoringCaptures(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel, out ImmutableArray<ISymbol> captures)
SuppressFormattingRule.cs (1)
212
LocalFunctionStatementSyntax
)
SyntaxNodeExtensions.cs (3)
169
SyntaxKind.LocalFunctionStatement => ((
LocalFunctionStatementSyntax
)declaration).ParameterList,
870
LocalFunctionStatementSyntax
localFunction => localFunction.Modifiers,
883
case
LocalFunctionStatementSyntax
localFunction: return localFunction.WithModifiers(modifiers);
UseExpressionBodyForLocalFunctionHelper.cs (11)
18
UseExpressionBodyHelper<
LocalFunctionStatementSyntax
>
35
protected override BlockSyntax GetBody(
LocalFunctionStatementSyntax
statement)
38
protected override ArrowExpressionClauseSyntax GetExpressionBody(
LocalFunctionStatementSyntax
statement)
41
protected override SyntaxToken GetSemicolonToken(
LocalFunctionStatementSyntax
statement)
44
protected override
LocalFunctionStatementSyntax
WithSemicolonToken(
LocalFunctionStatementSyntax
statement, SyntaxToken token)
47
protected override
LocalFunctionStatementSyntax
WithExpressionBody(
LocalFunctionStatementSyntax
statement, ArrowExpressionClauseSyntax expressionBody)
50
protected override
LocalFunctionStatementSyntax
WithBody(
LocalFunctionStatementSyntax
statement, BlockSyntax body)
54
SemanticModel semanticModel,
LocalFunctionStatementSyntax
statement)
UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
219
while (index + 1 < statements.Count && statements[index + 1] is
LocalFunctionStatementSyntax
)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (37)
AssignOutParametersAboveReturnCodeFixProvider.cs (1)
52
if (exprOrStatement is
LocalFunctionStatementSyntax
{ ExpressionBody: { } localFunctionExpressionBody })
AssignOutParametersAtStartCodeFixProvider.cs (1)
37
if (location is
LocalFunctionStatementSyntax
{ ExpressionBody: { } })
CSharpCodeGenerationService.cs (3)
492
else if (destinationMember is
LocalFunctionStatementSyntax
localFunctionStatement)
591
TDeclarationNode destinationMember, IEnumerable<SyntaxNode> statements,
LocalFunctionStatementSyntax
localFunctionStatement) where TDeclarationNode : SyntaxNode
603
var
finalMember = localFunctionStatement
CSharpDeclareAsNullableCodeFixProvider.cs (1)
167
LocalFunctionStatementSyntax
localFunction =>
CSharpFixReturnTypeCodeFixProvider.cs (1)
153
LocalFunctionStatementSyntax
localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (3)
81
LocalFunctionStatementSyntax
localFunction => FixLocalFunction(keepVoid, methodSymbol, localFunction, knownTypes, cancellationToken),
99
private static
LocalFunctionStatementSyntax
FixLocalFunction(
102
LocalFunctionStatementSyntax
localFunction,
CSharpMakeMethodSynchronousCodeFixProvider.cs (2)
39
case
LocalFunctionStatementSyntax
localFunction: return FixLocalFunction(methodSymbol, localFunction, knownTypes);
52
private static SyntaxNode FixLocalFunction(IMethodSymbol methodSymbol,
LocalFunctionStatementSyntax
localFunction, KnownTypes knownTypes)
CSharpMoveDeclarationNearReferenceService.cs (1)
35
LocalFunctionStatementSyntax
or
CSharpRemoveAsyncModifierCodeFixProvider.cs (2)
44
LocalFunctionStatementSyntax
localFunction => localFunction.WithBody(block).WithExpressionBody(null).WithSemicolonToken(default),
57
LocalFunctionStatementSyntax
localFunction => RemoveAsyncModifierHelpers.WithoutAsyncModifier(localFunction, localFunction.ReturnType),
CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (2)
56
.Select(t => t.GetAncestor<
LocalFunctionStatementSyntax
>());
58
foreach (
var
localFunction in localFunctions)
CSharpUseLocalFunctionCodeFixProvider.cs (2)
165
var
newLocalFunctionStatement = CreateLocalFunctionStatement(localDeclaration, anonymousFunction, delegateMethod, parameterList, makeStatic)
205
private static
LocalFunctionStatementSyntax
CreateLocalFunctionStatement(
ExpressionSyntaxExtensions.cs (1)
170
if (name.IsFoundUnder<
LocalFunctionStatementSyntax
>(d => d.ReturnType) ||
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
504
targetToken.GetAncestors<
LocalFunctionStatementSyntax
>().Any(f => f.GetModifiers().Any(SyntaxKind.UnsafeKeyword)));
MakeLocalFunctionStaticCodeFixHelper.cs (4)
30
LocalFunctionStatementSyntax
localFunction,
43
LocalFunctionStatementSyntax
localFunction,
182
var
localFunctionWithNewParameters = (
LocalFunctionStatementSyntax
)info.Service.AddParameters(
MethodGenerator.cs (8)
89
public static
LocalFunctionStatementSyntax
GenerateLocalFunctionDeclaration(
95
var
reusableSyntax = GetReuseableSyntaxNodeForSymbol<
LocalFunctionStatementSyntax
>(method, info);
101
var
declaration = GenerateLocalFunctionDeclarationWorker(
137
private static
LocalFunctionStatementSyntax
GenerateLocalFunctionDeclarationWorker(
141
var
localFunctionDeclaration = SyntaxFactory.LocalFunctionStatement(
174
private static
LocalFunctionStatementSyntax
UseExpressionBodyIfDesired(
175
CSharpCodeGenerationContextInfo info,
LocalFunctionStatementSyntax
localFunctionDeclaration)
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (3)
69
Func<Document,
LocalFunctionStatementSyntax
, ImmutableArray<ISymbol>, Task> fixer,
81
.Select(d => root.FindNode(d.Location.SourceSpan).AncestorsAndSelf().OfType<
LocalFunctionStatementSyntax
>().FirstOrDefault())
91
foreach (
var
localFunction in localFunctions)
RemoveAsyncModifierHelpers.cs (1)
18
internal static SyntaxNode WithoutAsyncModifier(
LocalFunctionStatementSyntax
localFunction, TypeSyntax returnType)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (8)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (2)
333
or
LocalFunctionStatementSyntax
409
or
LocalFunctionStatementSyntax
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (6)
465
LocalFunctionStatementSyntax
localFunctionStatementNode => ShouldAddBraceForLocalFunctionStatement(localFunctionStatementNode, caretPosition),
520
private static bool ShouldAddBraceForLocalFunctionStatement(
LocalFunctionStatementSyntax
localFunctionStatementNode, int caretPosition)
750
if (node is
LocalFunctionStatementSyntax
{ Body: { } localFunctionBody })
875
LocalFunctionStatementSyntax
localFunctionStatementNode => AddBlockToLocalFunctionDeclaration(localFunctionStatementNode, formattingOptions),
911
private static
LocalFunctionStatementSyntax
AddBlockToLocalFunctionDeclaration(
912
LocalFunctionStatementSyntax
localFunctionStatementNode,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (37)
EditAndContinue\SyntaxUtilitiesTests.cs (6)
188
var
f1 = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single(m => m.Identifier.ValueText == "f1");
189
var
f2 = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single(m => m.Identifier.ValueText == "f2");
254
var
f = m2.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single(m => m.Identifier.ValueText == "f");
RefactoringHelpers\RefactoringHelpersTests.cs (31)
31
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
48
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
65
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
83
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
100
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
117
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
137
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
154
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
174
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
194
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
212
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
229
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
247
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
266
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
284
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
303
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
395
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
412
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
429
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
446
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
463
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
480
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
497
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
514
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
535
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
554
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
573
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
592
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
1166
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
1190
await TestAsync<
LocalFunctionStatementSyntax
>(testText);
1210
await TestMissingAsync<
LocalFunctionStatementSyntax
>(testText);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenLocalFunctionTests.cs (8)
146
var
localFunction = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
5749
.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single())
5824
.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single())
5897
var localFunctions = syntaxTree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToList();
5905
void checkImplAttributes(
LocalFunctionStatementSyntax
localFunctionStatement, MethodImplAttributes expectedFlags)
6162
var
localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
5679
var
localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
Microsoft.CodeAnalysis.CSharp.Features (94)
AssignOutParametersAboveReturnCodeFixProvider.cs (1)
52
if (exprOrStatement is
LocalFunctionStatementSyntax
{ ExpressionBody: { } localFunctionExpressionBody })
AssignOutParametersAtStartCodeFixProvider.cs (1)
37
if (location is
LocalFunctionStatementSyntax
{ ExpressionBody: { } })
ChangeSignature\CSharpChangeSignatureService.cs (1)
320
if (updatedNode is
LocalFunctionStatementSyntax
localFunction)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (4)
47
var
localFunction = await context.TryGetRelevantNodeAsync<
LocalFunctionStatementSyntax
>().ConfigureAwait(false);
80
LocalFunctionStatementSyntax
localFunction,
283
MethodDeclarationSyntax method,
LocalFunctionStatementSyntax
localFunction)
Completion\CompletionProviders\AwaitCompletionProvider.cs (2)
48
LocalFunctionStatementSyntax
local => local.ReturnType.SpanStart,
70
if (parent is QualifiedNameSyntax { Parent:
LocalFunctionStatementSyntax
localFunction } qualifiedName &&
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
346
result = IsLastTokenOfType<
LocalFunctionStatementSyntax
>(token, semanticModel,
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
589
var
localFunctionDeclaration = SyntaxFactory.LocalFunctionStatement(
CSharpDeclareAsNullableCodeFixProvider.cs (1)
167
LocalFunctionStatementSyntax
localFunction =>
CSharpFixReturnTypeCodeFixProvider.cs (1)
153
LocalFunctionStatementSyntax
localFunction => (localFunction.ReturnType, localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword)),
CSharpMakeMethodAsynchronousCodeFixProvider.cs (3)
81
LocalFunctionStatementSyntax
localFunction => FixLocalFunction(keepVoid, methodSymbol, localFunction, knownTypes, cancellationToken),
99
private static
LocalFunctionStatementSyntax
FixLocalFunction(
102
LocalFunctionStatementSyntax
localFunction,
CSharpMakeMethodSynchronousCodeFixProvider.cs (2)
39
case
LocalFunctionStatementSyntax
localFunction: return FixLocalFunction(methodSymbol, localFunction, knownTypes);
52
private static SyntaxNode FixLocalFunction(IMethodSymbol methodSymbol,
LocalFunctionStatementSyntax
localFunction, KnownTypes knownTypes)
CSharpRemoveAsyncModifierCodeFixProvider.cs (2)
44
LocalFunctionStatementSyntax
localFunction => localFunction.WithBody(block).WithExpressionBody(null).WithSemicolonToken(default),
57
LocalFunctionStatementSyntax
localFunction => RemoveAsyncModifierHelpers.WithoutAsyncModifier(localFunction, localFunction.ReturnType),
CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (2)
56
.Select(t => t.GetAncestor<
LocalFunctionStatementSyntax
>());
58
foreach (
var
localFunction in localFunctions)
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
90
LocalFunctionStatementSyntax
localFunction => localFunction.ReturnType,
CSharpUseLocalFunctionCodeFixProvider.cs (2)
165
var
newLocalFunctionStatement = CreateLocalFunctionStatement(localDeclaration, anonymousFunction, delegateMethod, parameterList, makeStatic)
205
private static
LocalFunctionStatementSyntax
CreateLocalFunctionStatement(
EditAndContinue\BreakpointSpans.cs (2)
313
var
localFunction = (
LocalFunctionStatementSyntax
)node;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
629
if (root is
LocalFunctionStatementSyntax
localFunc)
1480
=> node is AnonymousFunctionExpressionSyntax or
LocalFunctionStatementSyntax
;
1807
var
lfd = (
LocalFunctionStatementSyntax
)node;
EditAndContinue\SyntaxComparer.cs (2)
1009
var
localFunction = (
LocalFunctionStatementSyntax
)nestedFunction;
EditAndContinue\SyntaxUtilities.cs (1)
279
LocalFunctionStatementSyntax
localFunction => localFunction.Modifiers.Any(SyntaxKind.AsyncKeyword),
ExtractMethod\CSharpMethodExtractor.cs (1)
72
if (currentNode is
LocalFunctionStatementSyntax
localFunction)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (6)
695
LocalFunctionStatementSyntax
localFunction => TweakNewLinesInMethod(localFunction),
709
private static
LocalFunctionStatementSyntax
TweakNewLinesInMethod(
LocalFunctionStatementSyntax
method)
759
var nodeIsMethodOrLocalFunction = syntaxNode is MethodDeclarationSyntax or
LocalFunctionStatementSyntax
;
771
var returnType = syntaxNode is MethodDeclarationSyntax method ? method.ReturnType : ((
LocalFunctionStatementSyntax
)syntaxNode).ReturnType;
782
LocalFunctionStatementSyntax
_ => true,
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (3)
39
var isMethodOrLocalFunction = method is MethodDeclarationSyntax or
LocalFunctionStatementSyntax
;
50
var isMethodOrLocalFunction = method is MethodDeclarationSyntax or
LocalFunctionStatementSyntax
;
144
LocalFunctionStatementSyntax
localFunctionDeclaration => (localFunctionDeclaration.Body, localFunctionDeclaration.ExpressionBody, localFunctionDeclaration.SemicolonToken),
ExtractMethod\CSharpSelectionResult.cs (1)
86
LocalFunctionStatementSyntax
)
ExtractMethod\CSharpSelectionResult.StatementResult.cs (1)
59
LocalFunctionStatementSyntax
or
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (1)
80
LocalFunctionStatementSyntax
localFunction => TryAddAsyncModifier(localFunction.Modifiers, spans),
InitializeParameter\InitializeParameterHelpers.cs (3)
23
or
LocalFunctionStatementSyntax
30
LocalFunctionStatementSyntax
localFunction => (SyntaxNode?)localFunction.Body ?? localFunction.ExpressionBody!,
39
LocalFunctionStatementSyntax
localFunction => localFunction.SemicolonToken,
IntroduceVariable\CSharpIntroduceVariableService.cs (2)
145
var
localFunction = expression.GetAncestor<
LocalFunctionStatementSyntax
>();
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (4)
272
case
LocalFunctionStatementSyntax
localFunction:
297
var
localFunction = block.GetAncestor<
LocalFunctionStatementSyntax
>();
390
var localFunctionIdentifiers = localFunctions.Select(node => ((
LocalFunctionStatementSyntax
)node).Identifier.ValueText);
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
72
case
LocalFunctionStatementSyntax
:
99
LocalFunctionStatementSyntax
or AccessorDeclarationSyntax or MemberDeclarationSyntax
LambdaUtilities.cs (7)
116
return GetLocalFunctionBody((
LocalFunctionStatementSyntax
)newLambda);
127
LocalFunctionStatementSyntax
localFunctionStatementSyntax => (CSharpSyntaxNode?)localFunctionStatementSyntax.Body ?? localFunctionStatementSyntax.ExpressionBody!.Expression,
156
var
localFunction = (
LocalFunctionStatementSyntax
)parent;
161
return arrowExpressionClause.Expression == node && arrowExpressionClause.Parent is
LocalFunctionStatementSyntax
;
350
lambdaBody1 = GetLocalFunctionBody((
LocalFunctionStatementSyntax
)node);
481
private static SyntaxNode GetLocalFunctionBody(
LocalFunctionStatementSyntax
localFunctionStatementSyntax)
MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeRefactoringProvider.cs (2)
33
var
localFunction = await context.TryGetRelevantNodeAsync<
LocalFunctionStatementSyntax
>().ConfigureAwait(false);
MakeLocalFunctionStaticCodeFixHelper.cs (4)
30
LocalFunctionStatementSyntax
localFunction,
43
LocalFunctionStatementSyntax
localFunction,
182
var
localFunctionWithNewParameters = (
LocalFunctionStatementSyntax
)info.Service.AddParameters(
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (2)
38
var
localFunction = (
LocalFunctionStatementSyntax
)context.Node;
MakeLocalFunctionStaticHelper.cs (5)
17
private static bool TryGetDataFlowAnalysis(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel, [NotNullWhen(returnValue: true)] out DataFlowAnalysis? dataFlow)
23
private static bool CanBeCalledFromStaticContext(
LocalFunctionStatementSyntax
localFunction, DataFlowAnalysis dataFlow)
30
static bool IsChildOrSelf(
LocalFunctionStatementSyntax
containingLocalFunction, ISymbol calledLocationFunction)
38
public static bool CanMakeLocalFunctionStaticBecauseNoCaptures(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel)
43
public static bool CanMakeLocalFunctionStaticByRefactoringCaptures(
LocalFunctionStatementSyntax
localFunction, SemanticModel semanticModel, out ImmutableArray<ISymbol> captures)
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (3)
69
Func<Document,
LocalFunctionStatementSyntax
, ImmutableArray<ISymbol>, Task> fixer,
81
.Select(d => root.FindNode(d.Location.SourceSpan).AncestorsAndSelf().OfType<
LocalFunctionStatementSyntax
>().FirstOrDefault())
91
foreach (
var
localFunction in localFunctions)
RemoveAsyncModifierHelpers.cs (1)
18
internal static SyntaxNode WithoutAsyncModifier(
LocalFunctionStatementSyntax
localFunction, TypeSyntax returnType)
UseExpressionBodyForLocalFunctionHelper.cs (11)
18
UseExpressionBodyHelper<
LocalFunctionStatementSyntax
>
35
protected override BlockSyntax GetBody(
LocalFunctionStatementSyntax
statement)
38
protected override ArrowExpressionClauseSyntax GetExpressionBody(
LocalFunctionStatementSyntax
statement)
41
protected override SyntaxToken GetSemicolonToken(
LocalFunctionStatementSyntax
statement)
44
protected override
LocalFunctionStatementSyntax
WithSemicolonToken(
LocalFunctionStatementSyntax
statement, SyntaxToken token)
47
protected override
LocalFunctionStatementSyntax
WithExpressionBody(
LocalFunctionStatementSyntax
statement, ArrowExpressionClauseSyntax expressionBody)
50
protected override
LocalFunctionStatementSyntax
WithBody(
LocalFunctionStatementSyntax
statement, BlockSyntax body)
54
SemanticModel semanticModel,
LocalFunctionStatementSyntax
statement)
UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
219
while (index + 1 < statements.Count && statements[index + 1] is
LocalFunctionStatementSyntax
)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (18)
IOperation\IOperationTests_ILocalFunctionStatement.cs (17)
49
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
77
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
105
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
140
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
181
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
217
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
266
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics, targetFramework: TargetFramework.Mscorlib46Extended);
295
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
331
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
365
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
404
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
436
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
468
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
503
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
547
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
640
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
703
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IParameterReferenceExpression.cs (1)
1119
VerifyOperationTreeAndDiagnosticsForTest<
LocalFunctionStatementSyntax
>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (55)
Semantics\InitOnlyMemberTests.cs (2)
4132
var
localFunctionSyntax = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
Semantics\LocalFunctionTests.cs (15)
493
var
localFunction = tree.GetRoot().DescendantNodes()
494
.OfType<
LocalFunctionStatementSyntax
>()
541
var
localFunction = tree.GetRoot().DescendantNodes()
542
.OfType<
LocalFunctionStatementSyntax
>()
805
var
localFunction = tree.GetRoot().DescendantNodes()
806
.OfType<
LocalFunctionStatementSyntax
>()
852
var
localFunction = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
968
var
localFunction = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
2373
LocalFunctionStatementSyntax
declaration = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().First();
2570
var exprs = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToImmutableArray();
5023
var
localDecl = (
LocalFunctionStatementSyntax
)tree.FindNodeOrTokenByKind(SyntaxKind.LocalFunctionStatement).AsNode();
Semantics\NullableReferenceTypesTests.cs (10)
63425
var
function1 = tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Last();
63429
var
function2 = tree2.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
94029
var localSyntaxes = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToArray();
95358
var localSyntaxes = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToArray();
108042
var localSyntaxes = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>();
108047
void verifyLocalFunction(
LocalFunctionStatementSyntax
localSyntax, string expectedName, string[] expectedConstraintTypes)
108096
var localSyntaxes = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>();
108100
void verifyLocalFunction(
LocalFunctionStatementSyntax
localSyntax, string expectedName, string[] expectedConstraintTypes)
Semantics\OutVarTests.cs (3)
36358
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Where(l => l.Identifier.ValueText == "M2").Single()));
36440
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Where(l => l.Identifier.ValueText == "M2").Single()));
36513
Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Where(l => l.Identifier.ValueText == "M2").Single()));
Semantics\RefFieldTests.cs (1)
10575
var decls = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToArray();
Semantics\TopLevelStatementsTests.cs (18)
235
var
localDecl = unit1.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
358
var
localDecl = unit2.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
2072
var
localDecl = tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
2236
var
localDecl = tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
4203
var
declarator = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
4498
var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single());
4504
var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().First());
4562
var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().First());
4566
var symbol2 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Skip(1).First());
4611
var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().First());
6074
var localFunctions = syntaxTree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToList();
6082
void checkImplAttributes(
LocalFunctionStatementSyntax
localFunctionStatement, MethodImplAttributes expectedFlags)
6148
.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single())
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (6)
326
var input = ctx.ForAttributeWithMetadataName<
LocalFunctionStatementSyntax
>("System.CLSCompliantAttribute");
335
step => Assert.True(step.Outputs.Single().Value is
LocalFunctionStatementSyntax
{ Identifier.ValueText: "LocalFunc" }));
362
var input = ctx.ForAttributeWithMetadataName<
LocalFunctionStatementSyntax
>("System.CLSCompliantAttribute");
371
step => Assert.True(step.Outputs.Single().Value is
LocalFunctionStatementSyntax
{ Identifier.ValueText: "LocalFunc" }));
401
var input = ctx.ForAttributeWithMetadataName<
LocalFunctionStatementSyntax
>("System.CLSCompliantAttribute");
410
step => Assert.True(step.Outputs.Single().Value is
LocalFunctionStatementSyntax
{ Identifier.ValueText: "LocalFunc" }));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (23)
Symbols\LocalFunctionTests.cs (7)
34
var
localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
55
var
localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
76
var
localSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
99
var localsSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ToArray();
Symbols\Source\NullablePublicAPITests.cs (16)
568
return syntaxTree.GetRoot().DescendantNodes().OfType<CSharp.Syntax.
LocalFunctionStatementSyntax
>().Select(func => semanticModel.GetDeclaredSymbol(func)).Cast<IMethodSymbol>().ToArray();
3665
var
localFunction = lambda.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
3698
var
localFunctionBody = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
3877
var
localFunction = lambda.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
4063
var
localFunction = root.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
4118
var
localFunction = lambda.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
4180
var
localFunction = lambda.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().First();
4182
var nestedLocalFunction = (IMethodSymbol)model.GetDeclaredSymbol(lambda.DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().ElementAt(1));
4934
var
localFunction = tree.GetRoot().DescendantNodes().OfType<
LocalFunctionStatementSyntax
>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Generated\Syntax.Test.xml.Generated.cs (5)
10304
private static
LocalFunctionStatementSyntax
GenerateLocalFunctionStatement()
11949
var
node = GenerateLocalFunctionStatement();
11961
var
newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithIdentifier(node.Identifier).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
16505
var
oldNode = GenerateLocalFunctionStatement();
16521
var
oldNode = GenerateLocalFunctionStatement();
Parsing\LocalFunctionParsingTests.cs (6)
1297
var
s1 = Assert.IsType<
LocalFunctionStatementSyntax
>(m.Body.Statements[0]);
1301
s1 = Assert.IsType<
LocalFunctionStatementSyntax
>(m.Body.Statements[0]);
1349
var
s1 = Assert.IsType<
LocalFunctionStatementSyntax
>(m.Body.Statements[0]);
1359
s1 = Assert.IsType<
LocalFunctionStatementSyntax
>(m2.Body.Statements[0]);
Parsing\ParserErrorMessageTests.cs (3)
3852
var
localFunctionStatement = (
LocalFunctionStatementSyntax
)tree.GetRoot().DescendantNodes().Single(node => node is
LocalFunctionStatementSyntax
);
Syntax\SyntaxNodeTests.cs (2)
3259
var
method = (
LocalFunctionStatementSyntax
)((GlobalStatementSyntax)root.Members[0]).Statement;
Microsoft.CodeAnalysis.CSharp.Workspaces (36)
Classification\ClassificationHelpers.cs (1)
220
else if (token.Parent is
LocalFunctionStatementSyntax
localFunctionStatement && localFunctionStatement.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (8)
1651
LocalFunctionStatementSyntax
localFunc => localFunc.WithModifiers(modifiers),
2230
return ((
LocalFunctionStatementSyntax
)declaration).WithParameterList((ParameterListSyntax)list);
2294
var
local = (
LocalFunctionStatementSyntax
)declaration;
2350
var
local = (
LocalFunctionStatementSyntax
)declaration;
2480
return ((
LocalFunctionStatementSyntax
)declaration).Body?.Statements ?? s_EmptyList;
2516
return ((
LocalFunctionStatementSyntax
)declaration).WithBody(somebody).WithSemicolonToken(semicolon).WithExpressionBody(null);
CSharpAccessibilityFacts.cs (1)
314
LocalFunctionStatementSyntax
localFunc => localFunc.Modifiers,
CSharpCodeGenerationService.cs (3)
492
else if (destinationMember is
LocalFunctionStatementSyntax
localFunctionStatement)
591
TDeclarationNode destinationMember, IEnumerable<SyntaxNode> statements,
LocalFunctionStatementSyntax
localFunctionStatement) where TDeclarationNode : SyntaxNode
603
var
finalMember = localFunctionStatement
CSharpHeaderFacts.cs (2)
79
var
node = TryGetAncestorForLocation<
LocalFunctionStatementSyntax
>(root, position);
CSharpMoveDeclarationNearReferenceService.cs (1)
35
LocalFunctionStatementSyntax
or
ElasticTriviaFormattingRule.cs (1)
462
else if (currentToken.Parent is
LocalFunctionStatementSyntax
)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
185
if (node.AsNode() is
LocalFunctionStatementSyntax
localFunction)
501
private static string GetMethodSuffix(
LocalFunctionStatementSyntax
method)
ILocalSymbolExtensions.cs (3)
18
var
localFunctionStatement = destinationBlock.FirstAncestorOrSelf<
LocalFunctionStatementSyntax
>();
38
case
LocalFunctionStatementSyntax
localFunctionStatement:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (3)
169
SyntaxKind.LocalFunctionStatement => ((
LocalFunctionStatementSyntax
)declaration).ParameterList,
870
LocalFunctionStatementSyntax
localFunction => localFunction.Modifiers,
883
case
LocalFunctionStatementSyntax
localFunction: return localFunction.WithModifiers(modifiers);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
504
targetToken.GetAncestors<
LocalFunctionStatementSyntax
>().Any(f => f.GetModifiers().Any(SyntaxKind.UnsafeKeyword)));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ExpressionSyntaxExtensions.cs\ExpressionSyntaxExtensions.cs (1)
170
if (name.IsFoundUnder<
LocalFunctionStatementSyntax
>(d => d.ReturnType) ||
MethodGenerator.cs (8)
89
public static
LocalFunctionStatementSyntax
GenerateLocalFunctionDeclaration(
95
var
reusableSyntax = GetReuseableSyntaxNodeForSymbol<
LocalFunctionStatementSyntax
>(method, info);
101
var
declaration = GenerateLocalFunctionDeclarationWorker(
137
private static
LocalFunctionStatementSyntax
GenerateLocalFunctionDeclarationWorker(
141
var
localFunctionDeclaration = SyntaxFactory.LocalFunctionStatement(
174
private static
LocalFunctionStatementSyntax
UseExpressionBodyIfDesired(
175
CSharpCodeGenerationContextInfo info,
LocalFunctionStatementSyntax
localFunctionDeclaration)
SuppressFormattingRule.cs (1)
212
LocalFunctionStatementSyntax
)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
3201
var
local = SyntaxFactory.LocalFunctionStatement(SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword)), "p");
3237
var
local = SyntaxFactory.LocalFunctionStatement(SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword)), "p");