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