75 references to VariableDeclaration
Microsoft.CodeAnalysis.CSharp (14)
_generated\1\Syntax.xml.Internal.Generated.cs (4)
30738var cached = CSharpSyntaxNodeCache.TryGetNode((int)SyntaxKind.VariableDeclaration, type, variables.Node, this.context, out hash); 30741var result = new VariableDeclarationSyntax(SyntaxKind.VariableDeclaration, type, variables.Node, this.context); 36137var cached = SyntaxNodeCache.TryGetNode((int)SyntaxKind.VariableDeclaration, type, variables.Node, out hash); 36140var result = new VariableDeclarationSyntax(SyntaxKind.VariableDeclaration, type, variables.Node);
_generated\2\Syntax.xml.Syntax.Generated.cs (1)
6584/// <item><description><see cref="SyntaxKind.VariableDeclaration"/></description></item>
Binder\Binder_Expressions.cs (1)
4732if (!variableDeclaration.IsKind(SyntaxKind.VariableDeclaration))
Binder\Binder_Statements.cs (1)
795declarationNode.Kind() == SyntaxKind.VariableDeclaration ||
Binder\UsingStatementBinder.cs (1)
93bool isExpression = !isUsingDeclaration && syntax.Kind() != SyntaxKind.VariableDeclaration;
Compilation\MemberSemanticModel.cs (1)
2275Debug.Assert(parent.Kind() == SyntaxKind.VariableDeclaration);
Parser\LanguageParser.cs (2)
5465if (parent != null && (parent.Kind() == SyntaxKind.VariableDeclaration || parent.Kind() == SyntaxKind.LocalDeclarationStatement)) 5485&& (oldKind = GetOldParent(old).Kind()) != SyntaxKind.VariableDeclaration // or in a method body
Syntax\SyntaxFacts.cs (2)
128case VariableDeclaration: 353if (current == null || !current.IsKind(VariableDeclaration)) return false;
Syntax\SyntaxNodeExtensions.cs (1)
175variableDeclarator.Parent.IsKind(SyntaxKind.VariableDeclaration);
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
43HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
137case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
235type.Parent.Parent.Parent.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) && 296if (type.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
223token.Parent.IsKind(SyntaxKind.VariableDeclaration);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
42case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
38if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 61Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
886case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1808if (parent.IsParentKind(SyntaxKind.VariableDeclaration) && 2086equalsValue.Parent.IsParentKind(SyntaxKind.VariableDeclaration)) 2355if (type.IsParentKind(SyntaxKind.VariableDeclaration) &&
Microsoft.CodeAnalysis.CSharp.Features (15)
CodeLens\CSharpCodeLensDisplayInfoService.cs (1)
53case SyntaxKind.VariableDeclaration:
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
41Debug.Assert(declaration.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
463SyntaxKind.VariableDeclaration or
EditAndContinue\BreakpointSpans.cs (1)
267case SyntaxKind.VariableDeclaration:
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (5)
136Debug.Assert(current.Parent.IsKind(SyntaxKind.VariableDeclaration)); 240case SyntaxKind.VariableDeclaration: 1670case SyntaxKind.VariableDeclaration: 2048case SyntaxKind.VariableDeclaration: 2807case SyntaxKind.VariableDeclaration:
EditAndContinue\SyntaxComparer.cs (3)
547case SyntaxKind.VariableDeclaration: 660case SyntaxKind.VariableDeclaration: 1452case SyntaxKind.VariableDeclaration:
src\roslyn\src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
43HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
137case SyntaxKind.VariableDeclaration:
Microsoft.CodeAnalysis.CSharp.Workspaces (22)
CodeGeneration\CSharpSyntaxGenerator.cs (12)
739case SyntaxKind.VariableDeclaration: 1278case SyntaxKind.VariableDeclaration: 1322SyntaxKind.VariableDeclaration => ((VariableDeclarationSyntax)declaration).Variables.Count, 1967case SyntaxKind.VariableDeclaration: 2129case SyntaxKind.VariableDeclaration: 2161SyntaxKind.VariableDeclaration => ((VariableDeclarationSyntax)declaration).WithType((TypeSyntax)type), 2172case SyntaxKind.VariableDeclaration: 2237case SyntaxKind.VariableDeclaration: 2563case SyntaxKind.VariableDeclaration: 2603case SyntaxKind.VariableDeclaration: 2968case SyntaxKind.VariableDeclaration: 3109SyntaxKind.VariableDeclaration => ((VariableDeclarationSyntax)declaration).Variables,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
235type.Parent.Parent.Parent.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) && 296if (type.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
223token.Parent.IsKind(SyntaxKind.VariableDeclaration);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
42case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
38if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 61Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
886case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1808if (parent.IsParentKind(SyntaxKind.VariableDeclaration) && 2086equalsValue.Parent.IsParentKind(SyntaxKind.VariableDeclaration)) 2355if (type.IsParentKind(SyntaxKind.VariableDeclaration) &&
Microsoft.ML.InternalCodeAnalyzer (1)
SingleVariableDeclarationAnalyzer.cs (1)
37context.RegisterSyntaxNodeAction(Analyze, SyntaxKind.VariableDeclaration);
Roslyn.Diagnostics.CSharp.Analyzers (10)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (2)
235type.Parent.Parent.Parent.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) && 296if (type.IsParentKind(SyntaxKind.VariableDeclaration, out variableDeclaration) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
223token.Parent.IsKind(SyntaxKind.VariableDeclaration);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
42case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
38if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 61Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
886case SyntaxKind.VariableDeclaration:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
1808if (parent.IsParentKind(SyntaxKind.VariableDeclaration) && 2086equalsValue.Parent.IsParentKind(SyntaxKind.VariableDeclaration)) 2355if (type.IsParentKind(SyntaxKind.VariableDeclaration) &&