192 references to ReturnStatementSyntax
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
183if (getter.Body is { Statements: { Count: 1 } } && getter.Body.Statements[0] is ReturnStatementSyntax returnStatement)
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_Statements.cs (2)
101result = BindReturn((ReturnStatementSyntax)node, diagnostics); 2984private BoundStatement BindReturn(ReturnStatementSyntax syntax, BindingDiagnosticBag diagnostics)
Binder\ExpressionVariableFinder.cs (1)
183public override void VisitReturnStatement(ReturnStatementSyntax node)
Binder\LocalBinderFactory.cs (1)
963public override void VisitReturnStatement(ReturnStatementSyntax node)
FlowAnalysis\DataFlowsInWalker.cs (1)
121if (node != null && node is ReturnStatementSyntax && RegionContains(node.Span))
FlowAnalysis\DataFlowsOutWalker.cs (1)
266if (!_dataFlowsOut.Contains(parameter) && (node == null || node is ReturnStatementSyntax))
Parser\LanguageParser.cs (1)
9614private ReturnStatementSyntax ParseReturnStatement(SyntaxList<AttributeListSyntax> attributes)
Syntax\LookupPosition.cs (2)
349return ((ReturnStatementSyntax)statement).ReturnKeyword; 412return ((ReturnStatementSyntax)statement).SemicolonToken;
Syntax\ReturnStatementSyntax.cs (2)
11public ReturnStatementSyntax Update(SyntaxToken returnKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 20public static ReturnStatementSyntax ReturnStatement(SyntaxToken returnKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken)
Syntax\SyntaxFacts.cs (1)
616node.DescendantNodesAndSelf(child => !IsNestedFunction(child) && !(node is ExpressionSyntax)).Any(n => n is ReturnStatementSyntax { Expression: { } });
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
272public override SyntaxKind VisitReturnStatement(ReturnStatementSyntax node)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
311if (statement is ReturnStatementSyntax { Expression: { } expression })
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
212accessorDeclaration.ExpressionBody?.Expression ?? GetSingleStatementFromAccessor<ReturnStatementSyntax>(accessorDeclaration)?.Expression,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
416if (locallyScopedExpression.Parent is ReturnStatementSyntax or ArrowExpressionClauseSyntax) 620ReturnStatementSyntax => true,
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
236if (nextStatement is ReturnStatementSyntax returnStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
189else if (firstStatement is ReturnStatementSyntax returnStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
137(nodeParent is ReturnStatementSyntax returnStatement && returnStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
269=> ((ReturnStatementSyntax)node).Expression;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
277public override ExpressionSyntax VisitReturnStatement(ReturnStatementSyntax node)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
67var returnedValue = node is ReturnStatementSyntax returnStatement ? returnStatement.Expression : node;
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
47if (node is not ReturnStatementSyntax returnStatement)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
24internal sealed partial class CSharpRemoveAsyncModifierCodeFixProvider() : AbstractRemoveAsyncModifierCodeFixProvider<ReturnStatementSyntax, ExpressionSyntax>
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
54if (returnOperation.Syntax is ReturnStatementSyntax { Expression: CheckedExpressionSyntax exp })
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
175ReturnStatementSyntax returnStatement => InferTypeForReturnStatement(returnStatement), 241ReturnStatementSyntax returnStatement => InferTypeForReturnStatement(returnStatement, token), 2006ReturnStatementSyntax returnStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
42var statement = root.DescendantNodes().Single(n => n is ReturnStatementSyntax); 76var statement = root.DescendantNodes().Single(n => n is ReturnStatementSyntax); 83var replacement = (ReturnStatementSyntax)g.ReturnStatement(g.NameOfExpression(g.IdentifierName("M")));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\NumericIntPtrTests.cs (2)
6009var expr = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 10547var returnStatements = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().ToArray();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (24)
FirstClassSpanTests.cs (1)
2731var arg = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\CollectionExpressionTests.cs (6)
14300var returnValue = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14376var returnValue = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14512var cast = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 14636var cast = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Last().Expression; 26796var operation = VerifyOperationTreeForTest<ReturnStatementSyntax>(comp, 26858var operation = VerifyOperationTreeForTest<ReturnStatementSyntax>(comp,
Semantics\OutVarTests.cs (3)
1285var containingReturnOrThrow = containingStatement as ReturnStatementSyntax ?? (StatementSyntax)(containingStatement as ThrowStatementSyntax); 13336var statement = (ReturnStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests_Scope.cs (2)
708var statement = (ReturnStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests2.cs (8)
2020var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 2022var modifiedReturnStatement = (ReturnStatementSyntax)new RemoveAliasQualifiers().Visit(returnStatement); 2061var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 2063var modifiedReturnStatement = (ReturnStatementSyntax)new RemoveAliasQualifiers().Visit(returnStatement);
Semantics\PrimaryConstructorTests.cs (2)
2173Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 2325Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart,
Semantics\RecordTests.cs (2)
22285Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, 22437Assert.False(model.TryGetSpeculativeSemanticModel(tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart,
Microsoft.CodeAnalysis.CSharp.Features (29)
CodeRefactorings\InlineMethod\CSharpInlineMethodRefactoringProvider.cs (1)
43ReturnStatementSyntax returnStatementSyntax => returnStatementSyntax.Expression,
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (1)
109ForEachInfo.ForEachStatement.GetNextStatement() is ReturnStatementSyntax returnStatement &&
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
229return TryConvertIfInReturnStatement((ReturnStatementSyntax)parent, queryExpressionProcessingInfo, out documentUpdateInfo); 729ReturnStatementSyntax returnStatement, 754if (memberDeclarationNode.DescendantNodes().OfType<ReturnStatementSyntax>().Count() == 1)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
26public override void VisitReturnStatement(ReturnStatementSyntax node)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2822return ((ReturnStatementSyntax)statement).Expression!;
ExtractMethod\CSharpMethodExtractor.Analyzer.cs (1)
53=> jumpOutOfRegionStatements.Where(n => n is ReturnStatementSyntax).Any();
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
300if (statements is [ReturnStatementSyntax { Expression: null }])
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
234if (statements.ElementAtOrDefault(0) is not LocalDeclarationStatementSyntax declaration || statements.ElementAtOrDefault(1) is not ReturnStatementSyntax returnStatement)
ExtractMethod\CSharpSelectionValidator.cs (3)
446=> jumpsOutOfRegion.Where(n => n is not ReturnStatementSyntax).Any(); 450var returnStatements = jumpsOutOfRegion.Where(s => s is ReturnStatementSyntax); 468if (returnStatements.Cast<ReturnStatementSyntax>().Any(r => r.Expression != null))
ExtractMethod\CSharpSelectionValidator.Validator.cs (1)
67ReturnStatementSyntax or
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
86if (body is ReturnStatementSyntax returnStatement)
Highlighting\KeywordHighlighters\ReturnStatementHighlighter.cs (3)
22internal class ReturnStatementHighlighter : AbstractKeywordHighlighter<ReturnStatementSyntax> 31ReturnStatementSyntax returnStatement, List<TextSpan> spans, CancellationToken cancellationToken) 52case ReturnStatementSyntax statement:
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
272public override SyntaxKind VisitReturnStatement(ReturnStatementSyntax node)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
311if (statement is ReturnStatementSyntax { Expression: { } expression })
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
212accessorDeclaration.ExpressionBody?.Expression ?? GetSingleStatementFromAccessor<ReturnStatementSyntax>(accessorDeclaration)?.Expression,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
416if (locallyScopedExpression.Parent is ReturnStatementSyntax or ArrowExpressionClauseSyntax) 620ReturnStatementSyntax => true,
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
236if (nextStatement is ReturnStatementSyntax returnStatement)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
277public override ExpressionSyntax VisitReturnStatement(ReturnStatementSyntax node)
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
67var returnedValue = node is ReturnStatementSyntax returnStatement ? returnStatement.Expression : node;
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
47if (node is not ReturnStatementSyntax returnStatement)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
24internal sealed partial class CSharpRemoveAsyncModifierCodeFixProvider() : AbstractRemoveAsyncModifierCodeFixProvider<ReturnStatementSyntax, ExpressionSyntax>
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
54if (returnOperation.Syntax is ReturnStatementSyntax { Expression: CheckedExpressionSyntax exp })
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (21)
IOperation\IOperationTests_IConversionExpression.cs (7)
3185VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics, 3217VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics, 5015VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 5047VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 5080VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 5332public static SyntaxNode ReturnStatementSelector(SyntaxNode syntaxNode) => ((ReturnStatementSyntax)syntaxNode).Expression; 5402case ReturnStatementSyntax _:
IOperation\IOperationTests_IParenthesized.cs (9)
81VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 125VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 173VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 217VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 298VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 345VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 385VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 456VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 501VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IReturnStatement.cs (3)
38VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 61VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics); 140VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_IUtf8StringOperation.cs (2)
36VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics, targetFramework: Roslyn.Test.Utilities.TargetFramework.NetCoreApp); 101VerifyOperationTreeAndDiagnosticsForTest<ReturnStatementSyntax>(source, expectedOperationTree, expectedDiagnostics, targetFramework: Roslyn.Test.Utilities.TargetFramework.NetCoreApp);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (26)
Semantics\ExpressionBodiedMemberTests.cs (4)
711var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 742var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 777var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 808var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\NativeIntegerTests.cs (1)
9495var expr = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\NullableContextTests.cs (4)
350var syntax = syntaxTree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Skip(1).Single(); 1771var returnStatements = syntaxTree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().ToArray(); 1773var syntax = returnStatements[0];
Semantics\NullableReferenceTypesTests.cs (2)
13511var returnStatement = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Skip(1).Single();
Semantics\RecordStructTests.cs (2)
2307var x = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 2331var x = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Semantics\Utf8StringsLiteralsTests.cs (13)
2970var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 2998var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3026var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3054var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3082var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3110var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3138var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3166var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3194var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3222var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3250var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3278var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression; 3306var node = tree.GetCompilationUnitRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
Compilation\SemanticModelAPITests.cs (5)
2313var statementSyntax = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 3786var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3788var @return = (ReturnStatementSyntax)SyntaxFactory.ParseStatement("return s;");
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (3)
4446var lookupSymbols = model.LookupSymbols(conversionDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.ImplicitConversionName); 4477var lookupSymbols = model.LookupSymbols(conversionDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.ExplicitConversionName); 4508var lookupSymbols = model.LookupSymbols(operatorDecl.DescendantNodes().OfType<ReturnStatementSyntax>().Single().SpanStart, name: WellKnownMemberNames.AdditionOperatorName);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1746var returnExpression = mDeclSyntax.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!;
Symbols\Source\NullablePublicAPITests.cs (8)
1441var returnStatement = root.DescendantNodes().OfType<ReturnStatementSyntax>().Single(); 3698var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3700var @return = (ReturnStatementSyntax)SyntaxFactory.ParseStatement("return s;"); 3733var typeInfo = model.GetTypeInfo(localFunctionBody.DescendantNodes().OfType<ReturnStatementSyntax>().Single().Expression!); 3735var @return = (ReturnStatementSyntax)SyntaxFactory.ParseStatement("return s;");
Symbols\StaticAbstractMembersInInterfacesTests.cs (4)
30280var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().First(); 30937var node = tree.GetRoot().DescendantNodes().OfType<ReturnStatementSyntax>().First();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (19)
Generated\Syntax.Test.xml.Generated.cs (5)
10598private static ReturnStatementSyntax GenerateReturnStatement() 12424var node = GenerateReturnStatement(); 12430var newNode = node.WithAttributeLists(node.AttributeLists).WithReturnKeyword(node.ReturnKeyword).WithExpression(node.Expression).WithSemicolonToken(node.SemicolonToken); 17297var oldNode = GenerateReturnStatement(); 17313var oldNode = GenerateReturnStatement();
Parsing\LocalFunctionParsingTests.cs (2)
1367var s2 = Assert.IsType<ReturnStatementSyntax>(s1.Body.Statements.Single());
Parsing\StatementParsingTests.cs (4)
1104var rs = (ReturnStatementSyntax)statement; 1124var rs = (ReturnStatementSyntax)statement;
Syntax\ChildSyntaxListTests.cs (4)
20var node1 = SyntaxFactory.ReturnStatement(); 21var node2 = SyntaxFactory.ReturnStatement(); 30var node1 = SyntaxFactory.ReturnStatement(); 31var node2 = SyntaxFactory.ReturnStatement();
Syntax\SyntaxListTests.cs (2)
27var node1 = SyntaxFactory.ReturnStatement(); 28var node2 = SyntaxFactory.ReturnStatement();
Syntax\SyntaxTokenListTests.cs (2)
21var node1 = SyntaxFactory.ReturnStatement(); 37var node1 = SyntaxFactory.ReturnStatement();
Microsoft.CodeAnalysis.CSharp.Workspaces (8)
Simplification\CSharpSimplificationService.Expander.cs (2)
131public override SyntaxNode VisitReturnStatement(ReturnStatementSyntax node) 135if (newNode is ReturnStatementSyntax newReturnStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
189else if (firstStatement is ReturnStatementSyntax returnStatement)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
137(nodeParent is ReturnStatementSyntax returnStatement && returnStatement.Expression == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
269=> ((ReturnStatementSyntax)node).Expression;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
175ReturnStatementSyntax returnStatement => InferTypeForReturnStatement(returnStatement), 241ReturnStatementSyntax returnStatement => InferTypeForReturnStatement(returnStatement, token), 2006ReturnStatementSyntax returnStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
538VerifySyntax<ReturnStatementSyntax>(Generator.ReturnStatement(), "return;"); 539VerifySyntax<ReturnStatementSyntax>(Generator.ReturnStatement(Generator.IdentifierName("x")), "return x;");
Mvc.Api.Analyzers.Test (6)
ActualApiResponseMetadataFactoryTest.cs (6)
78var returnStatement = methodSyntax.DescendantNodes().OfType<ReturnStatementSyntax>().First(); 395var returnStatement = methodSyntax.DescendantNodes().OfType<ReturnStatementSyntax>().First(); 414var returnStatement = methodSyntax.DescendantNodes().OfType<ReturnStatementSyntax>().First();