Exemplo n.º 1
0
        public void Order(SandwichKind kind, int count)
        {
            var sandwiches = new List <Sandwich>();

            for (int i = 0; i < count; i++)
            {
                sandwiches.Add(Produce(kind));
            }
            _warehouse.AddRange(sandwiches);
            Produced?.Invoke(sandwiches.ToArray());
        }
Exemplo n.º 2
0
 private void RaiseProduced(TProduct product)
 {
     Produced?.Invoke(this, new ProducedEventArgs <TProduct>(product));
 }