public static IEventFlowOptions AddCommands( this IEventFlowOptions eventFlowOptions, Assembly fromAssembly, Predicate<Type> predicate) { predicate = predicate ?? (t => true); var commandTypes = fromAssembly .GetTypes() .Where(t => !t.IsAbstract && typeof(ICommand).IsAssignableFrom(t)) .Where(t => predicate(t)); return eventFlowOptions.AddCommands(commandTypes); }
public static IEventFlowOptions AddCommands( this IEventFlowOptions eventFlowOptions, params Type[] commandTypes) { return eventFlowOptions.AddCommands(commandTypes); }