Ejemplo n.º 1
0
        public int CompareTo(object obj)
        {
            DocumentsDisplayColumnInfo objYItem = null;

            objYItem = (DocumentsDisplayColumnInfo)obj;
            return(DisplayOrder.CompareTo(objYItem.DisplayOrder));
        }
Ejemplo n.º 2
0
        public int CompareTo(PluginDescriptor other)
        {
            if (DisplayOrder != other.DisplayOrder)
                return DisplayOrder.CompareTo(other.DisplayOrder);

            return FriendlyName.CompareTo(other.FriendlyName);
        }
Ejemplo n.º 3
0
 public int CompareTo(PluginDescriptor other)
 {
     if (DisplayOrder != other.DisplayOrder)
     {
         return(DisplayOrder.CompareTo(other.DisplayOrder));
     }
     return(string.Compare(FriendlyName, other.FriendlyName, StringComparison.Ordinal));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Compares this instance with a specified PluginDescriptor object
        /// </summary>
        /// <param name="other">The PluginDescriptor to compare with this instance</param>
        /// <returns>An integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified parameter</returns>
        public int CompareTo(PluginDescriptor other)
        {
            if (DisplayOrder != other.DisplayOrder)
            {
                return(DisplayOrder.CompareTo(other.DisplayOrder));
            }

            return(string.Compare(FriendlyName, other.FriendlyName, StringComparison.InvariantCultureIgnoreCase));
        }
        public virtual int CompareTo(PluginDescriptor other)
        {
            if (DisplayOrder != other.DisplayOrder)
            {
                return(DisplayOrder.CompareTo(other.DisplayOrder));
            }

            return(FriendlyName.CompareTo(other.FriendlyName));
        }
Ejemplo n.º 6
0
        public int CompareTo([AllowNull] PluginDescriptor other)
        {
            if (DisplayOrder != other.DisplayOrder)
            {
                return(DisplayOrder.CompareTo(other.DisplayOrder));
            }

            return(string.Compare(SystemName, other.SystemName, StringComparison.InvariantCultureIgnoreCase));
        }
Ejemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public int CompareTo(PluginDescriptor other)
        {
            //首先比较DisplayOrder,如果一致则比较FriendlyName
            if (DisplayOrder != other.DisplayOrder)
            {
                return(DisplayOrder.CompareTo(other.DisplayOrder));
            }

            return(FriendlyName.CompareTo(other.FriendlyName));
        }
Ejemplo n.º 8
0
        public int CompareTo(PluginDescriptor other)
        {
            //实现CompareTo方法是为了以后插件排序
            if (DisplayOrder != other.DisplayOrder)
            {
                return(DisplayOrder.CompareTo(other.DisplayOrder));
            }

            return(FriendlyName.CompareTo(other.FriendlyName));
        }
Ejemplo n.º 9
0
 public int CompareTo(PluginDescriptor other)
 {
     if (DisplayOrder != other.DisplayOrder)
     {
         return(DisplayOrder.CompareTo(other.DisplayOrder));
     }
     else if (FriendlyName != null)
     {
         return(FriendlyName.CompareTo(other.FriendlyName));
     }
     return(0);
 }
Ejemplo n.º 10
0
        public override int CompareTo(object module)
        {
            if (module == null)
            {
                return(1);
            }

            if ((module as Module).PriorModule == PriorModule)
            {
                return(DisplayOrder.CompareTo((module as Module).DisplayOrder));
            }

            return(PriorModule.CompareTo((module as Module).PriorModule));
        }
Ejemplo n.º 11
0
        public override int CompareTo(object dictionary)
        {
            if (dictionary == null)
            {
                return(1);
            }

            if ((dictionary as Dictionary).ParentID == ParentID)
            {
                return(DisplayOrder.CompareTo((dictionary as Dictionary).DisplayOrder));
            }

            return(ParentID.CompareTo((dictionary as Dictionary).ParentID));
        }
Ejemplo n.º 12
0
 public int CompareTo(Achievement other)
 {
     if (other.DateEarned.HasValue)
     {
         if (DateEarned.HasValue)
         {
             if (DateEarned.Value == other.DateEarned.Value)
             {
                 return(DisplayOrder.CompareTo(other.DisplayOrder));
             }
             return(DateEarned.Value < other.DateEarned.Value ? -1 : 1);
         }
         return(-1);
     }
     else if (DateEarned.HasValue)
     {
         return(1);
     }
     return(DisplayOrder.CompareTo(other.DisplayOrder));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Compares the ability to <paramref name="other"/>
 /// </summary>
 /// <param name="other">The other ability</param>
 /// <returns>An integer used for determining sort order</returns>
 public int CompareTo(AbilityBase other)
 {
     return(DisplayOrder.CompareTo(other.DisplayOrder));
 }