1 write to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
31this.IndexInStream = indexInStream;
47 references to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (47)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
571while (tokenData.IndexInStream >= 0) 579var 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)
51if (this.IndexInStream >= 0 && this.IndexInStream == other.IndexInStream) 63if (this.IndexInStream >= 0 && other.IndexInStream >= 0) 64return this.IndexInStream - other.IndexInStream;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (26)
148if (tokenData.IndexInStream > 0 && tokenData.IndexInStream < this.TokenCount) 150return new TokenData(this, tokenData.IndexInStream - 1, _tokens[tokenData.IndexInStream - 1]); 166if (tokenData.IndexInStream >= 0 && tokenData.IndexInStream < this.TokenCount - 1) 168return new TokenData(this, tokenData.IndexInStream + 1, _tokens[tokenData.IndexInStream + 1]); 389Debug.Assert(token1.IndexInStream < 0 || token2.IndexInStream < 0 || (token1.IndexInStream + 1 == token2.IndexInStream)); 390Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 393if (token1.IndexInStream < 0 || token2.IndexInStream < 0) 398return GetTriviaData(token1.IndexInStream); 414Debug.Assert(token1.IndexInStream < 0 || token2.IndexInStream < 0 || (token1.IndexInStream + 1 == token2.IndexInStream)); 415Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 417if (token1.IndexInStream < 0 || token2.IndexInStream < 0) 422return GetOriginalTriviaData(token1.IndexInStream);