public static IEventFlowOptions AddSagaLocators(
            this IEventFlowOptions eventFlowOptions,
            Assembly fromAssembly,
            Predicate <Type> predicate = null)
        {
            predicate = predicate ?? (t => true);
            var sagaTypes = fromAssembly
                            .GetTypes()
                            .Where(t => !t.IsAbstract && typeof(ISagaLocator).IsAssignableFrom(t))
                            .Where(t => predicate(t));

            return(eventFlowOptions.AddSagaLocators(sagaTypes));
        }
        public static IEventFlowOptions AddSagaLocators(
            this IEventFlowOptions eventFlowOptions,
            Assembly fromAssembly,
            Predicate <Type> predicate = null)
        {
            predicate = predicate ?? (t => true);
            var sagaTypes = fromAssembly
                            .GetTypes()
                            .Where(t => !t.GetTypeInfo().IsAbstract&& t.IsAssignableTo <ISagaLocator>())
                            .Where(t => !t.HasConstructorParameterOfType(x => x.IsAssignableTo <ISagaLocator>()))
                            .Where(t => predicate(t));

            return(eventFlowOptions.AddSagaLocators(sagaTypes));
        }
 public static IEventFlowOptions AddSagaLocators(
     this IEventFlowOptions eventFlowOptions,
     params Type[] sagaLocatorTypes)
 {
     return(eventFlowOptions.AddSagaLocators((IEnumerable <Type>)sagaLocatorTypes));
 }