public void AddDemand(Demand demand) { if (demand.IsNull()) { throw new ArgumentNullException(nameof(demand)); } GroupDemands newGroupDemand = new GroupDemands(this, demand, false); GroupDemands.Add(newGroupDemand); }
/// <summary> /// Creates a new group for the demand /// </summary> /// <param name="demand">First demand to be included in the new group (the lead demand)</param> public Group(Demand demand) { if (demand.IsNull()) { throw new ArgumentNullException(nameof(demand)); } Category = demand.Category; Offers = new List <Offer>(); // No offers at the moment GroupDemands newGroupDemand = new GroupDemands(this, demand, true); GroupDemands = new List <GroupDemands>() { newGroupDemand }; }
public DemandAttributes(Demand demand, Attribute attribute, object value) { if (demand.IsNull()) { throw new ArgumentNullException(nameof(demand)); } if (attribute.IsNull()) { throw new ArgumentNullException(nameof(attribute)); } if (value.IsNull()) { throw new ArgumentNullException(nameof(value)); } Demand = demand; Attribute = attribute; SetValue(value); }