/// <summary>
        ///  Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the <paramref name="scriptFiles"/>.
        /// </summary>
        /// <param name="scriptFiles">
        ///     Scripts files to be executed and added to the catalog.
        /// </param>
        /// <param name="options">
        ///     Options of the ScriptCsCatalog.
        /// </param>
        public ScriptCsCatalog(IEnumerable <string> scriptFiles, ScriptCsCatalogOptions options)
        {
            if (scriptFiles == null || !scriptFiles.Any())
            {
                throw new ArgumentNullException("scriptFiles");
            }

            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _options = options.OverridesNullByDefault();

            Initialize(scriptFiles);
        }
        /// <summary>
        /// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the files corresponding to <paramref name="searchPattern"/>
        ///     in the given directory path.
        /// </summary>
        /// <param name="path">
        ///     Path to the directory to scan for assemblies to add to the catalog.
        ///     The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/>
        /// </param>
        /// <param name="searchPattern">
        ///     Search pattern to get all scripts files from the directory.
        /// </param>
        /// <param name="options">
        ///     Options of the ScriptCsCatalog.
        /// </param>
        public ScriptCsCatalog(string path, string searchPattern, ScriptCsCatalogOptions options)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException("path");
            }

            if (string.IsNullOrEmpty(searchPattern))
            {
                throw new ArgumentNullException("searchPattern");
            }

            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _options = options.OverridesNullByDefault();

            Initialize(path, searchPattern);
        }
 /// <summary>
 /// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.csx files
 ///     in the given directory path.
 /// </summary>
 /// <param name="path">
 ///     Path to the directory to scan for assemblies to add to the catalog.
 ///     The path needs to be absolute or relative to <see cref="AppDomain.BaseDirectory"/>
 /// </param>
 /// <param name="options">
 ///     Options of the ScriptCsCatalog.
 /// </param>
 public ScriptCsCatalog(string path, ScriptCsCatalogOptions options)
     : this(path, "*.csx", options)
 {
 }