82 lines
2.0 KiB
C#
82 lines
2.0 KiB
C#
//-----------------------------------------------------------------------------
|
|
// <copyright file="OpeninghoursModel.cs" company="BTU/IIT">
|
|
// Company copyright tag.
|
|
// </copyright>
|
|
// <author>fiedlchr</author>
|
|
// <sience>24.06.2013</sience>
|
|
//-----------------------------------------------------------------------------
|
|
|
|
namespace CampusAppWPortalLib8.Model.Openinghours
|
|
{
|
|
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.Xml.Serialization;
|
|
|
|
/// <summary>
|
|
/// Model for opening hours.
|
|
/// </summary>
|
|
[XmlRoot("root")]
|
|
public class OpeninghoursModel<T> where T: OpeninghoursInstitutionModel
|
|
{
|
|
#region Member
|
|
|
|
/// <summary>
|
|
/// Time when the model was created.
|
|
/// </summary>
|
|
private readonly DateTime createTime;
|
|
|
|
/// <summary>
|
|
/// Gets or sets feed information item list.
|
|
/// </summary>
|
|
private ObservableCollection<T> institutions;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="OpeninghoursModel" /> class.
|
|
/// </summary>
|
|
public OpeninghoursModel()
|
|
{
|
|
this.institutions = new ObservableCollection<T>();
|
|
this.createTime = DateTime.Now;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary>
|
|
/// Gets the creation time of the model.
|
|
/// </summary>
|
|
public DateTime CreateTime
|
|
{
|
|
get
|
|
{
|
|
return this.createTime;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Institutions.
|
|
/// </summary>
|
|
[XmlArray("data")]
|
|
[XmlArrayItem("institution")]
|
|
public ObservableCollection<T> Institutions
|
|
{
|
|
get
|
|
{
|
|
return this.institutions;
|
|
}
|
|
|
|
set
|
|
{
|
|
this.institutions = value;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|