コード例 #1
0
        protected int CompareTo(ChorusUrl other)
        {
            // Culture specific sorting desirable in file paths
// ReSharper disable StringCompareToIsCultureSpecific
            int result = ServerUrl.CompareTo(other.ServerUrl);

            if (result != 0)
            {
                return(result);
            }
            if (FileId.HasValue)
            {
                result = FileId.Value.CompareTo(other.FileId);
                if (result != 0)
                {
                    return(result);
                }
            }
            else if (other.FileId.HasValue)
            {
                return(-1);
            }
            return(Path.CompareTo(other.Path));
// ReSharper restore StringCompareToIsCultureSpecific
        }