IKVM11
11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
DiagnosticChannelWriterExtensions.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Buffers;
3
using
System.IO;
4
5
namespace
IKVM.Tools.Core.Diagnostics
6
{
7
8
public
static
class
DiagnosticChannelWriterExtensions
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
}
IKVM.Tools.Core.Diagnostics.DiagnosticChannelWriterExtensions
Definition
DiagnosticChannelWriterExtensions.cs:9
IKVM.Tools.Core.Diagnostics.DiagnosticChannelWriterExtensions.Write
static void Write(this IDiagnosticChannelWriter writer, ReadOnlySpan< byte > buffer)
Writes the given buffer.
Definition
DiagnosticChannelWriterExtensions.cs:16
IKVM.Tools.Core.Diagnostics.IDiagnosticChannelWriter
Definition
IDiagnosticChannelWriter.cs:8
IKVM.Tools.Core.Diagnostics.IDiagnosticChannelWriter.Write
void Write(IMemoryOwner< byte > memory, int length)
Enqueues the specified memory to the diagnostic channel.
IKVM.Tools.Core.Diagnostics
Definition
AsyncDiagnosticChannelWriter.cs:8
System
Definition
HexConverter.cs:9
src
IKVM.Tools.Core
Diagnostics
DiagnosticChannelWriterExtensions.cs
Generated by
1.12.0