using InABox.Core;

namespace InABox.IPC
{
    public class RPCDeleteCommand : IRPCCommand<RPCDeleteParameters, RPCDeleteResponse> { }
    
    public class RPCDeleteParameters : ISerializeBinary
    {

        public Type Type { get; set; }
        
        public Guid[]? IDs { get; set; }

        public void SerializeBinary(CoreBinaryWriter writer)
        {
            writer.Write(Type.EntityName());
            writer.WriteBinaryValue(typeof(Guid[]), IDs);
        }

        public void DeserializeBinary(CoreBinaryReader reader)
        {
            Type = CoreUtils.GetEntity(reader.ReadString());
            IDs = reader.ReadBinaryValue(typeof(Guid[])) as Guid[];
        }
    }
    
    public class RPCDeleteResponse
    {
    }

}