private string GetTablesHashValue(IDataBase dataBase, TagInfo tags)
        {
            var tableInfoList = new List <TableInfo>();

            foreach (var item in dataBase.TableContext.Tables.OrderBy(item => item.Name))
            {
                if ((item.TableInfo.Tags & tags) != TagInfo.Unused)
                {
                    var tableInfo = item.TableInfo.Filter(tags);
                    tableInfoList.Add(tableInfo);
                }
            }
            return(CremaDataSet.GenerateHashValue(tableInfoList.ToArray()));
        }
        private string GetTablesHashValue(IDataBase dataBase, TagInfo tags)
        {
            var tableInfoList   = new List <Data.TableInfo>();
            var tableCollection = dataBase.GetService(typeof(ITableCollection)) as ITableCollection;

            foreach (var item in tableCollection.OrderBy(item => item.Name))
            {
                if ((item.TableInfo.Tags & tags) != TagInfo.Unused)
                {
                    var tableInfo = item.TableInfo.Filter(tags);
                    tableInfoList.Add(tableInfo);
                }
            }
            return(CremaDataSet.GenerateHashValue(tableInfoList.ToArray()));
        }
Exemple #3
0
        private string GetTypesHashValue(IDataBase dataBase, TagInfo tags)
        {
            var typeInfoList = new List <TypeInfo>();

            if (dataBase.TypeContext != null)
            {
                foreach (var item in dataBase.TypeContext.Types.OrderBy(item => item.Name))
                {
                    if ((item.TypeInfo.Tags & tags) != TagInfo.Unused)
                    {
                        var typeInfo = item.TypeInfo;
                        typeInfoList.Add(typeInfo);
                    }
                }
            }

            return(CremaDataSet.GenerateHashValue(typeInfoList.ToArray()));
        }