public ReceiveContext(Connection connection, Func<PersistentResponse, object, Task<bool>> callback, object callbackState) { _connection = connection; _callback = callback; _callbackState = callbackState; }
private static void ProcessResultsCore(Connection connection, Message message) { if (message.IsAck) { connection._logger.LogError("Connection {0} received an unexpected ACK message.", connection.Identity); return; } var command = connection._serializer.Parse<Command>(message.Value, message.Encoding); connection.ProcessCommand(command); // Only send the ack if this command is waiting for it if (message.WaitForAck) { connection._bus.Ack( acker: connection._connectionId, commandId: message.CommandId).Catch(connection._logger); } }