2 writes to _characterWindow
Microsoft.CodeAnalysis.CSharp (2)
Parser\SlidingTextWindow.cs (2)
110
_characterWindow
= new ArraySegment<char>(s_windowPool.Allocate());
142
_characterWindow
= new(_characterWindow.Array!, 0, amountToRead);
12 references to _characterWindow
Microsoft.CodeAnalysis.CSharp (12)
Parser\SlidingTextWindow.cs (12)
123
s_windowPool.Free(
_characterWindow
.Array!);
140
this.Text.CopyTo(position,
_characterWindow
.Array!, 0, amountToRead);
142
_characterWindow = new(
_characterWindow
.Array!, 0, amountToRead);
161
if (start < 0 || start >=
_characterWindow
.Count)
164
return
_characterWindow
.AsSpan(start);
169
/// that <see cref="
_characterWindow
"/> encompases in <see cref="Text"/>. This is equal to <see cref="_characterWindowStartPositionInText"/>
170
/// + <see cref="
_characterWindow
"/>'s <see cref="ArraySegment{T}.Count"/>.
172
private readonly int CharacterWindowEndPositionInText => _characterWindowStartPositionInText +
_characterWindow
.Count;
207
textSpan =
_characterWindow
.AsSpan(span.Start - _characterWindowStartPositionInText, span.Length);
336
return
_characterWindow
.Array![position - _characterWindowStartPositionInText];
426
var array =
_characterWindow
.Array!;
470
public static ArraySegment<char> GetCharacterWindow(in SlidingTextWindow window) => window.
_characterWindow
;