105 references to WhileStatementSyntax
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Statements.cs (2)
85result = BindWhile((WhileStatementSyntax)node, diagnostics); 2755private BoundStatement BindWhile(WhileStatementSyntax node, BindingDiagnosticBag diagnostics)
Binder\LocalBinderFactory.cs (1)
575public override void VisitWhileStatement(WhileStatementSyntax node)
Binder\WhileBinder.cs (3)
30var node = (WhileStatementSyntax)_syntax; 56condition = ((WhileStatementSyntax)_syntax).Condition;
Lowering\Instrumentation\DebugInfoInjector.cs (2)
253WhileStatementSyntax whileSyntax = (WhileStatementSyntax)original.Syntax;
Parser\LanguageParser.cs (1)
10007private WhileStatementSyntax ParseWhileStatement(SyntaxList<AttributeListSyntax> attributes)
Syntax\LookupPosition.cs (2)
361return ((WhileStatementSyntax)statement).WhileKeyword; 437return GetFirstExcludedToken(((WhileStatementSyntax)statement).Statement);
Syntax\WhileStatementSyntax.cs (2)
11public WhileStatementSyntax Update(SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement) 20public static WhileStatementSyntax WhileStatement(SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement)
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (2)
170var whileStatement = (WhileStatementSyntax)current;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
145(nodeParent is WhileStatementSyntax whileStatement && whileStatement.Condition == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
125WhileStatementSyntax; 140WhileStatementSyntax n => n.Statement, 707WhileStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
293WhileStatementSyntax whileStatement => whileStatement.CloseParenToken.Equals(token), 365WhileStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
313if (node is WhileStatementSyntax whileStatement && whileStatement.Statement != null && !(whileStatement.Statement is BlockSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpHeaderFacts.cs (1)
120var node = TryGetAncestorForLocation<WhileStatementSyntax>(root, position);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
38WhileStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
184WhileStatementSyntax whileStatement => InferTypeInWhileStatement(whileStatement), 251WhileStatementSyntax whileStatement => InferTypeInWhileStatement(whileStatement, token), 2377private IEnumerable<TypeInferenceInfo> InferTypeInWhileStatement(WhileStatementSyntax whileStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
328or WhileStatementSyntax
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (4)
151WhileStatementSyntax or ForEachStatementSyntax or ForStatementSyntax or LockStatementSyntax or UsingStatementSyntax 483WhileStatementSyntax whileStatementNode => ShouldAddBraceForWhileStatement(whileStatementNode, caretPosition), 727private static bool ShouldAddBraceForWhileStatement(WhileStatementSyntax whileStatementNode, int caretPosition) 949WhileStatementSyntax whileStatementNode => whileStatementNode.WithStatement(block),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\OutVarTests.cs (2)
16534var statement = (WhileStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests_Scope.cs (2)
7207var statement = (WhileStatementSyntax)SyntaxFactory.ParseStatement(@"
Microsoft.CodeAnalysis.CSharp.Features (27)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
44public override void VisitWhileStatement(WhileStatementSyntax node)
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
298AddLastStatementOfConstruct((statement as WhileStatementSyntax).Statement);
EditAndContinue\BreakpointSpans.cs (2)
607var whileStatement = (WhileStatementSyntax)statement;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (6)
820return AreEquivalentActiveStatements((WhileStatementSyntax)oldStatement, (WhileStatementSyntax)newStatement); 855private static bool AreEquivalentActiveStatements(WhileStatementSyntax oldNode, WhileStatementSyntax newNode) 1813var whileStatement = (WhileStatementSyntax)node;
EditAndContinue\SyntaxComparer.cs (4)
863var leftWhile = (WhileStatementSyntax)leftNode; 864var rightWhile = (WhileStatementSyntax)rightNode;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
262public override SyntaxNode VisitWhileStatement(WhileStatementSyntax node)
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
39WhileStatementSyntax; 73WhileStatementSyntax;
Highlighting\KeywordHighlighters\LoopHighlighter.cs (2)
51case WhileStatementSyntax whileStatement: 72private static void HighlightWhileStatement(WhileStatementSyntax statement, List<TextSpan> spans)
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
77case WhileStatementSyntax: 102CommonForEachStatementSyntax or DoStatementSyntax or WhileStatementSyntax or ForStatementSyntax
Snippets\CSharpWhileLoopSnippetProvider.cs (4)
21internal sealed class CSharpWhileLoopSnippetProvider() : AbstractWhileLoopSnippetProvider<WhileStatementSyntax, ExpressionSyntax> 30protected override ExpressionSyntax GetCondition(WhileStatementSyntax node) 33protected override int GetTargetCaretPosition(WhileStatementSyntax whileStatement, SourceText sourceText) 39protected override Task<Document> AddIndentationToDocumentAsync(Document document, WhileStatementSyntax whileStatement, CancellationToken cancellationToken)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (2)
170var whileStatement = (WhileStatementSyntax)current;
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (20)
IOperation\IOperationTests_IBranchOperation.Extensions.cs (1)
70AssertOuterIsCorrespondingLoopOfInner<WhileStatementSyntax, ContinueStatementSyntax>(@"
IOperation\IOperationTests_IWhileUntilLoopStatement.cs (19)
122VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 188VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 269VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 347VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 417VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 448VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 509VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 573VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 638VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 671VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 736VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 827VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 930VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1001VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1047VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1084VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1120VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1194VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree); 1294VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10607private static WhileStatementSyntax GenerateWhileStatement() 12464var node = GenerateWhileStatement(); 12472var newNode = node.WithAttributeLists(node.AttributeLists).WithWhileKeyword(node.WhileKeyword).WithOpenParenToken(node.OpenParenToken).WithCondition(node.Condition).WithCloseParenToken(node.CloseParenToken).WithStatement(node.Statement); 17375var oldNode = GenerateWhileStatement(); 17391var oldNode = GenerateWhileStatement();
Parsing\StatementParsingTests.cs (2)
1478var ws = (WhileStatementSyntax)statement;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
LocalVariableDeclaratorsCollector.cs (1)
66public override void VisitWhileStatement(WhileStatementSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
145(nodeParent is WhileStatementSyntax whileStatement && whileStatement.Condition == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
125WhileStatementSyntax; 140WhileStatementSyntax n => n.Statement, 707WhileStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (2)
293WhileStatementSyntax whileStatement => whileStatement.CloseParenToken.Equals(token), 365WhileStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
313if (node is WhileStatementSyntax whileStatement && whileStatement.Statement != null && !(whileStatement.Statement is BlockSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpHeaderFacts.cs (1)
120var node = TryGetAncestorForLocation<WhileStatementSyntax>(root, position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
38WhileStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
184WhileStatementSyntax whileStatement => InferTypeInWhileStatement(whileStatement), 251WhileStatementSyntax whileStatement => InferTypeInWhileStatement(whileStatement, token), 2377private IEnumerable<TypeInferenceInfo> InferTypeInWhileStatement(WhileStatementSyntax whileStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
697VerifySyntax<WhileStatementSyntax>( 702VerifySyntax<WhileStatementSyntax>(