示例#1
0
文件: Helper.cs 项目: IronFox/Shard
 public Comparator Append <T>(IList <T> a, IList <T> b, _RequireClass <T> t = null) where T : class, IComparable <T>
 {
     if (state == 0)
     {
         int lenA = Length(a);
         int lenB = Length(b);
         if (lenA < lenB)
         {
             state = -1;
         }
         else if (lenA > lenB)
         {
             state = 1;
         }
         else
         {
             for (int i = 0; i < lenA && state == 0; i++)
             {
                 Append(a[i], b[i]);
             }
         }
     }
     return(this);
 }
示例#2
0
文件: Helper.cs 项目: IronFox/Shard
 public Comparator Append <T>(T a, T b, _RequireClass <T> t = null) where T : class, IComparable <T>
 {
     if (state == 0)
     {
         if (a == null && b == null)
         {
             return(this);
         }
         if (a == null && b != null)
         {
             state = -1;
         }
         else
         if (a != null && b == null)
         {
             state = 1;
         }
         else
         {
             state = a.CompareTo(b);
         }
     }
     return(this);
 }