public Production(string machine, ProductNumber product, OrderNumber order, long expectedItems, long producedItemsPerHour, TimeSpan validatedStartTime) { if (machine == null) throw new ArgumentNullException("machine"); if (product == null) throw new ArgumentNullException("product"); if (order == null) throw new ArgumentNullException("order"); if (expectedItems <= 0) throw new ArgumentException("The expected items value must be positive.", "expectedItems"); if (producedItemsPerHour <= 0) throw new ArgumentException("The produced items per hour value must be positive.", "producedItemsPerHour"); if (validatedStartTime < TimeSpan.Zero) throw new ArgumentException("The validated start time value must be positive.", "validatedStartTime"); this.machine = machine; this.product = product; this.order = order; this.expectedItems = expectedItems; this.producedItemsPerHour = producedItemsPerHour; this.validatedStartTime = validatedStartTime; this.shiftList = new List<ProductionShift>(); }
public Production(string machine, ProductNumber product, OrderNumber order, long expectedItems, long producedItemsPerHour) : this(machine, product, order, expectedItems, producedItemsPerHour, TimeSpan.Zero) { }