servicepoint/servicepoint2-binding-cs/src/ServicePoint2Extensions.cs

17 lines
402 B
C#
Raw Normal View History

using System.Diagnostics.CodeAnalysis;
namespace ServicePoint2;
public static class ServicePoint2Extensions
{
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);
}
}