public esDataSourceWizard(IServiceProvider provider, DataSourceControl esDataSource)
        {
            InitializeComponent();

            this.esDataSource = esDataSource;
            this.provider     = provider;
            this.helper       = new esReflectionHelper();

            //----------------------------------------------------
            // Let's see if we can load our types right up !!
            //----------------------------------------------------
            ITypeDiscoveryService discovery = null;

            if (esDataSource.Site != null)
            {
                discovery = (ITypeDiscoveryService)esDataSource.Site.GetService(typeof(ITypeDiscoveryService));
            }

            ICollection types = discovery.GetTypes(typeof(esEntityCollectionBase), true);

            foreach (Type type in types)
            {
                if (type.IsClass && !type.IsAbstract)
                {
                    if (type.IsSubclassOf(typeof(esEntityCollectionBase)))
                    {
                        try
                        {
                            esEntityCollectionBase coll = Activator.CreateInstance(type) as esEntityCollectionBase;

                            if (coll != null)
                            {
                                collections[type.Name] = coll;
                            }
                        }
                        catch { }
                    }
                }
            }

            foreach (string collectionName in collections.Keys)
            {
                this.lboxCollections.Items.Add(collectionName);
            }
        }
        public esDataSourceWizard(IServiceProvider provider, DataSourceControl esDataSource)
        {
            InitializeComponent();

            this.esDataSource = esDataSource;
            this.provider = provider;
            this.helper = new esReflectionHelper();

            //----------------------------------------------------
            // Let's see if we can load our types right up !!
            //----------------------------------------------------
            ITypeDiscoveryService discovery = null;
            if (esDataSource.Site != null)
                discovery = (ITypeDiscoveryService)esDataSource.Site.GetService(typeof(ITypeDiscoveryService));

            ICollection types = discovery.GetTypes(typeof(esEntityCollectionBase), true);

            foreach (Type type in types)
            {
                if (type.IsClass && !type.IsAbstract)
                {
                    if (type.IsSubclassOf(typeof(esEntityCollectionBase)))
                    {
                        try
                        {
                            esEntityCollectionBase coll = Activator.CreateInstance(type) as esEntityCollectionBase;

                            if (coll != null)
                            {
                                collections[type.Name] = coll;
                            }
                        }
                        catch { }
                    }
                }
            }

            foreach (string collectionName in collections.Keys)
            {
                this.lboxCollections.Items.Add(collectionName);
            }
        }