private void CheckDeque(IDeque <Type> c) { builder.ExpectThat(c.Peek(), Is.Null); builder.ExpectException <InvalidOperationException> (() => c.Dequeue()); if (c.ToArray() != null) { builder.ExpectThat(c.ToArray().Length, Is.EqualTo(0)); } builder.ExpectThat(c.GetEnumerator().MoveNext(), Is.False); builder.ExpectThat(c.GetDescendingEnumerator().MoveNext(), Is.False); }
public T[] ToArray() { lock (SyncRoot) { return(deque.ToArray()); } }
public T[] ToArray() { return(deque.ToArray()); }