/// <summary> /// Adds all sagas in the specified assemblies matching the namespace. If you are using both state machine and regular sagas, be /// sure to call AddSagaStateMachinesFromNamespaceContaining prior to calling this one. /// </summary> /// <param name="configurator"></param> /// <param name="type">The type to use to identify the assembly and namespace to scan</param> /// <param name="filter"></param> public static void AddSagaStateMachinesFromNamespaceContaining(this IServiceCollectionConfigurator configurator, Type type, Func <Type, bool> filter = null) { var registrar = new DependencyInjectionSagaStateMachineRegistrar(configurator.Collection); configurator.AddSagaStateMachinesFromNamespaceContaining(registrar, type, filter); }
/// <summary> /// Adds all sagas in the specified assemblies matching the namespace. If you are using both state machine and regular sagas, be /// sure to call AddSagaStateMachinesFromNamespaceContaining prior to calling this one. /// </summary> /// <param name="configurator"></param> /// <typeparam name="T">The anchor type</typeparam> public static void AddSagaStateMachinesFromNamespaceContaining <T>(this IServiceCollectionConfigurator configurator) { var registrar = new DependencyInjectionSagaStateMachineRegistrar(configurator.Collection); configurator.AddSagaStateMachinesFromNamespaceContaining(registrar, typeof(T)); }