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()); }
private void RaiseProduced(TProduct product) { Produced?.Invoke(this, new ProducedEventArgs <TProduct>(product)); }