protected virtual TCommand PrepareCommandForSending <TCommand>(TCommand command, MessageSubscriber subscriber) where TCommand : IMessage
 {
     command.Version = MessageVersion;
     return(command);
 }
Exemplo n.º 2
0
        protected override TCommand PrepareCommandForSending <TCommand>(TCommand command, MessageSubscriber subscriber)
        {
            Logger(string.Format("Preparing to Send Command of type {0}, MessageId = {1}", typeof(TCommand).Name, command.Id));

            command = base.PrepareCommandForSending(command, subscriber);

            var durableCommand = command as IDurableMessage;

            if (null == durableCommand)
            {
                return(command);
            }

            durableCommand.AcknowledgmentId = Guid.NewGuid();

            StoreCommand(durableCommand);

            return((TCommand)durableCommand);
        }
 protected virtual void OnAfterSendCommand(IMessage command, MessageSubscriber subscriber)
 {
     //no-op
 }