Exemplo n.º 1
0
        public UnitIndex(AbstractUnitIndexId abstractUnitIndexId, Period period, SharedUnitIndex sharedUnitIndex, UnitIndexGroup group, bool isInquireable, long calculationLevel = 1, int calculationOrder = 1)
        {
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }
            period.CheckAssigningUnitIndex();
            if (sharedUnitIndex == null)
            {
                throw new ArgumentNullException("sharedUnitIndex");
            }
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            if (!group.PeriodId.Equals(period.Id))
            {
                throw new UnitIndexCompareException("UnitIndex", "UnitIndexGroup", "Period");
            }
            this.calculationLevel = calculationLevel;

            // must be check periodId
            id                    = abstractUnitIndexId;
            periodId              = period.Id;
            this.group            = group;
            this.sharedUnitIndex  = sharedUnitIndex;
            this.isInquireable    = isInquireable;
            this.calculationOrder = calculationOrder;
        }
Exemplo n.º 2
0
        public AbstractUnitIndex(AbstractUnitIndexId abstractUnitIndexId, PeriodId periodId)
        {
            if (abstractUnitIndexId == null)
            {
                throw new ArgumentNullException("abstractUnitIndexId");
            }
            if (periodId == null)
            {
                throw new ArgumentNullException("periodId");
            }

            id            = abstractUnitIndexId;
            this.periodId = periodId;
        }
Exemplo n.º 3
0
        public UnitIndexGroup(AbstractUnitIndexId UnitIndexGroupId, Period period, UnitIndexGroup parent, string name,
                              string dictionaryName)
        {
            if (UnitIndexGroupId == null)
            {
                throw new ArgumentNullException("UnitIndexGroupId");
            }
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }

            this.parent         = parent;
            periodId            = period.Id;
            id                  = UnitIndexGroupId;
            this.name           = name;
            this.dictionaryName = dictionaryName;
        }