Beispiel #1
0
        protected void SaveMessage(MessageContext messagecontext, ISagaStorage storage, SagaEntity sagaentity)
        {
            if (Configuration.Storage.SaveMessage)
            {
                try
                {
                    var messageentity = CreateMessageEntity(messagecontext, sagaentity);

                    storage.CreateMessage(messagecontext, messagecontext.SagaContext.Id, sagaentity, messageentity);
                }
                catch (Exception)
                {
                    if (!Configuration.Storage.IgnoreExceptionOnSaveMessage)
                    {
                        throw;
                    }
                }
            }
        }