using System; namespace System.Text.RegularExpressions { // Token: 0x020002C1 RID: 705 internal class MRUList { // Token: 0x060019A8 RID: 6568 RVA: 0x0005B440 File Offset: 0x00059640 public MRUList() { this.head = (this.tail = null); } // Token: 0x060019A9 RID: 6569 RVA: 0x0005B464 File Offset: 0x00059664 public void Use(object o) { MRUList.Node node; if (this.head == null) { node = new MRUList.Node(o); this.head = (this.tail = node); return; } node = this.head; while (node != null && !o.Equals(node.value)) { node = node.previous; } if (node == null) { node = new MRUList.Node(o); } else { if (node == this.head) { return; } if (node == this.tail) { this.tail = node.next; } else { node.previous.next = node.next; } node.next.previous = node.previous; } this.head.next = node; node.previous = this.head; node.next = null; this.head = node; } // Token: 0x060019AA RID: 6570 RVA: 0x0005B544 File Offset: 0x00059744 public object Evict() { if (this.tail == null) { return null; } object value = this.tail.value; this.tail = this.tail.next; if (this.tail == null) { this.head = null; } else { this.tail.previous = null; } return value; } // Token: 0x040014D9 RID: 5337 private MRUList.Node head; // Token: 0x040014DA RID: 5338 private MRUList.Node tail; // Token: 0x020002C2 RID: 706 private class Node { // Token: 0x060019AB RID: 6571 RVA: 0x0005B5A0 File Offset: 0x000597A0 public Node(object value) { this.value = value; } // Token: 0x040014DB RID: 5339 public object value; // Token: 0x040014DC RID: 5340 public MRUList.Node previous; // Token: 0x040014DD RID: 5341 public MRUList.Node next; } } }