コード例 #1
0
        public void AddDemand(Demand demand)
        {
            if (demand.IsNull())
            {
                throw new ArgumentNullException(nameof(demand));
            }

            GroupDemands newGroupDemand = new GroupDemands(this, demand, false);

            GroupDemands.Add(newGroupDemand);
        }
コード例 #2
0
        /// <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
            };
        }
コード例 #3
0
        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);
        }