// Used for Unit tests, skipped pipeline public void TestCommand([NotNull] ICommand command) { var fetch = BitConverter.ToInt32(command.Encode(), 0); var cmd = _decoder.Decode(fetch); cmd?.Execute(this); }
public void SendCommand(ICommand <byte> command) { lock (lockingOutbound) { blockingOutboundQueue.Enqueue(command.Encode()); ++messagesSent; } }
private static byte[] GenerateBytes([NotNull] ICommand command, int align) { var size = command.GetCommandSize(align); var encCommand = command.Encode(); var retEncCommand = new byte[size]; Array.Copy(encCommand, 0, retEncCommand, 0, encCommand.Length); return(retEncCommand); }
public void SendCommand(ICommand<byte> command) { lock (lockingOutbound) { blockingOutboundQueue.Enqueue(command.Encode()); ++messagesSent; } }
public void TestOnDocumentationSamples([NotNull] ICommand command, [NotNull] byte[] expected) { Assert.AreEqual(expected, command.Encode()); }