Пример #1
0
        private static IObGroup ObGroup_Create(ObProperty[] obPropertys)
        {
#if DEBUG
            if (obPropertys.Length == 0)
            {
                throw new Exception("至少要有一个ObProperty参数");
            }
#endif
            IObGroup obGroup = null;
            foreach (var obProperty in obPropertys)
            {
                if (obGroup == null)
                {
                    obGroup = ObGroup_Create(obProperty);
                }
                else
                {
                    obGroup.AddGroupBy(obProperty);
                }
            }
            return(obGroup);
        }
Пример #2
0
        private static IObGroup <TSource> ObGroup_Create <TSource>(TSource source, ObProperty[] obPropertys)
            where TSource : ObTermBase
        {
#if DEBUG
            if (obPropertys.Length == 0)
            {
                throw new Exception("至少要有一个ObProperty参数");
            }
#endif
            IObGroup <TSource> obGroup = null;
            foreach (var obProperty in obPropertys)
            {
                if (obGroup == null)
                {
                    obGroup = ObGroup_Create(source, obProperty);
                }
                else
                {
                    obGroup.AddGroupBy(obProperty);
                }
            }
            return(obGroup);
        }