Beispiel #1
0
        /// <summary>
        /// 筛选出非关系的对象
        /// </summary>
        /// <returns></returns>
        public SchemaInfoCollection FilterByNotRelation()
        {
            SchemaInfoCollection result = new SchemaInfoCollection();

            foreach (SchemaInfo si in this)
            {
                if (si.IsRelation == false)
                {
                    result.Add(si);
                }
            }

            result.Sort((x, y) => x.SortOrder - y.SortOrder);

            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 按照CodeNameKey进行筛选
        /// </summary>
        /// <param name="codeNameKey"></param>
        /// <returns></returns>
        public SchemaInfoCollection FilterByCodeNameKey(string codeNameKey)
        {
            SchemaInfoCollection result = new SchemaInfoCollection();

            foreach (SchemaInfo si in this)
            {
                if (si.CodeNameKey == codeNameKey)
                {
                    result.Add(si);
                }
            }

            result.Sort((x, y) => x.SortOrder - y.SortOrder);

            return(result);
        }