Example #1
0
        public static Instance DetermineSagaRepositoryInstance(TransportSettings settings, SagaTypes sagaTypes)
        {
            var def = settings.SagaStorageProviders.FirstValue(x => x.RepositoryFor(sagaTypes))
                      ?? new InMemorySagaStorage().RepositoryFor(sagaTypes);

            if (def == null)
            {
                throw new SagaRepositoryUnresolvableException(sagaTypes);
            }

            return(def);
        }
 public SagaRepositoryUnresolvableException(SagaTypes sagaTypes) : base("Unable to determine a saga repository for {0}.  Does the saga type have a property Id:Guid and the message type a property of CorrelationId:Guid?".ToFormat(sagaTypes))
 {
 }
Example #3
0
 public StatefulSagaNode(SagaTypes types)
 {
     _types = types;
 }