1 instantiation of RecyclableReadOnlySequenceSegment
Microsoft.AspNetCore.OutputCaching (1)
RecyclableReadOnlySequenceSegment.cs (1)
29
var obj = s_Spares.TryDequeue(out var value) ? value :
new
();
23 references to RecyclableReadOnlySequenceSegment
Microsoft.AspNetCore.OutputCaching (23)
OutputCacheEntry.cs (2)
77
Body =
RecyclableReadOnlySequenceSegment
.CreateSequence(segments);
125
=>
RecyclableReadOnlySequenceSegment
.CopyToAsync(Body, destination, cancellationToken);
OutputCacheEntryFormatter.cs (3)
324
RecyclableReadOnlySequenceSegment
first =
RecyclableReadOnlySequenceSegment
.Create(ReadSegment(ref reader), null), last = first;
327
last =
RecyclableReadOnlySequenceSegment
.Create(ReadSegment(ref reader), last);
RecyclableReadOnlySequenceSegment.cs (13)
24
public static
RecyclableReadOnlySequenceSegment
Create(int minimumLength,
RecyclableReadOnlySequenceSegment
? previous)
27
public static
RecyclableReadOnlySequenceSegment
Create(ReadOnlyMemory<byte> memory,
RecyclableReadOnlySequenceSegment
? previous)
29
var
obj = s_Spares.TryDequeue(out
var
value) ? value : new();
40
static readonly ConcurrentQueue<
RecyclableReadOnlySequenceSegment
> s_Spares = new();
42
public static void RecycleChain(
RecyclableReadOnlySequenceSegment
? obj, bool recycleBuffers = false)
49
var
next = obj.Next as
RecyclableReadOnlySequenceSegment
;
64
var
obj = value.Start.GetObject() as
RecyclableReadOnlySequenceSegment
;
93
RecyclableReadOnlySequenceSegment
first = Create(segments[0], null), last = first;
RecyclableSequenceBuilder.cs (5)
13
private
RecyclableReadOnlySequenceSegment
? _firstSegment, _currentSegment;
40
RecyclableReadOnlySequenceSegment
.RecycleChain(_firstSegment, recycleBuffers: false);
57
public void Dispose() =>
RecyclableReadOnlySequenceSegment
.RecycleChain(DetachAndReset(), recycleBuffers: true);
69
_currentSegment = _firstSegment =
RecyclableReadOnlySequenceSegment
.Create(_segmentSize, null);
79
_currentSegment =
RecyclableReadOnlySequenceSegment
.Create(_segmentSize, _currentSegment);