| 1234567891011121314151617181920212223242526272829303132333435363738 |
- using System.Collections.Generic;
- namespace ET
- {
- public class GalleryRankByRecommendCountComponent : Entity, IAwake, IDestroy
- {
- public Dictionary<long, GalleryRankInfoByRecommendCount> RankInfoDIc = new Dictionary<long, GalleryRankInfoByRecommendCount>();
- public SortedList<GalleryRankInfoByRecommendCount, long> RankList = new SortedList<GalleryRankInfoByRecommendCount, long>(new GalleryRankByRecommendCountCompare());
- }
- public class GalleryRankByRecommendCountCompare : IComparer<GalleryRankInfoByRecommendCount>
- {
- public int Compare(GalleryRankInfoByRecommendCount a, GalleryRankInfoByRecommendCount b)
- {
- if (a.IsDisposed || b.IsDisposed)
- {
- return 0;
- }
- int result = (int)(a.BeRecommendCount - b.BeRecommendCount);
- if (result != 0)
- {
- return result;
- }
- if (b.Id > a.Id)
- {
- return 1;
- }
- if (b.Id < a.Id)
- {
- return -1;
- }
- return 0;
- }
- }
- }
|