1 instantiation of BufferWriter
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\BufferWriterPool\BufferWriterPooledObjectPolicy.cs (1)
54
public override BufferWriter<T> Create() =>
new
();
26 references to BufferWriter
Microsoft.Extensions.Diagnostics.ResourceMonitoring (26)
Linux\IFileSystem.cs (3)
39
void ReadAll(FileInfo file,
BufferWriter
<char> destination);
44
void ReadFirstLine(FileInfo file,
BufferWriter
<char> destination);
52
IEnumerable<ReadOnlyMemory<char>> ReadAllByLines(FileInfo file,
BufferWriter
<char> destination);
Linux\LinuxUtilizationParserCgroupV1.cs (1)
21
private static readonly ObjectPool<
BufferWriter
<char>> _sharedBufferWriterPool = BufferWriterPool.CreateBufferWriterPool<char>();
Linux\LinuxUtilizationParserCgroupV2.cs (1)
24
private static readonly ObjectPool<
BufferWriter
<char>> _sharedBufferWriterPool = BufferWriterPool.CreateBufferWriterPool<char>();
Linux\Network\LinuxNetworkUtilizationParser.cs (1)
18
private static readonly ObjectPool<
BufferWriter
<char>> _sharedBufferWriterPool = BufferWriterPool.CreateBufferWriterPool<char>();
Linux\OSFileSystem.cs (4)
44
public void ReadFirstLine(FileInfo file,
BufferWriter
<char> destination)
47
public void ReadAll(FileInfo file,
BufferWriter
<char> destination)
50
public IEnumerable<ReadOnlyMemory<char>> ReadAllByLines(FileInfo file,
BufferWriter
<char> destination)
105
private static void ReadUntilTerminatorOrEnd(FileInfo file,
BufferWriter
<char> destination, byte? terminator)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
88
/// You must reset the <see cref="
BufferWriter
{T}"/> before trying to re-use it.
src\Shared\BufferWriterPool\BufferWriterPool.cs (5)
20
/// Creates an object pool of <see cref="
BufferWriter
{T}"/> instances.
26
public static ObjectPool<
BufferWriter
<T>> CreateBufferWriterPool<T>(int maxCapacity = DefaultCapacity, int maxBufferWriterCapacity = DefaultMaxBufferWriterCapacity)
31
return PoolFactory.CreatePool<
BufferWriter
<T>>(new BufferWriterPooledObjectPolicy<T>(maxBufferWriterCapacity), maxCapacity);
35
/// Gets the shared pool of <see cref="
BufferWriter
{T}"/> instances.
37
public static ObjectPool<
BufferWriter
<byte>> SharedBufferWriterPool { get; } = CreateBufferWriterPool<byte>();
src\Shared\BufferWriterPool\BufferWriterPooledObjectPolicy.cs (7)
12
/// An object pooling policy designed for <see cref="
BufferWriter
{T}"/>.
20
internal sealed class BufferWriterPooledObjectPolicy<T> : PooledObjectPolicy<
BufferWriter
<T>>
31
/// The maximum capacity of <see cref="
BufferWriter
{T}"/> to keep in the pool.
41
/// Gets the maximum capacity of <see cref="
BufferWriter
{T}"/> to keep in the pool.
51
/// Creates an instance of <see cref="
BufferWriter
{T}"/>.
54
public override
BufferWriter
<T> Create() => new();
61
public override bool Return(
BufferWriter
<T> obj)
src\Shared\BufferWriterPool\ReturnableBufferWriter.cs (3)
20
private readonly ObjectPool<
BufferWriter
<T>> _pool;
26
public ReturnableBufferWriter(ObjectPool<
BufferWriter
<T>> pool)
35
public
BufferWriter
<T> Buffer { get; }