17 lines
521 B
C#
17 lines
521 B
C#
|
|
using MessagePack;
|
|||
|
|
using SHH.CameraDashboard;
|
|||
|
|
using SHH.CameraDashboard.Services;
|
|||
|
|
using SHH.Contracts;
|
|||
|
|
|
|||
|
|
public class CommandResultProcessor : IProtocolProcessor
|
|||
|
|
{
|
|||
|
|
public string ProtocolType => "COMMAND_RESULT";
|
|||
|
|
private readonly CommandBusClient _bus;
|
|||
|
|
public CommandResultProcessor(CommandBusClient bus) => _bus = bus;
|
|||
|
|
|
|||
|
|
public void Process(byte[] identity, byte[] payloadBytes)
|
|||
|
|
{
|
|||
|
|
var p = MessagePackSerializer.Deserialize<CommandResult>(payloadBytes);
|
|||
|
|
_bus.HandleResponse(p);
|
|||
|
|
}
|
|||
|
|
}
|