public virtual ObjectLink <T> Pop() { if (_next != null) { _next._prev = _prev; } else { _chain._top = _prev; } if (_prev != null) { _prev._next = _next; } else { _chain._bottom = _next; } var prev = _prev; _prev = null; _next = null; _chain = null; return(prev); }
public virtual ObjectLink <T> Push(T value) { var link = new ObjectLink <T>(this, value); Push(link); return(link); }
public ObjectLink <T> Push(T value) { var link = new ObjectLink <T>(_chain, value); Push(link); return(link); }
protected virtual void Push(ObjectLink <T> link) { if (_top != null) { _top.Push(link); } else { _top = _bottom = link; } }
protected internal virtual void Push(ObjectLink <T> link) { link._prev = this; link._next = _next; if (_next != null) { _next._prev = link; } else { _chain._top = link; } _next = link; }