internal bool AddEntry(MRUEntry emp, MRUList.Spot addInSpot = MRUList.Spot.Last) { if (emp == null) { return(false); } if (this.Entries == null) { this.Entries = new List <MRUEntry>(); } switch (addInSpot) { case Spot.First: this.Entries.Insert(0, new MRUEntry(emp)); return(true); case Spot.Last: this.Entries.Add(new MRUEntry(emp)); return(true); default: throw new NotImplementedException(addInSpot.ToString()); } }
/// <summary> /// Copy Constructor /// </summary> public MRUEntry(MRUEntry copyFrom) { if (copyFrom == null) { return; } this.PathFileName = copyFrom.PathFileName; this.IsPinned = copyFrom.IsPinned; }
internal void AddPinedEntry(MRUEntry emp) { if (emp == null) { return; } if (this.Entries == null) { this.Entries = new List <MRUEntry>(); } this.Entries.Add(new MRUEntry(emp)); }