18 references to TokenCount
Microsoft.CodeAnalysis.CodeStyle (18)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
581
if (TokenStream.
TokenCount
- 1 <= tokenPairIndex ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (3)
228
if (tokenStream.
TokenCount
> 2 * list.Capacity)
229
list.EnsureCapacity(tokenStream.
TokenCount
);
306
for (var i = 0; i < context.TokenStream.
TokenCount
- 1; i++)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
31
Contract.ThrowIfFalse((indexInStream == -1) || (0 <= indexInStream && indexInStream < tokenStream.
TokenCount
));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenPairWithOperations.cs (1)
30
Contract.ThrowIfFalse(0 <= tokenPairIndex && tokenPairIndex < tokenStream.
TokenCount
- 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (12)
65
Debug.Assert(this.
TokenCount
> 0);
68
_cachedOriginalTriviaInfo = new SegmentedArray<TriviaData>(this.
TokenCount
- 1);
130
return new TokenData(this, this.
TokenCount
- 1, _tokens[this.
TokenCount
- 1]);
138
Contract.ThrowIfFalse(0 <= index && index < this.
TokenCount
);
150
if (tokenData.IndexInStream > 0 && tokenData.IndexInStream < this.
TokenCount
)
157
var lastIndex = this.
TokenCount
- 1;
168
if (tokenData.IndexInStream >= 0 && tokenData.IndexInStream < this.
TokenCount
- 1)
250
Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.
TokenCount
- 1);
358
for (var pairIndex = 0; pairIndex < this.
TokenCount
- 1; pairIndex++)
453
Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.
TokenCount
- 1);
465
Contract.ThrowIfFalse(0 <= pairIndex && pairIndex < this.
TokenCount
- 1);