Exemple #1
0
        public static int DatCompare(RvDat var1, RvDat var2)
        {
            int retv = Math.Sign(string.Compare(var1.GetData(RvDat.DatData.DatRootFullName), var2.GetData(RvDat.DatData.DatRootFullName), StringComparison.CurrentCultureIgnoreCase));

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

            retv = Math.Sign(var1.TimeStamp.CompareTo(var2.TimeStamp));
            if (retv != 0)
            {
                return(retv);
            }

            retv = Math.Sign(var1.MultiDatsInDirectory.CompareTo(var2.MultiDatsInDirectory));
            if (retv != 0)
            {
                return(retv);
            }

            retv = Math.Sign(var1.MultiDatOverride.CompareTo(var2.MultiDatOverride));
            if (retv != 0)
            {
                return(retv);
            }

            retv = Math.Sign(var1.UseDescriptionAsDirName.CompareTo(var2.UseDescriptionAsDirName));
            if (retv != 0)
            {
                return(retv);
            }

            retv = Math.Sign(var1.SingleArchive.CompareTo(var2.SingleArchive));
            if (retv != 0)
            {
                return(retv);
            }
            retv = Math.Sign(var1.SubDirType.CompareTo(var2.SubDirType));
            if (retv != 0)
            {
                return(retv);
            }

            return(0);
        }
Exemple #2
0
        public static int DatCompare(RvDat var1, RvDat var2)
        {
            int retv = Math.Sign(string.Compare(var1.GetData(RvDat.DatData.DatRootFullName), var2.GetData(RvDat.DatData.DatRootFullName), StringComparison.CurrentCultureIgnoreCase));

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


            retv = Math.Sign(var1.TimeStamp.CompareTo(var2.TimeStamp));
            if (retv != 0)
            {
                return(retv);
            }

            retv = Math.Sign(var1.AutoAddDirectory.CompareTo(var2.AutoAddDirectory));
            if (retv != 0)
            {
                return(retv);
            }

            return(0);
        }