private void Add(RequestNavigation item) { currentIndex++; if (list.Count > currentIndex) { list.RemoveRange(currentIndex, list.Count - currentIndex); list[0].SetPrevIndex(0); } list.Add(item); }
public void CreateNextPage(PS_ERIP item) { var page = new RequestNavigation(); if (item.EnumType == EripQAType.POSPayResponse) { page.SetResponse(item); } else { page.Request = item; } page.SetPrevIndex(currentIndex); this.Add(page); Ex.Log($"{nameof(XmlHistory)}.{nameof(CreateNextPage)}(): curr={currentIndex} prev={list[currentIndex].PrevIndex};"); Ex.Log($"{nameof(XmlHistory)}.{nameof(CreateNextPage)}(): currReq={Current?.Request?.EnumType} prevReq={PrevTransaction?.Request?.EnumType};"); }