/// <summary> /// /// </summary> /// <param name="node"></param> /// <param name="value"></param> /// <returns></returns> protected LinkedNode <T> InsertBefore(LinkedNode <T> node, ref T value) { LinkedNode <T> result = LinkedNode <T> .InsertBefore(node, ref value); System.Threading.Interlocked.Increment(ref m_Count); return(result); }
public static LinkedNode <T> AddAfter(LinkedNode <T> node, ref T value) { LinkedNode <T> result = new LinkedNode <T>(ref value); result = LinkedNode <T> .InsertBefore(node.Next, ref value); return(result); }
protected LinkedNode <T> AddLast(ref T value) { if (object.ReferenceEquals(Head, LinkedNode <T> .Null)) { Tail = new LinkedNode <T>(ref value); } else { Tail = LinkedNode <T> .InsertBefore(Head, ref value); } System.Threading.Interlocked.Increment(ref m_Count); return(Tail); }