public Unit(Period period, SharedUnit sharedUnit, Unit parent) { if (period == null || period.Id == null) { throw new ArgumentNullException("period"); } if (sharedUnit == null || sharedUnit.Id == null) { throw new ArgumentNullException("sharedUnit"); } period.CheckAssigningUnit(); id = new UnitId(period.Id, sharedUnit.Id); this.sharedUnit = sharedUnit; this.parent = parent; customFields = new List <UnitCustomField>(); unitIndexList = new List <UnitUnitIndex>(); }