Implemented interface member:
75 references to Count
Microsoft.CodeAnalysis (21)
Syntax\CommonSyntaxNodeRemover.cs (1)
39nodeIndex + 1 < nodesAndSeparators.Count &&
Syntax\SeparatedSyntaxList.cs (7)
59int allCount = list.Count; 69for (int i = 0; i < list.Count; i++) 411int insertionIndex = index < this.Count ? nodesWithSeps.IndexOf(this[index]) : nodesWithSeps.Count; 414if (insertionIndex > 0 && insertionIndex < nodesWithSeps.Count) 440if (insertionIndex < nodesWithSeps.Count && nodesWithSeps[insertionIndex] is { IsNode: true } nodeOrToken) 489if (index >= 0 && index <= nodesWithSeps.Count) 494if (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)
228return this[this.Count - 1]; 237? this[this.Count - 1] 292return Insert(this.Count, nodeOrToken); 301return InsertRange(this.Count, nodesOrTokens); 326if (index < 0 || index > this.Count) 371if (index < 0 || index >= this.Count) 388if (index >= 0 && index < this.Count) 419if (index >= 0 && index < this.Count) 559if (_index < _list.Count) 564return _index < _list.Count;
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
89this.Add(list, 0, list.Count);
Microsoft.CodeAnalysis.CSharp (3)
Syntax\SyntaxFactory.cs (2)
1481for (int i = 0, n = list.Count; i < n; i++) 1495for (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)
53if (list.Count == 0 || list.Count % 2 == 1) 65.RemoveAt(list.Count - 1);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (36)
Syntax\SyntaxNodeOrTokenListTests.cs (35)
44Assert.Equal(3, list.Count); 62Assert.Equal(4, newList.Count); 66Assert.Equal(5, newList.Count); 70Assert.Equal(4, newList.Count); 74Assert.Equal(4, newList.Count); 78Assert.Equal(4, newList.Count); 82Assert.Equal(4, newList.Count); 86Assert.Equal(5, newList.Count); 90Assert.Equal(5, newList.Count); 94Assert.Equal(5, newList.Count); 98Assert.Equal(5, newList.Count); 102Assert.Equal(2, newList.Count); 105newList = list.RemoveAt(list.Count - 1); 106Assert.Equal(2, newList.Count); 110Assert.Equal(2, newList.Count); 114Assert.Equal(2, newList.Count); 118Assert.Equal(2, newList.Count); 122Assert.Equal(3, newList.Count); 126Assert.Equal(3, newList.Count); 130Assert.Equal(3, newList.Count); 134Assert.Equal(4, newList.Count); 138Assert.Equal(4, newList.Count); 142Assert.Equal(4, newList.Count); 146Assert.Equal(2, newList.Count); 150Assert.Equal(2, newList.Count); 154Assert.Equal(2, newList.Count); 159Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(list.Count + 1, tokenD)); 161Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(list.Count + 1, new[] { tokenD })); 163Assert.Throws<ArgumentOutOfRangeException>(() => list.RemoveAt(list.Count)); 183Assert.Equal(0, list.Count); 189Assert.Equal(1, newList.Count); 193Assert.Equal(2, newList.Count); 197Assert.Equal(1, newList.Count); 201Assert.Equal(2, newList.Count); 205Assert.Equal(0, newList.Count);
Syntax\SyntaxNodeTests.cs (1)
3369Assert.Equal(0, list.Count);
Microsoft.CodeAnalysis.Features (4)
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (4)
309for (var i = 0; i < itemsAndSeparators.Count; i += 2) 336if (i + 1 < itemsAndSeparators.Count) 440for (var i = 1; i < itemsAndSeparators.Count; i += 2) 447if (i < itemsAndSeparators.Count - 1)
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\SyntaxNodeFactories.vb (2)
988Dim n = list.Count 999For i = 0 To list.Count - 1
Syntax\SyntaxNodeRemover.vb (1)
141Dim 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))