public int CompareTo(PluginDescriptor other) { if (DisplaySubscription != other.DisplaySubscription) { return(DisplaySubscription.CompareTo(other.DisplaySubscription)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
/// <summary> /// 将此实例与指定的PluginDescriptor对象进行比较 /// </summary> /// <param name="other">PluginDescriptor与此实例进行比较</param> /// <returns>一个整数,指示此实例是否在排序顺序中与指定参数相同,位于或出现在同一位置</returns> public int CompareTo(PluginDescriptor other) { if (DisplayOrder != other.DisplayOrder) { return(DisplayOrder.CompareTo(other.DisplayOrder)); } return(FriendlyName.CompareTo(other.FriendlyName)); }
/// <summary> /// Compares this instance with a specified ModuleInfo object /// </summary> /// <param name="value"></param> /// <returns></returns> public virtual int CompareTo(ModuleInfo otherModule) { if (Priority != otherModule.Priority) { return(Priority.CompareTo(otherModule.Priority)); } return(FriendlyName.CompareTo(otherModule.FriendlyName)); }
public int CompareTo(object obj) { FolderMapping other = obj as FolderMapping; if (other == null) { return(-1); } int compare = 0; if (FriendlyName != null) { compare = FriendlyName.CompareTo(other.FriendlyName); } else if (other.FriendlyName != null) { compare = other.FriendlyName.CompareTo(FriendlyName); } if (compare != 0) { return(compare); } if (ClientSidePath != null) { compare = ClientSidePath.CompareTo(other.ClientSidePath); } else if (other.ClientSidePath != null) { compare = other.ClientSidePath.CompareTo(ClientSidePath); } return(compare); }