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); }
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); }
protected MixPriorityList(MixResult mixResultSeed) { this._list = new System.Collections.Generic.List <PriorityResult>(); this._mixResultSeed = mixResultSeed; }
public PriorityResult(int priority, MixResult result) { this.Priority = priority; this.Result = result; }
public MixAlbumPriorityList(MixResult mixResultSeed) : base(mixResultSeed) { }
public MixProfilePriorityList(MixResult mixResultSeed) : base(mixResultSeed) { }
internal virtual bool IsDuplicate(MixResult compareTo) => this.ResultType == compareTo.ResultType && this.Id == compareTo.Id;
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;
public MixArtistPriorityList(MixResult mixResultSeed) : base(mixResultSeed) { }
public MixStackEntry(MixResult result, object layout, IList dataList) { this._result = result; this._layout = layout; this._dataList = dataList; }
public void Push(MixResult seedResult, object layout, IList dataList) => this.Push(new MixStackEntry(seedResult, layout, dataList));