/// <summary>
        /// Gets a configuration to apply to all commands types passed as parameters.
        /// </summary>
        /// <param name="commandTypes">Types of commands to configure.</param>
        /// <returns>Mutilple command type configuration</returns>
        public MultipleCommandTypeConfiguration ForCommands(params Type[] commandTypes)
        {
            var config = new MultipleCommandTypeConfiguration(commandTypes.ToArray());

            _multipleCommandConfigs.Add(config);
            return(config);
        }
        /// <summary>
        /// Gets a configuration to apply to all commands types from a specific assembly.
        /// </summary>
        /// <param name="assembly">Assembly to load types from.</param>
        /// <returns>Multiple command type configuration</returns>
        public MultipleCommandTypeConfiguration ForCommandsInAssembly(Assembly assembly)
        {
            if (assembly == null)
            {
                throw new ArgumentNullException(nameof(assembly));
            }
            Type[] types = new Type[0];
            try
            {
                types = assembly.GetTypes();
            }
            catch (ReflectionTypeLoadException e)
            {
                types = e.Types.WhereNotNull().ToArray();
            }
            types = types.Where(IsCommandTypeAndNotAlreadyDefined).ToArray();
            var config = new MultipleCommandTypeConfiguration(types);

            _multipleCommandConfigs.Add(config);
            return(config);
        }