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);
 }
示例#2
0
 public T[] ToArray()
 {
     lock (SyncRoot)
     {
         return(deque.ToArray());
     }
 }
示例#3
0
 public T[] ToArray()
 {
     return(deque.ToArray());
 }