Пример #1
0
        internal Sagas()
        {
            sagaConfigurationCache = new SagaConfigurationCache();
            sagaMessageFindingConfiguration = new ConfigureHowToFindSagaWithMessageDispatcher(sagaConfigurationCache);
            EnableByDefault();

            Defaults(s =>
            {
                conventions = s.Get<Conventions>();

                var sagas = s.GetAvailableTypes().Where(IsSagaType).ToList();
                if (sagas.Count > 0)
                {
                    conventions.AddSystemMessagesConventions(t => IsTypeATimeoutHandledByAnySaga(t, sagas));
                }
            });

            Prerequisite(config => config.Settings.GetAvailableTypes().Any(IsSagaType), "No sagas was found in scabbed types");
        }
Пример #2
0
 public ConfigureHowToFindSagaWithMessageDispatcher(SagaConfigurationCache sagaConfigurationCache)
 {
     this.sagaConfigurationCache = sagaConfigurationCache;
 }