public static DataStructureItem New(emPlatform platform, emDSItemType type, string file, string group = "")
        {
            var item = new DataStructureItem();

            item.Platform = platform;
            item.ItemType = type;
            item.FilePath = file;
            item.Group    = group;
            return(item);
        }
        IList <DataStructureItem> GetItems(string folder)
        {
            var dsItems = new List <DataStructureItem>();

            if (!System.IO.Directory.Exists(folder))
            {
                return(dsItems);
            }
            foreach (var item in System.IO.Directory.GetFiles(folder))
            {
                var fileName = System.IO.Path.GetFileName(item);
                var group    = System.IO.Path.GetDirectoryName(item).Replace(this.WorkFolder, "");
                group += @"\";
                if (fileName.StartsWith(SIGN_DATA_STRUCTURE_HEADER, StringComparison.InvariantCultureIgnoreCase) &&
                    fileName.EndsWith(SIGN_DATA_STRUCTURE_END, StringComparison.InvariantCultureIgnoreCase)
                    )
                {
                    // 数据结构项目
                    var platform = fileName.StartsWith(SIGN_B1_DATA_STRUCTURE_HEADER, StringComparison.InvariantCultureIgnoreCase) ? emPlatform.b1 : emPlatform.ibas;
                    var itemtype = emDSItemType.data_structure;

                    var dsItem = DataStructureItem.New(platform, itemtype, item, group);
                    dsItems.Add(dsItem);
                }
                if (fileName.EndsWith(SIGN_SQL_SCRIPT_END, StringComparison.InvariantCultureIgnoreCase))
                {
                    // 数据库脚本项目
                    var platform = emPlatform.ibas;
                    var itemtype = emDSItemType.sql_script;
                    var dsItem   = DataStructureItem.New(platform, itemtype, item, group);
                    dsItems.Add(dsItem);
                }
            }
            foreach (var item in System.IO.Directory.GetDirectories(folder))
            {
                dsItems.AddRange(this.GetItems(item));
            }
            return(dsItems);
        }