Implemented interface member:
105 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)
125/// <paramref name="index" /> is less than 0.-or-<paramref name="index" /> is equal to or greater than <see cref="Count" />. </exception> 232return this[this.Count - 1]; 258Debug.Assert(this.Count >= offset + count); 286for (int i = 0, n = this.Count; i < n; i++) 300for (int i = 0, n = this.Count; i < n; i++) 317return Insert(this.Count, token); 326return InsertRange(this.Count, tokens); 351if (index < 0 || index > this.Count) 384if (index < 0 || index >= this.Count) 401if (index >= 0 && index <= this.Count) 432if (index >= 0 && index <= this.Count)
Syntax\SyntaxTokenList.Enumerator.cs (1)
65_count = list.Count;
Syntax\SyntaxTokenList.Reversed.cs (3)
37if (_list.Count == 0) 47if (_list.Count == 0) 91_count = list.Count;
Syntax\SyntaxTokenListBuilder.cs (1)
48this.Add(list, 0, list.Count);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
25if (modifiers.Count >= 2)
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_Expressions.cs (1)
4206int rank = node.Commas.Count + 1;
Binder\Binder_Lambda.cs (1)
356if (parameter.Modifiers.Count > 0 && parameter.Type is null)
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);
Declarations\DeclarationTreeBuilder.cs (1)
596if (node.Modifiers.Count > 0)
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 (2)
461var isLast = i == modifiers.Count - 1; 462var isPartialAsyncMethod = isOrdinaryMethod && i == modifiers.Count - 2 && modifiers[i + 1].ContextualKind() is SyntaxKind.AsyncKeyword;
Symbols\Source\ParameterHelpers.cs (1)
601for (int i = 0, n = parameter.Modifiers.Count; i < n; i++)
Symbols\Source\SourceCustomEventAccessorSymbol.cs (1)
53if (syntax.Modifiers.Count > 0)
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
244if (modifiers.Count > 0)
Syntax\CSharpSyntaxRewriter.cs (1)
254var count = list.Count;
Syntax\SyntaxReplacer.cs (1)
521if (index >= 0 && index < list.Count)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
79if (!languageVersion.IsCSharp14OrAbove() && explicitLambda.ParameterList.Parameters.Any(p => p.Modifiers.Count > 0)) 110if (implicitLambda.ParameterList.Parameters is not ([{ AttributeLists.Count: 0, Modifiers.Count: 0 } parameter]))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
56if (structure.Tokens.Count != 1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
42if (modifiers.Count > 1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
51if (tokens.Count == 1)
Microsoft.CodeAnalysis.CSharp.Features (14)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
681for (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)
294if (textTokens.Count != 1 && string.IsNullOrWhiteSpace(firstTextToken.ValueText)) 304existingCommentText = textTokens.Count == 2 ? firstTextToken.ValueText : "";
EditAndContinue\BreakpointSpans.cs (1)
127if (startOpt.Count > 0)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1935=> TextSpan.FromBounds((modifiers.Count != 0) ? modifiers.First().SpanStart : start.SpanStart, end.Span.End);
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
170if (declarationStatement.Modifiers.Count > 0 ||
Organizing\Organizers\ModifiersOrganizer.cs (1)
19if (modifiers.Count > 1 && !modifiers.SpansPreprocessorDirective())
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
79if (!languageVersion.IsCSharp14OrAbove() && explicitLambda.ParameterList.Parameters.Any(p => p.Modifiers.Count > 0)) 110if (implicitLambda.ParameterList.Parameters is not ([{ AttributeLists.Count: 0, Modifiers.Count: 0 } parameter]))
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
56if (structure.Tokens.Count != 1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.cs (1)
42if (modifiers.Count > 1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
51if (tokens.Count == 1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
3660=> node is ParameterSyntax { Type: null, Default: null, Modifiers.Count: 0 };
Microsoft.CodeAnalysis.Features (2)
Shared\Extensions\SyntaxTokenListExtensions.cs (1)
17switch (tokens.Count)
src\roslyn\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)
463If modifiers.Count <> 0 Then
Syntax\ArrayRankSpecifierSyntax.vb (1)
18Return Me.CommaTokens.Count + 1
Syntax\SyntaxReplacer.vb (1)
366If 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\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.vb (1)
19If modifiers.Count > 1 Then
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
231Return parameter.Modifiers.Count = 0 OrElse
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
472If (kind = DeclarationKind.Field AndAlso _list.Count = 0) Then
Microsoft.CodeAnalysis.VisualBasic.Features (12)
EditAndContinue\BreakpointSpans.vb (1)
236If methodBase.Modifiers.Count = 0 Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (3)
1322Return TextSpan.FromBounds(If(modifiers.Count <> 0, modifiers.First.SpanStart, start.SpanStart), 1330If header.Modifiers.Count > 0 Then 1391Dim 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)
SolutionExplorer\VisualBasicSolutionExplorerSymbolTreeItemProvider.vb (1)
354builder.Append(","c, rankSpecifier.CommaTokens.Count)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\RemoveAsyncModifierHelpers.vb (1)
19If modifiers.Count > 1 Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (1)
237If 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)
2504If declaration.Kind = SyntaxKind.FieldDeclaration AndAlso accessibility = Accessibility.NotApplicable AndAlso newTokens.Count = 0 Then
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
231Return parameter.Modifiers.Count = 0 OrElse
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
472If (kind = DeclarationKind.Field AndAlso _list.Count = 0) Then
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSImportGenerator.cs (2)
77SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 78for (int i = 0; i < tokenList.Count; i++)
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
143SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 144for (int i = 0; i < tokenList.Count; i++)
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
129SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 130for (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,
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (1)
231Return parameter.Modifiers.Count = 0 OrElse