Implemented interface member:
433 references to Count
Microsoft.CodeAnalysis (22)
Microsoft.CodeAnalysis.CodeStyle (16)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
Microsoft.CodeAnalysis.CSharp (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (1)
94if (list.Count == 0)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (19)
Microsoft.CodeAnalysis.CSharp.Features (28)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (174)
LexicalAndXml\LexicalTests.cs (23)
3618Assert.Equal(1, leading.Count);
3624Assert.Equal(1, trailing.Count);
3636Assert.Equal(1, leading.Count);
3642Assert.Equal(1, trailing.Count);
3657Assert.Equal(1, leading.Count);
3663Assert.Equal(1, trailing.Count);
3968Assert.Equal(3, token.LeadingTrivia.Count);
3991Assert.Equal(3, token.LeadingTrivia.Count);
4013Assert.Equal(4, token.LeadingTrivia.Count);
4046Assert.Equal(3, token.LeadingTrivia.Count);
4102Assert.Equal(3, token.LeadingTrivia.Count);
4120Assert.Equal(3, token.LeadingTrivia.Count);
4137Assert.Equal(4, token.LeadingTrivia.Count);
4171Assert.Equal(4, token.LeadingTrivia.Count);
4211Assert.Equal(4, token.LeadingTrivia.Count);
4275Assert.Equal(3, token.LeadingTrivia.Count);
4297Assert.Equal(3, token.LeadingTrivia.Count);
4320Assert.Equal(4, token.LeadingTrivia.Count);
4349Assert.Equal(3, token.LeadingTrivia.Count);
4380Assert.Equal(5, token.LeadingTrivia.Count);
4419Assert.Equal(7, token.LeadingTrivia.Count);
4475Assert.Equal(7, token.LeadingTrivia.Count);
4533Assert.Equal(7, token.LeadingTrivia.Count);
LexicalAndXml\XmlDocCommentTests.cs (78)
81Assert.Equal(1, leading.Count);
101Assert.Equal(1, leading.Count);
118Assert.Equal(3, leading.Count);
133Assert.Equal(1, leading.Count);
150Assert.Equal(1, leading.Count);
171Assert.Equal(1, leading.Count);
196Assert.Equal(2, leading.Count); // a new line follows the comment
218Assert.Equal(1, leading.Count);
241Assert.Equal(1, leading.Count);
264Assert.Equal(1, leading.Count);
291Assert.Equal(1, leading.Count);
319Assert.Equal(1, leading.Count);
343Assert.Equal(1, leading.Count);
368Assert.Equal(1, leading.Count);
394Assert.Equal(2, leading.Count);
421Assert.Equal(1, leading.Count);
448Assert.Equal(1, leading.Count);
476Assert.Equal(1, leading.Count);
505Assert.Equal(1, leading.Count);
535Assert.Equal(1, leading.Count);
564Assert.Equal(1, leading.Count);
594Assert.Equal(1, leading.Count);
625Assert.Equal(1, leading.Count);
648Assert.Equal(1, leading.Count);
670Assert.Equal(1, leading.Count);
692Assert.Equal(1, leading.Count);
714Assert.Equal(1, leading.Count);
736Assert.Equal(1, leading.Count);
756Assert.Equal(1, leading.Count);
790Assert.Equal(1, leading.Count);
823Assert.Equal(1, leading.Count);
854Assert.Equal(1, leading.Count);
882Assert.Equal(1, leading.Count);
907Assert.Equal(1, leading.Count);
933Assert.Equal(1, leading.Count);
958Assert.Equal(1, leading.Count);
985Assert.Equal(1, leading.Count);
1016Assert.Equal(1, leading.Count);
1044Assert.Equal(1, leading.Count);
1069Assert.Equal(1, leading.Count);
1094Assert.Equal(1, leading.Count);
1121Assert.Equal(1, leading.Count);
1154Assert.Equal(1, leading.Count);
1185Assert.Equal(1, leading.Count);
1211Assert.Equal(1, leading.Count);
1238Assert.Equal(1, leading.Count);
1266Assert.Equal(1, leading.Count);
1295Assert.Equal(1, leading.Count);
1311Assert.Equal(1, leading.Count);
1335Assert.Equal(1, leading.Count);
1360Assert.Equal(1, leading.Count);
1384Assert.Equal(1, leading.Count);
1409Assert.Equal(1, leading.Count);
1433Assert.Equal(1, leading.Count);
1458Assert.Equal(1, leading.Count);
1482Assert.Equal(1, leading.Count);
1562Assert.Equal(1, leading.Count);
1590Assert.Equal(1, leading.Count);
1618Assert.Equal(1, leading.Count);
1644Assert.Equal(1, leading.Count);
1715Assert.Equal(5, trivias.Count);
1754Assert.Equal(4, trivias.Count);
1796Assert.Equal(4, trivias.Count);
1839Assert.Equal(2, trivias.Count);
1874Assert.Equal(2, trivias.Count);
1909Assert.Equal(2, trivias.Count);
1944Assert.Equal(2, trivias.Count);
1981Assert.Equal(1, trivias.Count);
2017Assert.Equal(1, trivias.Count);
2054Assert.Equal(2, trivias.Count);
2087Assert.Equal(1, trivias.Count);
2120Assert.Equal(1, trivias.Count);
2152Assert.Equal(3, trivias.Count);
2182Assert.Equal(3, trivias.Count);
2213Assert.Equal(1, trivias.Count);
2261Assert.Equal(1, trivias.Count);
2289Assert.Equal(1, topTrivias.Count);
2366Assert.Equal(1, trivias.Count);
Syntax\SyntaxNodeTests.cs (31)
1488Assert.Equal(2, leadingTriviaWithDuplicate.Count);
1952Assert.Equal(2, someNode.Identifier.TrailingTrivia.Count);
1989Assert.Equal(2, someNode.Identifier.TrailingTrivia.Count);
2416Assert.Equal(2, leadingTrivia.Count);
2438Assert.Equal(2, leadingTrivia.Count);
3533Assert.Equal(1, node.GetLeadingTrivia().Count);
3544Assert.Equal(1, node.GetLeadingTrivia().Count);
3753Assert.Equal(1, idToken.LeadingTrivia.Count);
3756Assert.Equal(1, idToken.TrailingTrivia.Count);
3762Assert.Equal(0, idToken.LeadingTrivia.Count);
3764Assert.Equal(0, idToken.TrailingTrivia.Count);
3769Assert.Equal(1, idToken.LeadingTrivia.Count);
3772Assert.Equal(1, idToken.TrailingTrivia.Count);
3778Assert.Equal(1, namedNode.GetLeadingTrivia().Count);
3781Assert.Equal(1, namedNode.GetTrailingTrivia().Count);
3787Assert.Equal(0, namedNode.GetLeadingTrivia().Count);
3789Assert.Equal(0, namedNode.GetTrailingTrivia().Count);
3794Assert.Equal(1, namedNode.GetLeadingTrivia().Count);
3797Assert.Equal(1, namedNode.GetTrailingTrivia().Count);
3803Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Count);
3806Assert.Equal(1, nodeOrToken.GetTrailingTrivia().Count);
3812Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Count);
3815Assert.Equal(1, nodeOrToken.GetTrailingTrivia().Count);
3821Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Count);
3823Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Count);
3828Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Count);
3830Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Count);
3835Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Count);
3838Assert.Equal(1, nodeOrToken.GetTrailingTrivia().Count);
3844Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Count);
3847Assert.Equal(1, nodeOrToken.GetTrailingTrivia().Count);
Syntax\SyntaxTriviaListTests.cs (35)
55Assert.Equal(3, list.Count);
73Assert.Equal(4, newList.Count);
77Assert.Equal(5, newList.Count);
81Assert.Equal(4, newList.Count);
85Assert.Equal(4, newList.Count);
89Assert.Equal(4, newList.Count);
93Assert.Equal(4, newList.Count);
97Assert.Equal(5, newList.Count);
101Assert.Equal(5, newList.Count);
105Assert.Equal(5, newList.Count);
109Assert.Equal(5, newList.Count);
113Assert.Equal(2, newList.Count);
116newList = list.RemoveAt(list.Count - 1);
117Assert.Equal(2, newList.Count);
121Assert.Equal(2, newList.Count);
125Assert.Equal(2, newList.Count);
129Assert.Equal(2, newList.Count);
133Assert.Equal(3, newList.Count);
137Assert.Equal(3, newList.Count);
141Assert.Equal(3, newList.Count);
145Assert.Equal(4, newList.Count);
149Assert.Equal(4, newList.Count);
153Assert.Equal(4, newList.Count);
157Assert.Equal(2, newList.Count);
161Assert.Equal(2, newList.Count);
165Assert.Equal(2, newList.Count);
170Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(list.Count + 1, triviaD));
172Assert.Throws<ArgumentOutOfRangeException>(() => list.InsertRange(list.Count + 1, new[] { triviaD }));
174Assert.Throws<ArgumentOutOfRangeException>(() => list.RemoveAt(list.Count));
191Assert.Equal(0, list.Count);
197Assert.Equal(1, newList.Count);
201Assert.Equal(2, newList.Count);
205Assert.Equal(1, newList.Count);
209Assert.Equal(2, newList.Count);
213Assert.Equal(0, newList.Count);
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (1)
94if (list.Count == 0)
Microsoft.CodeAnalysis.Features (8)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic (4)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsRewriter.vb (1)
126If remainingTrivia.Count > 0 Then
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (76)
Syntax\SyntaxTokenFactoryTests.vb (33)
21Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
22Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
26Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
27Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
31Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
32Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
35Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
36Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
39Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
40Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
45Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
46Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
50Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
51Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
55Assert.Equal(keywordToken.LeadingTrivia.Count, 1)
56Assert.Equal(keywordToken.TrailingTrivia.Count, 1)
65Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
66Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
70Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
71Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
75Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
76Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
79Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
80Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
83Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
84Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
89Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
90Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
94Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
95Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
99Assert.Equal(punctuationToken.LeadingTrivia.Count, 1)
100Assert.Equal(punctuationToken.TrailingTrivia.Count, 1)
171Assert.Equal(1, id.TrailingTrivia.Count)
TestSyntaxNodes.vb (32)
307If list.Count > 0 Then
310Assert.Equal(expectedFullSpan.End, list(list.Count - 1).FullSpan.End)
312For i = 0 To list.Count - 2
333If precedingTrivia.Count = 0 Then
339If followingTrivia.Count = 0 Then
358If precedingTrivia.Count = 0 Then
364If followingTrivia.Count = 0 Then
682Assert.Equal(1, precTrivia.Count)
684Assert.Equal(1, follTrivia.Count)
698Assert.Equal(0, precTrivia.Count)
700Assert.Equal(2, follTrivia.Count)
736Assert.Equal(3, precTrivia.Count)
757Assert.Equal(1, follTrivia.Count)
773Assert.Equal(1, keyword.LeadingTrivia().Count)
774Assert.Equal(1, keyword.TrailingTrivia().Count)
785Assert.Equal(2, keyword.LeadingTrivia().Count)
787Assert.Equal(0, keyword.TrailingTrivia().Count)
794Assert.Equal(0, keyword.LeadingTrivia().Count)
795Assert.Equal(1, keyword.TrailingTrivia().Count)
805Assert.Equal(2, keyword.LeadingTrivia().Count)
806Assert.Equal(1, keyword.TrailingTrivia().Count)
822Assert.Equal(1, endTry.GetTrailingTrivia().Count)
1593Assert.Equal(2, trivia.Count)
1614Assert.Equal(2, trivia.Count)
1631Assert.True(trivia.Count = 1)
1638Assert.True(trivia.Count = 1)
1645Assert.True(trivia.Count = 2)
1653Assert.True(trivia.Count = 2)
1661Assert.True(trivia.Count = 2)
1669Assert.True(trivia.Count = 2)
1736Assert.Equal(0, tree.GetRoot().FindToken(node.FullSpan.Length - 1).TrailingTrivia.Count)
1737Assert.Equal(1, tree.GetRoot().FindToken(0).LeadingTrivia.Count)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Helpers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsRewriter.vb (1)
126If remainingTrivia.Count > 0 Then
Microsoft.CodeAnalysis.Workspaces (14)