Beispiel #1
0
        public JobIndex(AbstractJobIndexId abstractJobIndexId, Period period, SharedJobIndex sharedJobIndex, JobIndexGroup group, bool isInquireable, long calculationLevel = 1, int calculationOrder = 1)
        {
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }
            period.CheckAssigningJobIndex();
            if (sharedJobIndex == null)
            {
                throw new ArgumentNullException("sharedJobIndex");
            }
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            if (!group.PeriodId.Equals(period.Id))
            {
                throw new JobIndexCompareException("JobIndex", "JobIndexGroup", "Period");
            }
            this.calculationLevel = calculationLevel;

            // must be check periodId
            id                    = abstractJobIndexId;
            periodId              = period.Id;
            this.group            = group;
            this.sharedJobIndex   = sharedJobIndex;
            this.isInquireable    = isInquireable;
            this.calculationOrder = calculationOrder;
        }
Beispiel #2
0
        public AbstractJobIndex(AbstractJobIndexId abstractJobIndexId, PeriodId periodId)
        {
            if (abstractJobIndexId == null)
            {
                throw new ArgumentNullException("abstractJobIndexId");
            }
            if (periodId == null)
            {
                throw new ArgumentNullException("periodId");
            }

            id            = abstractJobIndexId;
            this.periodId = periodId;
        }
Beispiel #3
0
        public JobIndexGroup(AbstractJobIndexId jobIndexGroupId, Period period, JobIndexGroup parent, string name,
                             string dictionaryName)
        {
            if (jobIndexGroupId == null)
            {
                throw new ArgumentNullException("jobIndexGroupId");
            }
            if (period == null)
            {
                throw new ArgumentNullException("period");
            }

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