예제 #1
0
        /// <summary>
        /// Compares the alias only.
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public int CompareTo(OtoAlias other)
        {//have no idea how to make this into a loop
            var n = Alias.CompareTo(other.Alias);

            if (n != 0)
            {
                return(n);
            }
            n = FName.CompareTo(other.FName);
            if (n != 0)
            {
                return(n);
            }
            n = (int)(Offset - other.Offset);
            if (n != 0)
            {
                return(n);
            }
            n = (int)(Consonant - other.Consonant);
            if (n != 0)
            {
                return(n);
            }
            n = (int)(Cutoff - other.Cutoff);
            if (n != 0)
            {
                return(n);
            }
            n = (int)(Preutterance - other.Preutterance);
            if (n != 0)
            {
                return(n);
            }
            n = (int)(Overlap - other.Overlap);
            return(n);
        }
예제 #2
0
 int IComparable <CommandEntry> .CompareTo(CommandEntry other)
 {
     return(Alias.CompareTo(other.Alias));
 }