1 write to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
34
this.
IndexInStream
= indexInStream;
47 references to IndexInStream
Microsoft.CodeAnalysis.CodeStyle (47)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
572
while (tokenData.
IndexInStream
>= 0)
580
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)
54
if (this.
IndexInStream
>= 0 && this.
IndexInStream
== other.
IndexInStream
)
66
if (this.
IndexInStream
>= 0 && other.
IndexInStream
>= 0)
67
return this.
IndexInStream
- other.
IndexInStream
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (26)
150
if (tokenData.
IndexInStream
> 0 && tokenData.
IndexInStream
< this.TokenCount)
152
return new TokenData(this, tokenData.
IndexInStream
- 1, _tokens[tokenData.
IndexInStream
- 1]);
168
if (tokenData.
IndexInStream
>= 0 && tokenData.
IndexInStream
< this.TokenCount - 1)
170
return new TokenData(this, tokenData.
IndexInStream
+ 1, _tokens[tokenData.
IndexInStream
+ 1]);
391
Debug.Assert(token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0 || (token1.
IndexInStream
+ 1 == token2.
IndexInStream
));
392
Debug.Assert((token1.
IndexInStream
>= 0 && token2.
IndexInStream
>= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));
395
if (token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0)
400
return GetTriviaData(token1.
IndexInStream
);
416
Debug.Assert(token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0 || (token1.
IndexInStream
+ 1 == token2.
IndexInStream
));
417
Debug.Assert((token1.
IndexInStream
>= 0 && token2.
IndexInStream
>= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));
419
if (token1.
IndexInStream
< 0 || token2.
IndexInStream
< 0)
424
return GetOriginalTriviaData(token1.
IndexInStream
);