public int CompareTo(OneDriveEntry other)
 {
     if (IsFile == other.IsFile)
     {
         return(string.Compare(Name, other.Name, StringComparison.CurrentCultureIgnoreCase));
     }
     return(IsFile.CompareTo(other.IsFile));
 }
示例#2
0
        public int CompareTo(CompressedFileInfo other)
        {
            var name = string.Compare(FullName, other?.FullName, StringComparison.Ordinal);

            if (name != 0)
            {
                return(name);
            }

            var size = Length.CompareTo(other?.Length ?? 0);

            if (size != 0)
            {
                return(size);
            }

            var file = IsFile.CompareTo(other?.IsFile == true);

            return(file);
        }