コード例 #1
0
 protected virtual TCommand PrepareCommandForSending <TCommand>(TCommand command, MessageSubscriber subscriber) where TCommand : IMessage
 {
     command.Version = MessageVersion;
     return(command);
 }
コード例 #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);
        }
コード例 #3
0
 protected virtual void OnAfterSendCommand(IMessage command, MessageSubscriber subscriber)
 {
     //no-op
 }