1 write to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
31
this.
IndexInStream
= indexInStream;
47 references to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (47)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
571
while (tokenData.
IndexInStream
>= 0)
579
var tokenPairIndex = tokenData.
IndexInStream
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (12)
331
if (previousToken.
IndexInStream
< 0 || triviaInfo.Spaces == baseSpaceOrIndentation)
350
previousToken.
IndexInStream
,
375
list.Sort((t1, t2) => t1.
IndexInStream
- t2.
IndexInStream
);
416
for (var pairIndex = firstToken.
IndexInStream
; pairIndex < lastToken.
IndexInStream
; pairIndex++)
497
if (tokenWithIndex.
IndexInStream
< 0)
504
while (tokenWithIndex.
IndexInStream
>= 0)
513
var tokenPairIndex = tokenWithIndex.
IndexInStream
- 1;
524
if (tokenWithIndex.
IndexInStream
< 0)
536
startToken = startToken.
IndexInStream
< 0 ? context.TokenStream.FirstTokenInStream : startToken;
537
endToken = endToken.
IndexInStream
< 0 ? context.TokenStream.LastTokenInStream : endToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (7)
51
if (this.
IndexInStream
>= 0 && this.
IndexInStream
== other.
IndexInStream
)
63
if (this.
IndexInStream
>= 0 && other.
IndexInStream
>= 0)
64
return this.
IndexInStream
- other.
IndexInStream
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (26)
148
if (tokenData.
IndexInStream
> 0 && tokenData.
IndexInStream
< this.TokenCount)
150
return new TokenData(this, tokenData.
IndexInStream
- 1, _tokens[tokenData.
IndexInStream
- 1]);
166
if (tokenData.
IndexInStream
>= 0 && tokenData.
IndexInStream
< this.TokenCount - 1)
168
return new TokenData(this, tokenData.
IndexInStream
+ 1, _tokens[tokenData.
IndexInStream
+ 1]);
389
Debug.Assert(token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0 || (token1.
IndexInStream
+ 1 == token2.
IndexInStream
));
390
Debug.Assert((token1.
IndexInStream
>= 0 && token2.
IndexInStream
>= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));
393
if (token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0)
398
return GetTriviaData(token1.
IndexInStream
);
414
Debug.Assert(token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0 || (token1.
IndexInStream
+ 1 == token2.
IndexInStream
));
415
Debug.Assert((token1.
IndexInStream
>= 0 && token2.
IndexInStream
>= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));
417
if (token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0)
422
return GetOriginalTriviaData(token1.
IndexInStream
);