Пример #1
0
            public bool MoveNext()
            {
                if (this.current == null && this.init.Next != null)
                {
                    this.current = this.init;
                }
                else if (this.current?.Next != null && this.current.Next != Empty)
                {
                    this.current = this.current.Next;
                }
                else
                {
                    return(false);
                }

                return(true);
            }
Пример #2
0
 public void Reset() => this.current = this.init;
Пример #3
0
 public OrderedLinkedStoreEnumerator(OrderedLinkedStore <TValue> init)
 {
     this.init = init;
 }
Пример #4
0
 private OrderedLinkedStore <TValue> SelfCopy(OrderedLinkedStore <TValue> nextNode) =>
 new OrderedLinkedStore <TValue>(this.Value, nextNode);
Пример #5
0
 private OrderedLinkedStore(TValue value, OrderedLinkedStore <TValue> next)
 {
     this.Value   = value;
     this.Next    = next;
     this.IsEmpty = false;
 }
Пример #6
0
 private OrderedLinkedStore(TValue value, OrderedLinkedStore <TValue> next)
 {
     this.value = value;
     this.next  = next;
 }