mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-01-12 08:58:15 +01:00
12 lines
291 B
C#
12 lines
291 B
C#
namespace Phantom.Utils.Rpc;
|
|
|
|
static class Serialization {
|
|
public const int GuidBytes = 16;
|
|
|
|
public static void WriteGuid(Span<byte> buffer, Guid guid) {
|
|
if (!guid.TryWriteBytes(buffer)) {
|
|
throw new InvalidOperationException("Span is not large enough to write a GUID.");
|
|
}
|
|
}
|
|
}
|