82 references to Count
Microsoft.AspNetCore.Razor.Utilities.Shared (33)
ImmutableArrayExtensions.cs (3)
988if (stack.Count == source.Length) 993using var result = new PooledArrayBuilder<T>(capacity: stack.Count); 995while (stack.Count > 0)
PooledObjects\PooledArrayBuilder`1.cs (29)
198readonly get => this[index.GetOffset(Count)]; 199set => this[index.GetOffset(Count)] = value; 253=> Insert(Count, item); 256=> InsertRange(Count, items); 336=> InsertRange(Count, items); 358Debug.Assert(index >= 0 && index <= Count); 384Debug.Assert(index >= 0 && index <= Count); 418Debug.Assert(index >= 0 && index <= Count); 457if (index == Count) 618=> RemoveAt(index.GetOffset(Count)); 625/// If <see cref="ImmutableArray{T}.Builder.Capacity"/> equals <see cref="Count"/>, the 698if (Count == 0) 715=> Count > 0; 831var n = Count; 870=> Count > 0 ? this[0] : ThrowInvalidOperation(SR.Contains_no_elements); 933=> Count > 0 ? this[0] : default; 946=> Count > 0 ? this[0] : defaultValue; 1070=> Count > 0 ? this[^1] : ThrowInvalidOperation(SR.Contains_no_elements); 1086for (var i = Count - 1; i >= 0; i--) 1115for (var i = Count - 1; i >= 0; i--) 1135=> Count > 0 ? this[^1] : default; 1148=> Count > 0 ? this[^1] : defaultValue; 1164for (var i = Count - 1; i >= 0; i--) 1193for (var i = Count - 1; i >= 0; i--) 1222for (var i = Count - 1; i >= 0; i--) 1254for (var i = Count - 1; i >= 0; i--) 1280return Count switch 1390return Count switch 1414return Count switch
PooledObjects\PooledArrayBuilder`1.Enumerator.cs (1)
22if (_index >= _builder.Count)
Microsoft.CodeAnalysis.Razor.Compiler (49)
Language\Components\ComponentBindLoweringPass.cs (3)
302for (var i = toRemove.Count - 1; i >= 0; i--) 367if (toRemove.Count > 0) 372for (var i = toRemove.Count - 1; i >= 0; i--)
Language\DefaultTagHelperResolutionPhase.cs (1)
488if (allowedNames.Count == 0)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (1)
1589if (pendingParts.Count == 0)
Language\Extensions\ImplementsDirectivePass.cs (1)
37if (interfaces.Count > @class.Interfaces.Length)
Language\Intermediate\DocumentIntermediateNodeExtensions.cs (3)
39while (stack.Count > 0) 80while (stack.Count > 0) 125while (stack.Count > 0)
Language\Intermediate\IntermediateNodeExtensions.cs (1)
58while (stack.Count > 0)
Language\Legacy\CSharpCodeParser.cs (1)
2793Debug.Assert(whitespace.Count == 0, "Expected empty builder.");
Language\Legacy\HtmlMarkupParser.cs (6)
1207Debug.Assert(nameTokens.Count == 0); 1873Debug.Assert(whitespaceTokens.Count == 0, "Expected empty builder."); 1894if (whitespace.Count == 0 && EndOfFile) 1913else if (whitespace.Count > 0) 1963if (whitespace.Count > 0) 2242for (var i = tokens.Count - 1; i >= 0; i--)
Language\Legacy\TagHelperBlockRewriter.cs (1)
206if (attributeBuilder.Count > 0)
Language\Legacy\TokenizerBackedParser.cs (4)
162for (var i = tokens.Count - 1; i >= 0; i--) 208for (int i = tokens.Count - 1; i >= 0; i--) 304Debug.Assert(!expectsEmptyBuilder || result.Count == 0, "Expected empty builder."); 323Debug.Assert(result.Count == 0, "Expected empty builder.");
Language\RazorProjectEngine.cs (4)
398if (imports.Count == 0) 403using var result = new PooledArrayBuilder<RazorProjectItem>(capacity: imports.Count); 421if (importItems.Count == 0) 433using var imports = new PooledArrayBuilder<RazorSourceDocument>(importItems.Count);
Language\Syntax\BaseMarkupStartTagSyntax.cs (1)
114if (tokens.Count > 0)
Language\Syntax\SyntaxBuilderExtensions.cs (2)
17switch (builder.Count) 46switch (builder.Count)
Language\Syntax\SyntaxList`1.cs (6)
185Debug.Assert(builder.Count == count + tokens.Length); 213var oldCount = builder.Count; 220if (builder.Count == oldCount) 251Debug.Assert(builder.Count == count + nodeCount); 400Debug.Assert(builder.Count == index + nodeCount); 405Debug.Assert(builder.Count == newCount + nodeCount);
Language\Syntax\SyntaxNavigator.cs (2)
47while (stack.Count > 0) 91while (stack.Count > 0)
Language\Syntax\SyntaxTokenList.cs (6)
200Debug.Assert(builder.Count == count + tokens.Length); 223var oldCount = builder.Count; 230if (builder.Count == oldCount) 261Debug.Assert(builder.Count == count + tokenCount); 385Debug.Assert(builder.Count == index + tokenCount); 390Debug.Assert(builder.Count == newCount + tokenCount);
Language\Syntax\SyntaxUtilities.cs (1)
75if (literals.Count > 0)
Language\TagHelperBinder.cs (3)
174return resultsBuilder.Count > 0 195Debug.Assert(tempRulesBuilder.Count == 0); 205if (tempRulesBuilder.Count > 0)
Language\TagHelperCollection.cs (2)
292return segments.Count switch 367return segments.Count switch