IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
DiagnosticChannelWriterExtensions.cs
Go to the documentation of this file.
1using System;
2using System.Buffers;
3using System.IO;
4
6{
7
9 {
10
16 public static void Write(this IDiagnosticChannelWriter writer, ReadOnlySpan<byte> buffer)
17 {
18 var mem = MemoryPool<byte>.Shared.Rent(buffer.Length);
19 buffer.CopyTo(mem.Memory.Span);
20 writer.Write(mem, buffer.Length);
21 }
22
23 }
24
25}
static void Write(this IDiagnosticChannelWriter writer, ReadOnlySpan< byte > buffer)
Writes the given buffer.
void Write(IMemoryOwner< byte > memory, int length)
Enqueues the specified memory to the diagnostic channel.