public void Push(T value) { if (CurrentStorage == 'ㅇ') { _queue.Add(value); } else { CurrentStack.Push(value); } }
/** Push element x to the back of queue. */ public void Push(int x) { Discriminator = !Discriminator; Stack <int> previousStack = PreviousStack; CurrentStack.Push(x); int stackCount = PreviousStack.Count; previousStack = ReverseStack(PreviousStack); for (int i = 0; i < stackCount; i++) { CurrentStack.Push(previousStack.Pop()); } }
public void Push(ComponentModel model, CreationContext context) { CurrentStack.Push(new Pair <ComponentModel, CreationContext>(model, context)); }