Implemented interface member:
75 references to Count
Microsoft.CodeAnalysis (21)
Syntax\CommonSyntaxNodeRemover.cs (1)
39nodeIndex + 1 < nodesAndSeparators.Count &&
Syntax\SeparatedSyntaxList.cs (7)
29int allCount = list.Count; 39for (int i = 0; i < list.Count; i++) 381int insertionIndex = index < this.Count ? nodesWithSeps.IndexOf(this[index]) : nodesWithSeps.Count; 384if (insertionIndex > 0 && insertionIndex < nodesWithSeps.Count) 410if (insertionIndex < nodesWithSeps.Count && nodesWithSeps[insertionIndex] is { IsNode: true } nodeOrToken) 459if (index >= 0 && index <= nodesWithSeps.Count) 464if (index < nodesWithSeps.Count && nodesWithSeps[index].IsToken)
Syntax\SeparatedSyntaxListBuilder.cs (1)
98_builder.AddRange(list, this.Count, Math.Min(count << 1, list.Count));
Syntax\SyntaxListBuilder.cs (1)
115this.AddRange(list, 0, list.Count);
Syntax\SyntaxNodeOrTokenList.cs (10)
194return this[this.Count - 1]; 203? this[this.Count - 1] 258return Insert(this.Count, nodeOrToken); 267return InsertRange(this.Count, nodesOrTokens); 292if (index < 0 || index > this.Count) 337if (index < 0 || index >= this.Count) 354if (index >= 0 && index < this.Count) 385if (index >= 0 && index < this.Count) 525if (_index < _list.Count) 530return _index < _list.Count;
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
89this.Add(list, 0, list.Count);
Microsoft.CodeAnalysis.CSharp (3)
Syntax\SyntaxFactory.cs (2)
1480for (int i = 0, n = list.Count; i < n; i++) 1494for (int i = 0, n = list.Count; i < n; i++)
Syntax\SyntaxNodeRemover.cs (1)
213for (int i = 0, n = withSeps.Count; i < n; i++)
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertAnonymousType\CSharpConvertAnonymousTypeToClassCodeRefactoringProvider.cs (3)
51if (list.Count == 0 || list.Count % 2 == 1) 63.RemoveAt(list.Count - 1);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (36)
Syntax\SyntaxNodeOrTokenListTests.cs (35)
42Assert.Equal(3, list.Count); 60Assert.Equal(4, newList.Count); 64Assert.Equal(5, newList.Count); 68Assert.Equal(4, newList.Count); 72Assert.Equal(4, newList.Count); 76Assert.Equal(4, newList.Count); 80Assert.Equal(4, newList.Count); 84Assert.Equal(5, newList.Count); 88Assert.Equal(5, newList.Count); 92Assert.Equal(5, newList.Count); 96Assert.Equal(5, newList.Count); 100Assert.Equal(2, newList.Count); 103newList = list.RemoveAt(list.Count - 1); 104Assert.Equal(2, newList.Count); 108Assert.Equal(2, newList.Count); 112Assert.Equal(2, newList.Count); 116Assert.Equal(2, newList.Count); 120Assert.Equal(3, newList.Count); 124Assert.Equal(3, newList.Count); 128Assert.Equal(3, newList.Count); 132Assert.Equal(4, newList.Count); 136Assert.Equal(4, newList.Count); 140Assert.Equal(4, newList.Count); 144Assert.Equal(2, newList.Count); 148Assert.Equal(2, newList.Count); 152Assert.Equal(2, newList.Count); 157Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(list.Count + 1, tokenD)); 159Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(list.Count + 1, new[] { tokenD })); 161Assert.Throws<ArgumentOutOfRangeException>(() => list.RemoveAt(list.Count)); 180Assert.Equal(0, list.Count); 186Assert.Equal(1, newList.Count); 190Assert.Equal(2, newList.Count); 194Assert.Equal(1, newList.Count); 198Assert.Equal(2, newList.Count); 202Assert.Equal(0, newList.Count);
Syntax\SyntaxNodeTests.cs (1)
3297Assert.Equal(0, list.Count);
Microsoft.CodeAnalysis.Features (4)
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (4)
282for (var i = 0; i < itemsAndSeparators.Count; i += 2) 309if (i + 1 < itemsAndSeparators.Count) 405for (var i = 1; i < itemsAndSeparators.Count; i += 2) 412if (i < itemsAndSeparators.Count - 1)
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\SyntaxNodeFactories.vb (2)
987Dim n = list.Count 998For i = 0 To list.Count - 1
Syntax\SyntaxNodeRemover.vb (1)
146Dim n = withSeps.Count
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
TestSyntaxNodes.vb (5)
264If list.Count > 0 Then 267Assert.Equal(expectedFullSpan.End, list(list.Count - 1).FullSpan.End) 269For i = 0 To list.Count - 1 274If i < list.Count - 1 Then 411VerifyListSpans(statements, TextSpan.FromBounds(statements(0).FullSpan.Start, statements(statements.Count - 1).FullSpan.End))