18 lines
447 B
C#
18 lines
447 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace PlantBox.Shared.Communication.Commands
|
|
{
|
|
public abstract class CommandSerializable<T>
|
|
{
|
|
public abstract string[] Serialize();
|
|
public abstract T Deserialize(string[] arguments);
|
|
|
|
public CommandPacket ToCommandPacket(Command command, ulong id)
|
|
{
|
|
return new CommandPacket(command, id, Serialize());
|
|
}
|
|
}
|
|
}
|