/// <summary>
        /// Constructs the specified resources.
        /// </summary>
        /// <param name="resources"></param>
        public override void construct(object[] resources) //compose(IMetaComposer composer, metaDocumentTheme theme, PropertyCollection data, params object[] resources)
        {
            List <object> reslist = resources.getFlatList <object>(typeof(PropertyCollectionList));

            PropertyCollectionList dataSet = resources[0] as PropertyCollectionList;  //reslist.getFirstOfType<PropertyCollectionList>(false, null);
            PropertyCollectionList dbInfo  = resources[1] as PropertyCollectionList;; // reslist.getFirstOfType<PropertyCollection>(false, null);
            PropertyCollection     directAccessDataList = resources[2] as PropertyCollection;

            var theme = reslist.getFirstOfType <styleTheme>(false, null);

            documentDatabaseReport report = new documentDatabaseReport();

            documents.Add(report, this);

            report.construct(resources);

            //foreach (PropertyCollection data in dataSet) {
            //    DataTable output = data.getProperObject<DataTable>(templateFieldDataTable.data_table);

            //    //data[templateFieldDataTable.data_accesslist] = directAccessList;

            //    //DataTable table = component.settings.dbc.execute("SELECT * FROM " + dba.tableName);
            //    //dba.AppendDataFields(data);
            //    //table.AppendDataFields(data);
            //    //dbDump.addDbTableReportPage(table);
            //}

            //foreach (metaDocument pg in documents)
            //{
            //    pg.construct(resources);
            //}

            //PropertyCollection extraData = new PropertyCollection();
        }
        public override void construct(object[] resources)
        {
            List <object> reslist = resources.getFlatList <object>(typeof(PropertyCollectionList), typeof(PropertyCollection));

            PropertyCollectionList dataSet = reslist.Pop <PropertyCollectionList>();              // reslist[0] as PropertyCollectionList; //.getFirstOfType<PropertyCollectionList>(false, null);
            PropertyCollection     dbInfo  = reslist.Pop <PropertyCollection>();                  // reslist.getFirstOfType<PropertyCollection>(false, null);
            PropertyCollectionList directAccessDataList = reslist.Pop <PropertyCollectionList>(); //reslist.getFirstOfType<PropertyCollectionList>(false, null);

            theme = reslist.getFirstOfType <styleTheme>(false, null);

            documentTitle       = "DB Dump report :: " + (dbInfo.getProperString(templateFieldDataTable.data_dbname) + (" @ ") + (dbInfo.getProperString(templateFieldDataTable.data_dbhost)));
            documentDescription = "Database diagnostic dump -- all tables found at {{{data_dbname}}}";
            documentBottomLine  = "Tables :: " + (dbInfo.getProperString(templateFieldDataTable.data_tablescount) + "  DB User :: " + (dbInfo.getProperString(templateFieldDataTable.data_dbuser)));

            //dataSet[0].getProperObject<PropertyCollectionList>(templateFieldDataTable.data_accesslist);

            overview = new pagePresetDataTableReportOverview(documentTitle, documentDescription, documentBottomLine);
            pages.Add(overview, this);
            overview.construct(resources);

            serviceDocumentFolderReadmePage readme = new serviceDocumentFolderReadmePage(name, documentTitle, documentDescription, documentBottomLine);

            pages.Add(readme, this);
            readme.construct(resources);

            foreach (PropertyCollection data in dataSet)
            {
                DataTable         output    = data.getProperObject <DataTable>(templateFieldDataTable.data_table);
                metaDataTablePage tablePage = new metaDataTablePage();
                pages.Add(tablePage, this);
                tablePage.construct(resources);

                acePaletteRole rl = theme.palletes.paletteRoleWheel.next();
                tablePage.settings.mainColor = rl;

                //data[templateFieldDataTable.data_accesslist] = directAccessList;

                //DataTable table = component.settings.dbc.execute("SELECT * FROM " + dba.tableName);
                //dba.AppendDataFields(data);
                //table.AppendDataFields(data);
                //dbDump.addDbTableReportPage(table);
            }

            //List<DataTable> dts = reslist.getAllOfType<DataTable>(false);

            //foreach (Object dt in dts)
            //{
            //    metaDataTablePage tmp = new metaDataTablePage();
            //    pages.Add(tmp, this);
            //    tmp.construct(dt);
            //}

            sortChildren();

            //throw new NotImplementedException();
        }
        public override void construct(object[] resources)
        {
            List <object> reslist = resources.getFlatList <object>(typeof(PropertyCollectionList), typeof(PropertyCollection));

            PropertyCollectionList directAccessDataList = reslist.Pop <PropertyCollectionList>();

            dataset = directAccessDataList;

            base.construct(resources);
        }
        /// <summary>
        /// Builds the property collection list from <c>IEnumerable</c> source collection
        /// </summary>
        /// <param name="source">Any enumerable collection of any object with public properties</param>
        /// <param name="doOnlyWithDisplayName">if set to <c>true</c> it will only include properties with declared <c>DisplayNameAttribute</c> .</param>
        /// <param name="doInherited">if set to <c>true</c> it will get inherited propertis too.</param>
        /// <param name="filedName_prefix">Name prefix to be applied before property name in order to be compatibile with templateField... enum type members</param>
        /// <param name="output">List with one <c>PropertyCollection</c> per each <c>Object</c> in source</param>
        /// <param name="fieldsOrCategoriesToShow">The fields or categories to show.</param>
        /// <returns>List of <c>PropertyCollection</c> with data obtained from <c>source</c> collection objects.</returns>
        /// \ingroup_disabled ace_ext_collections_highlight
        public static PropertyCollectionList buildPropertyCollectionList(this IEnumerable source, Boolean doOnlyWithDisplayName, Boolean doInherited, String filedName_prefix = "", PropertyCollectionList output = null, params String[] fieldsOrCategoriesToShow)
        {
            String[] filters = fieldsOrCategoriesToShow.getFlatArray <String>();

            if (output == null)
            {
                output = new PropertyCollectionList();
            }

            foreach (var item in source)
            {
                PropertyCollection itemProps = item.buildPropertyCollection <PropertyCollection>(doOnlyWithDisplayName, doInherited, filedName_prefix, null, filters);
                output.Add(itemProps);
            }

            return(output);
        }