/// <summary> /// Initializes a new instance of the <see cref="Enumerator"/> struct. /// </summary> /// <param name="stack">The stack to enumerator.</param> internal Enumerator(ImmutableStack <T> stack) { Requires.NotNull(stack, nameof(stack)); _originalStack = stack; _remainingStack = null; }
/// <summary> /// Initializes a new instance of the <see cref="EnumeratorObject"/> class. /// </summary> /// <param name="stack">The stack to enumerator.</param> internal EnumeratorObject(ImmutableStack <T> stack) { Requires.NotNull(stack, nameof(stack)); _originalStack = stack; }
/// <summary> /// Resets the position to just before the first element in the list. /// </summary> public void Reset() { this.ThrowIfDisposed(); _remainingStack = null; }
/// <summary> /// Restarts enumeration. /// </summary> public void Reset() { this.ThrowIfDisposed(); _remainingBackwardsStack = null; _remainingForwardsStack = null; }
/// <summary> /// Initializes a new instance of the <see cref="ImmutableStack<T>"/> class. /// </summary> /// <param name="head">The head element on the stack.</param> /// <param name="tail">The rest of the elements on the stack.</param> private ImmutableStack(T head, ImmutableStack <T> tail) { Requires.NotNull(tail, "tail"); this.head = head; this.tail = tail; }
/// <summary> /// Initializes a new instance of the <see cref="DebuggerProxy"/> class. /// </summary> /// <param name="stack">The collection to display in the debugger</param> public DebuggerProxy(ImmutableStack <T> stack) { Requires.NotNull(stack, "stack"); this.stack = stack; }
/// <summary> /// Initializes a new instance of the <see cref="EnumeratorObject"/> class. /// </summary> /// <param name="stack">The stack to enumerator.</param> internal EnumeratorObject(ImmutableStack <T> stack) { Requires.NotNull(stack, "stack"); this.originalStack = stack; }
/// <summary> /// Initializes a new instance of the <see cref="Enumerator"/> struct. /// </summary> /// <param name="stack">The stack to enumerator.</param> internal Enumerator(ImmutableStack <T> stack) { Requires.NotNull(stack, "stack"); this.originalStack = stack; this.remainingStack = null; }