2024-05-13 00:17:40 +02:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
2024-05-25 11:16:37 +02:00
|
|
|
namespace ServicePoint;
|
2024-05-13 00:17:40 +02:00
|
|
|
|
2024-10-19 14:21:50 +02:00
|
|
|
public sealed partial class Command
|
2024-05-13 00:17:40 +02:00
|
|
|
{
|
2024-05-15 20:34:51 +02:00
|
|
|
public static bool TryFromPacket(Packet packet, [MaybeNullWhen(false)] out Command command)
|
2024-05-13 00:17:40 +02:00
|
|
|
{
|
2024-10-19 14:21:50 +02:00
|
|
|
return (command = TryFromPacket(packet)) != null;
|
2024-05-13 00:17:40 +02:00
|
|
|
}
|
2024-10-19 14:45:21 +02:00
|
|
|
|
|
|
|
public Packet IntoPacket()
|
|
|
|
{
|
|
|
|
return Packet.FromCommand(this);
|
|
|
|
}
|
2024-05-13 00:17:40 +02:00
|
|
|
}
|