Beispiel #1
0
 void IStack.AddOnTop(IStack stack)
 {
     if (stack == null)
     {
         throw new ArgumentNullException(nameof(stack));
     }
     BottomToTop.AddRange(stack.BottomToTop.Cast <Block>());
 }
Beispiel #2
0
 void IStack.AddToBottom(IStack stack)
 {
     if (stack == null)
     {
         throw new ArgumentNullException(nameof(stack));
     }
     if (BottomToTop.Count > 0)
     {
         BottomToTop.InsertRange(0, stack.BottomToTop.Cast <Block>());
     }
     else
     {
         BottomToTop.AddRange(stack.BottomToTop.Cast <Block>());
     }
 }