1 write to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
34this.IndexInStream = indexInStream;
47 references to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (47)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
572while (tokenData.IndexInStream >= 0) 580var tokenPairIndex = tokenData.IndexInStream;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (12)
331if (previousToken.IndexInStream < 0 || triviaInfo.Spaces == baseSpaceOrIndentation) 350previousToken.IndexInStream, 375list.Sort((t1, t2) => t1.IndexInStream - t2.IndexInStream); 416for (var pairIndex = firstToken.IndexInStream; pairIndex < lastToken.IndexInStream; pairIndex++) 497if (tokenWithIndex.IndexInStream < 0) 504while (tokenWithIndex.IndexInStream >= 0) 513var tokenPairIndex = tokenWithIndex.IndexInStream - 1; 524if (tokenWithIndex.IndexInStream < 0) 536startToken = startToken.IndexInStream < 0 ? context.TokenStream.FirstTokenInStream : startToken; 537endToken = endToken.IndexInStream < 0 ? context.TokenStream.LastTokenInStream : endToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (7)
54if (this.IndexInStream >= 0 && this.IndexInStream == other.IndexInStream) 66if (this.IndexInStream >= 0 && other.IndexInStream >= 0) 67return this.IndexInStream - other.IndexInStream;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (26)
150if (tokenData.IndexInStream > 0 && tokenData.IndexInStream < this.TokenCount) 152return new TokenData(this, tokenData.IndexInStream - 1, _tokens[tokenData.IndexInStream - 1]); 168if (tokenData.IndexInStream >= 0 && tokenData.IndexInStream < this.TokenCount - 1) 170return new TokenData(this, tokenData.IndexInStream + 1, _tokens[tokenData.IndexInStream + 1]); 391Debug.Assert(token1.IndexInStream < 0 || token2.IndexInStream < 0 || (token1.IndexInStream + 1 == token2.IndexInStream)); 392Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 395if (token1.IndexInStream < 0 || token2.IndexInStream < 0) 400return GetTriviaData(token1.IndexInStream); 416Debug.Assert(token1.IndexInStream < 0 || token2.IndexInStream < 0 || (token1.IndexInStream + 1 == token2.IndexInStream)); 417Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 419if (token1.IndexInStream < 0 || token2.IndexInStream < 0) 424return GetOriginalTriviaData(token1.IndexInStream);