Implemented interface member:
395 references to Count
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
40&& modifiers is { Count: > 1 }
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
69for (var i = 0; i < node.Modifiers.Count; i++)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
69for (var i = 0; i < node.Modifiers.Count; i++)
Microsoft.CodeAnalysis (17)
Syntax\SyntaxListBuilder.cs (1)
139this.AddRange(list, 0, list.Count);
Syntax\SyntaxTokenList.cs (11)
124/// <paramref name="index" /> is less than 0.-or-<paramref name="index" /> is equal to or greater than <see cref="Count" />. </exception> 231return this[this.Count - 1]; 257Debug.Assert(this.Count >= offset + count); 285for (int i = 0, n = this.Count; i < n; i++) 299for (int i = 0, n = this.Count; i < n; i++) 316return Insert(this.Count, token); 325return InsertRange(this.Count, tokens); 350if (index < 0 || index > this.Count) 383if (index < 0 || index >= this.Count) 400if (index >= 0 && index <= this.Count) 431if (index >= 0 && index <= this.Count)
Syntax\SyntaxTokenList.Enumerator.cs (1)
65_count = list.Count;
Syntax\SyntaxTokenList.Reversed.cs (3)
36if (_list.Count == 0) 46if (_list.Count == 0) 90_count = list.Count;
Syntax\SyntaxTokenListBuilder.cs (1)
48this.Add(list, 0, list.Count);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
25if (modifiers.Count >= 2)
Microsoft.CodeAnalysis.CSharp (14)
CSharpExtensions.cs (5)
263if (index < 0 || index > list.Count) 273if (list.Count == 0) 279var builder = new SyntaxTokenListBuilder(list.Count + items.Length); 287if (index < list.Count) 289builder.Add(list, index, list.Count - index);
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (1)
58if (startOpt.Count > 0)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
39for (int i = 0; i < modifiers.Count; i++) 45if (modifiers.Count > i + 1 && modifiers[i + 1].Kind() == SyntaxKind.ReadOnlyKeyword)
Symbols\Source\ModifierUtils.cs (3)
391for (int i = 0; i < modifiers.Count; i++) 409var isLast = i == modifiers.Count - 1; 410var isPartialAsyncMethod = isOrdinaryMethod && i == modifiers.Count - 2 && modifiers[i + 1].ContextualKind() is SyntaxKind.AsyncKeyword;
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
218if (modifiers.Count > 0)
Syntax\CSharpSyntaxRewriter.cs (1)
254var count = list.Count;
Syntax\SyntaxReplacer.cs (1)
471if (index >= 0 && index < list.Count)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
56if (structure.Tokens.Count != 1)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
42if (modifiers.Count > 1)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
51if (tokens.Count == 1)
Microsoft.CodeAnalysis.CSharp.Features (12)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
592for (var i = modifiers.Count - 1; i >= 0; i--)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (2)
84var lastIndex = tokens.Count; 91if (lastIndex == tokens.Count)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (2)
287if (textTokens.Count != 1 && string.IsNullOrWhiteSpace(firstTextToken.ValueText)) 294existingCommentText = textTokens.Count == 1 ? "" : firstTextToken.ValueText;
EditAndContinue\BreakpointSpans.cs (1)
126if (startOpt.Count > 0)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1940=> TextSpan.FromBounds((modifiers.Count != 0) ? modifiers.First().SpanStart : start.SpanStart, end.Span.End);
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
168if (declarationStatement.Modifiers.Count > 0 ||
Organizing\Organizers\ModifiersOrganizer.cs (1)
19if (modifiers.Count > 1 && !modifiers.SpansPreprocessorDirective())
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
56if (structure.Tokens.Count != 1)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
42if (modifiers.Count > 1)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
51if (tokens.Count == 1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (278)
IncrementalParsing\BinaryExpression.cs (1)
218Assert.True(statementType.Modifiers.Count == 0);
IncrementalParsing\CompoundAssignment.cs (1)
158Assert.True(statementType.Modifiers.Count == 0);
IncrementalParsing\UnaryExpression.cs (1)
101Assert.True(statementType.Modifiers.Count == 0);
LexicalAndXml\XmlDocCommentTests.cs (30)
277Assert.Equal(1, attr.TextTokens.Count); 304Assert.Equal(1, attr.TextTokens.Count); 833Assert.Equal(5, cdata.TextTokens.Count); 864Assert.Equal(5, cdata.TextTokens.Count); 893Assert.Equal(1, cdata.TextTokens.Count); 918Assert.Equal(2, cdata.TextTokens.Count); 944Assert.Equal(2, cdata.TextTokens.Count); 969Assert.Equal(1, cdata.TextTokens.Count); 995Assert.Equal(5, comment.TextTokens.Count); 1026Assert.Equal(5, comment.TextTokens.Count); 1055Assert.Equal(1, comment.TextTokens.Count); 1080Assert.Equal(2, comment.TextTokens.Count); 1105Assert.Equal(1, comment.TextTokens.Count); 1133Assert.Equal(5, ProcessingInstruction.TextTokens.Count); 1167Assert.Equal(5, ProcessingInstruction.TextTokens.Count); 1198Assert.Equal(0, ProcessingInstruction.TextTokens.Count); 1224Assert.Equal(2, ProcessingInstruction.TextTokens.Count); 1251Assert.Equal(1, ProcessingInstruction.TextTokens.Count); 1320Assert.Equal(2, xmltext.TextTokens.Count); 1344Assert.Equal(3, xmltext.TextTokens.Count); 1369Assert.Equal(2, xmltext.TextTokens.Count); 1393Assert.Equal(3, xmltext.TextTokens.Count); 1418Assert.Equal(2, xmltext.TextTokens.Count); 1442Assert.Equal(3, xmltext.TextTokens.Count); 1467Assert.Equal(2, xmltext.TextTokens.Count); 1491Assert.Equal(3, xmltext.TextTokens.Count); 1574Assert.Equal(3, attribute.TextTokens.Count); 1602Assert.Equal(3, attribute.TextTokens.Count); 2396Assert.Equal(2, xmlText.TextTokens.Count); 2426Assert.Equal(1, xmlText.TextTokens.Count);
Parsing\DeclarationParsingTests.cs (210)
783Assert.Equal(0, cs.Modifiers.Count); 809Assert.Equal(1, cs.Modifiers.Count); 836Assert.Equal(1, cs.Modifiers.Count); 863Assert.Equal(1, cs.Modifiers.Count); 890Assert.Equal(1, cs.Modifiers.Count); 917Assert.Equal(1, cs.Modifiers.Count); 944Assert.Equal(1, cs.Modifiers.Count); 972Assert.Equal(0, cs.Modifiers.Count); 1000Assert.Equal(0, cs.Modifiers.Count); 1027Assert.Equal(0, cs.Modifiers.Count); 1053Assert.Equal(0, cs.Modifiers.Count); 1084Assert.Equal(0, cs.Modifiers.Count); 1116Assert.Equal(0, cs.Modifiers.Count); 1158Assert.Equal(0, cs.Modifiers.Count); 1219Assert.Equal(0, cs.Modifiers.Count); 1263Assert.Equal(0, cs.Modifiers.Count); 1304Assert.Equal(0, cs.Modifiers.Count); 1345Assert.Equal(0, cs.Modifiers.Count); 1401Assert.Equal(0, cs.Modifiers.Count); 1456Assert.Equal(0, cs.Modifiers.Count); 1502Assert.Equal(0, cs.Modifiers.Count); 1546Assert.Equal(0, cs.Modifiers.Count); 1606Assert.Equal(0, cs.Modifiers.Count); 1631Assert.Equal(0, cs.Modifiers.Count); 1661Assert.Equal(0, cs.Modifiers.Count); 1693Assert.Equal(0, cs.Modifiers.Count); 1718Assert.Equal(0, cs.Modifiers.Count); 1733Assert.Equal(0, cs.Modifiers.Count); 1758Assert.Equal(0, cs.Modifiers.Count); 1773Assert.Equal(1, cs.Modifiers.Count); 1799Assert.Equal(0, cs.Modifiers.Count); 1814Assert.Equal(1, cs.Modifiers.Count); 1840Assert.Equal(0, cs.Modifiers.Count); 1855Assert.Equal(2, cs.Modifiers.Count); 1882Assert.Equal(0, cs.Modifiers.Count); 1897Assert.Equal(2, cs.Modifiers.Count); 1924Assert.Equal(0, cs.Modifiers.Count); 1939Assert.Equal(1, cs.Modifiers.Count); 1965Assert.Equal(0, cs.Modifiers.Count); 1980Assert.Equal(1, cs.Modifiers.Count); 2163Assert.Equal(0, ds.ParameterList.Parameters[0].Modifiers.Count); 2198Assert.Equal(0, ds.ParameterList.Parameters[0].Modifiers.Count); 2233Assert.Equal(0, ds.ParameterList.Parameters[0].Modifiers.Count); 2240Assert.Equal(0, ds.ParameterList.Parameters[1].Modifiers.Count); 2275Assert.Equal(1, ds.ParameterList.Parameters[0].Modifiers.Count); 2311Assert.Equal(1, ds.ParameterList.Parameters[0].Modifiers.Count); 2347Assert.Equal(1, ds.ParameterList.Parameters[0].Modifiers.Count); 2384Assert.Equal(0, ds.ParameterList.Parameters[0].Modifiers.Count); 2418Assert.Equal(0, ds.ParameterList.Parameters[0].Modifiers.Count); 2444Assert.Equal(0, cs.Modifiers.Count); 2486Assert.Equal(0, cs.Modifiers.Count); 2501Assert.Equal(0, ms.Modifiers.Count); 2532Assert.Equal(0, cs.Modifiers.Count); 2578Assert.Equal(0, cs.Modifiers.Count); 2623Assert.Equal(0, cs.Modifiers.Count); 2653Assert.Equal(0, cs.Modifiers.Count); 2681Assert.Equal(0, cs.Modifiers.Count); 2696Assert.Equal(modifiers.Length, ms.Modifiers.Count); 2749Assert.Equal(0, cs.Modifiers.Count); 2764Assert.Equal(1, ms.Modifiers.Count); 2796Assert.Equal(0, structDecl.Modifiers.Count); 2811Assert.Equal(1, ms.Modifiers.Count); 2843Assert.Equal(0, structDecl.Modifiers.Count); 2858Assert.Equal(1, ms.Modifiers.Count); 2893Assert.Equal(0, structDecl.Modifiers.Count); 2908Assert.Equal(1, propertySyntax.Modifiers.Count); 2934Assert.Equal(0, structDecl.Modifiers.Count); 2949Assert.Equal(0, propertySyntax.Modifiers.Count); 2956Assert.Equal(1, accessors[0].Modifiers.Count); 2995Assert.Equal(0, cs.Modifiers.Count); 3010Assert.Equal(0, ms.Modifiers.Count); 3019Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count); 3047Assert.Equal(0, cs.Modifiers.Count); 3062Assert.Equal(0, ms.Modifiers.Count); 3073Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count); 3080Assert.Equal(0, ms.ParameterList.Parameters[1].Modifiers.Count); 3108Assert.Equal(0, cs.Modifiers.Count); 3123Assert.Equal(0, ms.Modifiers.Count); 3134Assert.Equal(1, ms.ParameterList.Parameters[0].Modifiers.Count); 3173Assert.Equal(0, cs.Modifiers.Count); 3188Assert.Equal(0, ms.Modifiers.Count); 3199Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count); 3247Assert.Equal(0, cs.Modifiers.Count); 3262Assert.Equal(0, ms.Modifiers.Count); 3312Assert.Equal(0, cs.Modifiers.Count); 3327Assert.Equal(0, ms.Modifiers.Count); 3336Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count); 3364Assert.Equal(0, cs.Modifiers.Count); 3379Assert.Equal(0, ms.Modifiers.Count); 3410Assert.Equal(0, cs.Modifiers.Count); 3425Assert.Equal(0, ms.Modifiers.Count); 3491Assert.Equal(0, cs.Modifiers.Count); 3507Assert.Equal(0, cn.Modifiers.Count); 3526Assert.Equal(0, cs.Modifiers.Count); 3542Assert.Equal(1, cn.Modifiers.Count); 3573Assert.Equal(0, cs.Modifiers.Count); 3590Assert.Equal(0, cn.Modifiers.Count); 3610Assert.Equal(0, cs.Modifiers.Count); 3625Assert.Equal(0, fs.Modifiers.Count); 3670Assert.Equal(0, cs.Modifiers.Count); 3685Assert.Equal(0, fs.Modifiers.Count); 3710Assert.Equal(0, cs.Modifiers.Count); 3725Assert.Equal(1, fs.Modifiers.Count); 3764Assert.Equal(0, cs.Modifiers.Count); 3779Assert.Equal(1, fs.Modifiers.Count); 3820Assert.Equal(0, cs.Modifiers.Count); 3835Assert.Equal(1, fs.Modifiers.Count); 3865Assert.Equal(0, cs.Modifiers.Count); 3880Assert.Equal(0, fs.Modifiers.Count); 3909Assert.Equal(0, cs.Modifiers.Count); 3924Assert.Equal(0, fs.Modifiers.Count); 3954Assert.Equal(0, cs.Modifiers.Count); 3969Assert.Equal(0, fs.Modifiers.Count); 4008Assert.Equal(0, cs.Modifiers.Count); 4023Assert.Equal(0, fs.Modifiers.Count); 4071Assert.Equal(0, cs.Modifiers.Count); 4086Assert.Equal(1, fs.Modifiers.Count); 4117Assert.Equal(0, cs.Modifiers.Count); 4132Assert.Equal(0, ps.Modifiers.Count); 4143Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4150Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4171Assert.Equal(0, cs.Modifiers.Count); 4186Assert.Equal(0, ps.Modifiers.Count); 4197Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4204Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4226Assert.Equal(0, cs.Modifiers.Count); 4241Assert.Equal(0, ps.Modifiers.Count); 4252Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4259Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4299Assert.Equal(0, cs.Modifiers.Count); 4314Assert.Equal(0, ps.Modifiers.Count); 4325Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4332Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4353Assert.Equal(0, cs.Modifiers.Count); 4368Assert.Equal(0, ps.Modifiers.Count); 4379Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4386Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4407Assert.Equal(0, cs.Modifiers.Count); 4422Assert.Equal(0, ps.Modifiers.Count); 4433Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4439Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4491Assert.Equal(0, cs.Modifiers.Count); 4506Assert.Equal(0, ps.Modifiers.Count); 4517Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4547Assert.Equal(0, cs.Modifiers.Count); 4562Assert.Equal(0, es.Modifiers.Count); 4573Assert.Equal(0, es.AccessorList.Accessors[0].Modifiers.Count); 4603Assert.Equal(0, cs.Modifiers.Count); 4618Assert.Equal(1, ps.Modifiers.Count); 4630Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4637Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4687Assert.Equal(0, cs.Modifiers.Count); 4702Assert.Equal(0, ps.Modifiers.Count); 4715Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4722Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 4743Assert.Equal(0, cs.Modifiers.Count); 4758Assert.Equal(0, es.Modifiers.Count); 4770Assert.Equal(0, es.AccessorList.Accessors[0].Modifiers.Count); 4777Assert.Equal(0, es.AccessorList.Accessors[1].Modifiers.Count); 4797Assert.Equal(0, cs.Modifiers.Count); 4812Assert.Equal(1, es.Modifiers.Count); 4825Assert.Equal(0, es.AccessorList.Accessors[0].Modifiers.Count); 4832Assert.Equal(0, es.AccessorList.Accessors[1].Modifiers.Count); 4880Assert.Equal(0, cs.Modifiers.Count); 4895Assert.Equal(0, es.Modifiers.Count); 4909Assert.Equal(0, es.AccessorList.Accessors[0].Modifiers.Count); 4916Assert.Equal(0, es.AccessorList.Accessors[1].Modifiers.Count); 4937Assert.Equal(0, cs.Modifiers.Count); 4952Assert.Equal(0, ps.Modifiers.Count); 4965Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 4976Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 4983Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 5004Assert.Equal(0, cs.Modifiers.Count); 5019Assert.Equal(0, ps.Modifiers.Count); 5032Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5043Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 5050Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 5072Assert.Equal(0, cs.Modifiers.Count); 5087Assert.Equal(0, ps.Modifiers.Count); 5100Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5111Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 5118Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 5139Assert.Equal(0, cs.Modifiers.Count); 5154Assert.Equal(0, ps.Modifiers.Count); 5169Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5176Assert.Equal(0, ps.ParameterList.Parameters[1].Modifiers.Count); 5187Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 5194Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 5215Assert.Equal(0, cs.Modifiers.Count); 5230Assert.Equal(0, ps.Modifiers.Count); 5245Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5256Assert.Equal(0, ps.AccessorList.Accessors[0].Modifiers.Count); 5263Assert.Equal(0, ps.AccessorList.Accessors[1].Modifiers.Count); 5283Assert.Equal(0, cs.Modifiers.Count); 5298Assert.Equal(0, ps.Modifiers.Count); 5312Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5319Assert.Equal(0, ps.ParameterList.Parameters[1].Modifiers.Count); 5363Assert.Equal(0, cs.Modifiers.Count); 5378Assert.Equal(0, ps.Modifiers.Count); 5392Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5399Assert.Equal(0, ps.ParameterList.Parameters[1].Modifiers.Count); 5477Assert.Equal(0, cs.Modifiers.Count); 5492Assert.Equal(0, ps.Modifiers.Count); 5506Assert.Equal(0, ps.ParameterList.Parameters[0].Modifiers.Count); 5540Assert.Equal(0, cs.Modifiers.Count); 5555Assert.Equal(0, ms.Modifiers.Count); 5567Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count); 5588Assert.Equal(0, cs.Modifiers.Count); 5603Assert.Equal(0, ms.Modifiers.Count); 5615Assert.Equal(0, ms.ParameterList.Parameters[0].Modifiers.Count);
Parsing\ExpressionParsingTests.cs (1)
2242Assert.Equal(1, ps.Modifiers.Count);
Parsing\StatementParsingTests.cs (22)
193Assert.Equal(0, ds.Modifiers.Count); 221Assert.Equal(0, ds.Modifiers.Count); 251Assert.Equal(0, ds.Modifiers.Count); 285Assert.Equal(0, ds.Modifiers.Count); 326Assert.Equal(0, ds.Modifiers.Count); 354Assert.Equal(0, ds.Modifiers.Count); 380Assert.Equal(0, ds.Modifiers.Count); 406Assert.Equal(0, ds.Modifiers.Count); 432Assert.Equal(0, ds.Modifiers.Count); 458Assert.Equal(0, ds.Modifiers.Count); 484Assert.Equal(0, ds.Modifiers.Count); 510Assert.Equal(0, ds.Modifiers.Count); 545Assert.Equal(0, ds.Modifiers.Count); 575Assert.Equal(0, ds.Modifiers.Count); 620Assert.Equal(0, ds.Modifiers.Count); 651Assert.Equal(1, ds.Modifiers.Count); 683Assert.Equal(1, ds.Modifiers.Count); 715Assert.Equal(1, ds.Modifiers.Count); 747Assert.Equal(1, ds.Modifiers.Count); 778Assert.Equal(0, ds.Modifiers.Count); 804Assert.Equal(0, ds.Modifiers.Count); 835Assert.Equal(0, ds.Modifiers.Count);
Syntax\SyntaxFactoryTests.cs (1)
84Assert.Equal(0, c.Modifiers.Count);
Syntax\SyntaxListTests.cs (3)
246Assert.True(declaration.Modifiers.Count == 0); 257Assert.True(declaration.Modifiers.Count == 0); 262Assert.True(declaration.Modifiers.Count == 1);
Syntax\SyntaxNodeTests.cs (1)
3468Assert.Equal(2, newModifiers.Count);
Syntax\SyntaxTokenListTests.cs (7)
203Assert.Equal(0, list.Count); 209Assert.Equal(1, newList.Count); 213Assert.Equal(2, newList.Count); 217Assert.Equal(1, newList.Count); 221Assert.Equal(2, newList.Count); 225Assert.Equal(0, newList.Count); 232Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(list.Count + 1, new[] { tokenD }));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3588=> node is ParameterSyntax { Type: null, Default: null, Modifiers.Count: 0 };
Microsoft.CodeAnalysis.Features (2)
Shared\Extensions\SyntaxTokenListExtensions.cs (1)
19switch (tokens.Count)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
25if (modifiers.Count >= 2)
Microsoft.CodeAnalysis.VisualBasic (11)
Binding\Binder_XmlLiterals.vb (1)
929Dim n = tokens.Count
Symbols\Source\SourceNamedTypeSymbol.vb (1)
456If modifiers.Count <> 0 Then
Syntax\ArrayRankSpecifierSyntax.vb (1)
18Return Me.CommaTokens.Count + 1
Syntax\SyntaxReplacer.vb (1)
362If index >= 0 AndAlso index < list.Count Then
Syntax\VisualBasicSyntaxRewriter.vb (1)
106Dim i = -1, n = list.Count
VisualBasicExtensions.vb (6)
397If index < 0 OrElse index > list.Count Then 405If list.Count = 0 Then 408Dim builder = New SyntaxTokenListBuilder(list.Count + items.Length) 415If index < list.Count Then 416builder.Add(list, index, list.Count - index) 429Return Insert(list, list.Count, items)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.vb (1)
19If modifiers.Count > 1 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
231Return parameter.Modifiers.Count = 0 OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
453If (kind = DeclarationKind.Field AndAlso _list.Count = 0) Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Utilities\NavigationPointHelpers.vb (1)
43If methodBlock.BlockStatement.Modifiers.Count > 0 Then
Microsoft.CodeAnalysis.VisualBasic.Features (11)
EditAndContinue\BreakpointSpans.vb (1)
236If methodBase.Modifiers.Count = 0 Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (3)
1334Return TextSpan.FromBounds(If(modifiers.Count <> 0, modifiers.First.SpanStart, start.SpanStart), 1342If header.Modifiers.Count > 0 Then 1403Dim startToken = If(lambda.Modifiers.Count <> 0, lambda.Modifiers.First, lambda.DeclarationKeyword)
Highlighting\KeywordHighlighters\AccessorDeclarationHighlighter.vb (1)
38Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
Highlighting\KeywordHighlighters\ConstructorDeclarationHighlighter.vb (1)
30Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
Highlighting\KeywordHighlighters\EventDeclarationHighlighter.vb (1)
31Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
Highlighting\KeywordHighlighters\MethodDeclarationHighlighter.vb (1)
36Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
Highlighting\KeywordHighlighters\OperatorDeclarationHighlighter.vb (1)
30Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
Highlighting\KeywordHighlighters\PropertyDeclarationHighlighter.vb (1)
31Dim firstKeyword = If(.Modifiers.Count > 0, .Modifiers.First(), .DeclarationKeyword)
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.vb (1)
19If modifiers.Count > 1 Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (15)
Syntax\ManualTests.vb (2)
93Assert.Equal(0, arrayRankSpecifier.CommaTokens.Count) 99Assert.Equal(3, arrayRankSpecifier.CommaTokens.Count)
TestSyntaxNodes.vb (13)
288If list.Count > 0 Then 291Assert.Equal(expectedFullSpan.End, list(list.Count - 1).FullSpan.End) 293For i = 0 To list.Count - 1 298If i < list.Count - 1 Then 461Assert.Equal(0, l.Count) 471Assert.Equal(0, param.Modifiers.Count) 475Assert.Equal(0, param.Modifiers.Count) 484Assert.Equal(1, l.Count) 493Assert.Equal(1, param.Modifiers.Count) 501Assert.Equal(1, param.Modifiers.Count) 517Assert.Equal(3, l.Count) 532Assert.Equal(3, param.Modifiers.Count) 546Assert.Equal(3, param.Modifiers.Count)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
236If skippedTokens.Count = 1 AndAlso skippedTokens.First.Kind = SyntaxKind.EndIfKeyword Then
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (3)
360If actual.Count <> expected.Count Then 394If modifiers.Count <= 1 Then 405Dim result = New List(Of SyntaxToken)(modifiers.Count)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
2543If declaration.Kind = SyntaxKind.FieldDeclaration AndAlso accessibility = Accessibility.NotApplicable AndAlso newTokens.Count = 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
231Return parameter.Modifiers.Count = 0 OrElse
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
453If (kind = DeclarationKind.Field AndAlso _list.Count = 0) Then
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSImportGenerator.cs (2)
98SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 99for (int i = 0; i < tokenList.Count; i++)
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
165SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 166for (int i = 0; i < tokenList.Count; i++)
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
107SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 108for (int i = 0; i < tokenList.Count; i++)
Microsoft.Interop.SourceGeneration (4)
SyntaxExtensions.cs (4)
76SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 77for (int i = 0; i < tokenList.Count; i++) 87for (int i = 0; i < tokenList.Count; i++) 111(-1, -1) => modifiers.Count,
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (3)
285If typeBlock.BlockStatement.Modifiers.Count > 0 Then 293If enumBlock.EnumStatement.Modifiers.Count > 0 Then 1089If fieldDeclaration.Modifiers.Count > 0 Then
CodeModel\VisualBasicCodeModelService.NodeNameGenerator.vb (2)
64If specifier.CommaTokens.Count > 0 Then 65builder.Append(","c, specifier.CommaTokens.Count)
Help\VisualBasicHelpContextService.Visitor.vb (1)
769For i As Integer = 0 To list.Count - 1