void IRegistrationConfigurator.AddSaga(Type sagaType, Type sagaDefinitionType) { if (sagaType.HasInterface<SagaStateMachineInstance>()) throw new ArgumentException($"State machine sagas must be registered using AddSagaStateMachine: {TypeMetadataCache.GetShortName(sagaType)}"); _sagaRegistrations.GetOrAdd(sagaType, type => SagaRegistrationCache.CreateRegistration(type, sagaDefinitionType, _containerRegistrar)); }
public void AddSaga(Type sagaType, Type sagaDefinitionType) { if (sagaType.HasInterface <SagaStateMachineInstance>()) { throw new ArgumentException($"State machine sagas must be registered using AddSagaStateMachine: {TypeMetadataCache.GetShortName(sagaType)}"); } _sagas.GetOrAdd(sagaType, type => SagaRegistrationCache.CreateRegistration(type, Registrar)); if (sagaDefinitionType != null) { SagaDefinitionRegistrationCache.Register(sagaDefinitionType, Registrar); } }
void IRegistrationConfigurator.AddSaga(Type sagaType, Type sagaDefinitionType) { _sagaRegistrations.GetOrAdd(sagaType, type => SagaRegistrationCache.CreateRegistration(type, sagaDefinitionType, _containerRegistrar)); }