/// <summary>
        ///     The add.
        /// </summary>
        /// <param name="assembly">
        ///     The assembly.
        /// </param>
        public void Add(Assembly assembly)
        {
            var export = new ExportResolver.AssemblyExportProvider(assembly);
            assemblys.Add(export);

            if (factory != null)
            {
                OnExportsChanged(
                    new ExportChangedEventArgs(
                        export.CreateExports(factory).SelectMany(ex => ex.Item1.ExportMetadata),
                        Enumerable.Empty<ExportMetadata>()));
            }
        }
        /// <summary>
        ///     The remove.
        /// </summary>
        /// <param name="assembly">
        ///     The assembly.
        /// </param>
        public void Remove(Assembly assembly)
        {
            var export = new ExportResolver.AssemblyExportProvider(assembly);

            int index = assemblys.IndexOf(export);
            if (index != -1)
            {
                export = assemblys[index];
                if (!assemblys.Remove(export)) export = null;
            }
            else export = null;

            if (factory != null && export != null)
            {
                OnExportsChanged(
                    new ExportChangedEventArgs(
                        Enumerable.Empty<ExportMetadata>(),
                        export.CreateExports(factory).SelectMany(ex => ex.Item1.ExportMetadata)));
            }
        }