//----------------------------------------------------------------------- // // Company copyright tag. // // stubbfel // 10.06.2013 //---------------------------------------------------------------------- namespace CampusAppWPortalLib8.Model.Lecture { using System; using System.Xml.Serialization; using CampusAppWPortalLib8.Resources; /// /// Model for the module of an lecture /// 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. /// public LectureModule() { } #endregion #region Property /// /// Gets or sets the title of the module /// [XmlElement("titel")] public string Title { get; set; } /// /// Gets or sets the number of the module and create the URL /// [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 /// public Uri Url { get { return this.url; } } #endregion #region Methods /// /// Method create the url of the module /// private void CreateUrl() { this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString()); } #endregion } }