servicepoint/crates/servicepoint_binding_cs/ServicePoint/ServicePointExtensions.cs
2024-05-26 13:15:11 +02:00

17 lines
400 B
C#

using System.Diagnostics.CodeAnalysis;
namespace ServicePoint;
public static class ServicePointExtensions
{
public static Packet IntoPacket(this Command command)
{
return Packet.FromCommand(command);
}
public static bool TryIntoCommand(this Packet packet, [MaybeNullWhen(false)] out Command command)
{
return Command.TryFromPacket(packet, out command);
}
}