Esempio n. 1
0
 public StatefulSagaNode(SagaTypes types)
 {
     _types = types;
 }
Esempio n. 2
0
 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))
 {
 }
        public static ObjectDef DetermineSagaRepositoryDef(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);
        }