//----------------------------------------------------------------------- // // The MIT License (MIT). Copyright (c) 2013 BTU/IIT. // // Stubbfel // 15.10.2013 // Implements the lecture module class //----------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System; using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; /// Model for the module of an lecture. /// Stubbfel, 15.10.2013. public class LectureModule { #region Members /// Number of the module (like an id) private int number; /// Url to the website of the module. private Uri url; #endregion #region Constructor /// Initializes a new instance of the class. /// Stubbfel, 15.10.2013. public LectureModule() { } #endregion #region Property /// Gets or sets the title of the module. /// The title. [XmlElement("titel")] public string Title { get; set; } /// Gets or sets the number of the module and create the URL. /// The total number of ber. [XmlElement("nummer")] public int Number { get { return this.number; } set { if (value != this.number) { this.number = value; this.CreateUrl(); } } } /// Gets the URL of the module. /// The URL. public Uri Url { get { return this.url; } } #endregion #region Methods /// Method create the url of the module. /// Stubbfel, 15.10.2013. private void CreateUrl() { this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString()); } #endregion } }