/// <summary> /// Constructor initializes fields /// </summary> public Material() { DescriptionSetter description = new DescriptionSetter(); this.Description = description.SetDescription(); if (this.Description != null && this.Description.Length > this._descriptionMaxLength) { throw new Exception("Too large description"); } this.UniqueIdentifier = this.Description.SetGuid(); }
/// <summary> /// Constructor initializes fields /// </summary> public Discipline() { DescriptionSetter description = new DescriptionSetter(); this.Description = description.SetDescription(); if (this.Description != null && this.Description.Length > this._descriptionMaxLength) { throw new Exception("Too large description"); } this.UniqueIdentifier = this.Description.SetGuid(); this.Lectures = new List <Lecture>() { new Lecture(), new Lecture() }; }