public StackDebugView(Stack stack) { if (stack == null) throw new ArgumentNullException("stack"); this.stack = stack; }
internal StackEnumerator(Stack stack) { // Contract.Requires(stack != null); // Contract.Requires(stack._array != null); Contract.Requires(stack._size <= stack._array.Length); _stack = stack; _version = _stack._version; _index = -2; currentElement = null; }
public static Stack Synchronized(Stack stack) { if (stack == null) throw new Exception(); return new SyncStack(stack); }
internal SyncStack(Stack stack) { // Contract.Requires(stack != null); _s = stack; _root = stack.SyncRoot; }
public virtual Object Clone() { // Contract.Ensures(Contract.Result<Object>() != null); Stack s = new Stack(_size); s._size = _size; Array.Copy(_array, 0, s._array, 0, _size); s._version = _version; return s; }