예제 #1
0
        // Methods
        public int Compare(object x, object y)
        {
            if ((x == null) && (y == null))
            {
                return(0);
            }
            if (x == null)
            {
                return(-1);
            }
            if (y == null)
            {
                return(1);
            }
            DiscCommand disc  = (DiscCommand)x;
            DiscCommand disc2 = (DiscCommand)y;

            if (disc.IsDrive != disc2.IsDrive)
            {
                if (!disc.IsDrive)
                {
                    return(1);
                }
                return(-1);
            }
            int num = string.Compare(disc.Type, disc2.Type, true, CultureInfo.CurrentUICulture);

            if (num == 0)
            {
                return(MediaChangeManagerHelper.StrCmpLogicalW(disc.SortingName, disc2.SortingName));
            }
            return(num);
        }
예제 #2
0
 // Methods
 public int Compare(object x, object y)
 {
     if ((x == null) && (y == null))
     {
         return(0);
     }
     if (x != null)
     {
         if (y == null)
         {
             return(1);
         }
         DiscCommand disc  = (DiscCommand)x;
         DiscCommand disc2 = (DiscCommand)y;
         if (disc.IsDrive == disc2.IsDrive)
         {
             return(MediaChangeManagerHelper.StrCmpLogicalW(disc.SortingName, disc2.SortingName));
         }
         if (!disc.IsDrive)
         {
             return(1);
         }
     }
     return(-1);
 }