コード例 #1
0
        protected bool Add(MixResult newResult, int priority)
        {
            bool flag = false;

            if (newResult.IsDuplicate(this._mixResultSeed))
            {
                flag = true;
            }
            if (!flag && newResult.ResultType == MixResultType.Profile)
            {
                flag = SignIn.Instance.IsSignedInUser(newResult.Id);
            }
            if (!flag)
            {
                foreach (PriorityResult priorityResult in this._list)
                {
                    if (newResult.IsDuplicate(priorityResult.Result))
                    {
                        flag = true;
                        break;
                    }
                }
            }
            if (!flag)
            {
                this._list.Add(new PriorityResult(priority, newResult));
                this._sortedList = null;
            }
            return(!flag);
        }
コード例 #2
0
        public static MixResult CreateInstance(
            MixResultType resultType,
            string reason,
            string primaryText,
            string secondaryText,
            string id,
            string imageUri,
            Guid imageId,
            DataProviderObject baseObject)
        {
            MixResult mixResult = new MixResult();

            mixResult.Initialize(resultType, reason, primaryText, secondaryText, id, imageUri, imageId, baseObject);
            return(mixResult);
        }
コード例 #3
0
 protected MixPriorityList(MixResult mixResultSeed)
 {
     this._list          = new System.Collections.Generic.List <PriorityResult>();
     this._mixResultSeed = mixResultSeed;
 }
コード例 #4
0
 public PriorityResult(int priority, MixResult result)
 {
     this.Priority = priority;
     this.Result   = result;
 }
コード例 #5
0
 public MixAlbumPriorityList(MixResult mixResultSeed)
     : base(mixResultSeed)
 {
 }
コード例 #6
0
 public MixProfilePriorityList(MixResult mixResultSeed)
     : base(mixResultSeed)
 {
 }
コード例 #7
0
 internal virtual bool IsDuplicate(MixResult compareTo) => this.ResultType == compareTo.ResultType && this.Id == compareTo.Id;
コード例 #8
0
 internal override bool IsDuplicate(MixResult compareTo) => base.IsDuplicate(compareTo) || string.Compare(this.SecondaryText, compareTo.SecondaryText, StringComparison.InvariantCultureIgnoreCase) == 0 && string.Compare(GetComparableAlbumName(this.PrimaryText), GetComparableAlbumName(compareTo.PrimaryText), StringComparison.InvariantCultureIgnoreCase) == 0;
コード例 #9
0
 public MixArtistPriorityList(MixResult mixResultSeed)
     : base(mixResultSeed)
 {
 }
コード例 #10
0
 public MixStackEntry(MixResult result, object layout, IList dataList)
 {
     this._result   = result;
     this._layout   = layout;
     this._dataList = dataList;
 }
コード例 #11
0
 public void Push(MixResult seedResult, object layout, IList dataList) => this.Push(new MixStackEntry(seedResult, layout, dataList));