Implemented interface member:
67 references to Count
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
41&& modifiers is { Count: > 1 }
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 (20)
Binder\Binder_Expressions.cs (1)
4209int 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)
59if (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 (4)
493partialIndex == modifiers.Count - 1 || 494(partialIndex == modifiers.Count - 2 && modifiers[partialIndex + 1].ContextualKind() is SyntaxKind.AsyncKeyword); 513refIndex == modifiers.Count - 1 || 514(refIndex == modifiers.Count - 2 && modifiers[refIndex + 1].ContextualKind() is SyntaxKind.PartialKeyword);
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)
3668=> 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.Interop.LibraryImportGenerator (3)
parent\Common\MemorySafetyRules.cs (3)
87while (index < original.Count && !original[index].IsKind(SyntaxKind.SafeKeyword)) 90return modifiers.Insert(index < modifiers.Count ? index : modifiers.Count, safeToken);
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
parent\Common\MemorySafetyRules.cs (3)
87while (index < original.Count && !original[index].IsKind(SyntaxKind.SafeKeyword)) 90return modifiers.Insert(index < modifiers.Count ? index : modifiers.Count, safeToken);