Files
win8phoneApp/CampusAppWP8/CampusAppWPortalLib8/Model/RSS/RSSViewModel.cs
2013-10-15 13:10:29 +02:00

77 lines
2.2 KiB
C#

//-----------------------------------------------------------------------
// <copyright file="RSSViewModel.cs" company="BTU/IIT">
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
// </copyright>
// <author>fiedlchr</author>
// <date>15.10.2013</date>
// <summary>Implements the RSS view model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.RSS
{
using System;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
/// <summary> ViewModel of the RSS feed, containing the feed/channel object. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
[XmlRoot("root")]
public class RSSViewModel
{
#region Member
/// <summary> Object to store the time when the instance was created. </summary>
private DateTime createTime;
/// <summary> Channel list for the RSS feeds. </summary>
private ObservableCollection<RSSChannelModel> channel;
#endregion
#region Constructor
/// <summary> Initializes a new instance of the <see cref="RSSViewModel" /> class. </summary>
/// <remarks> fiedlchr, 15.10.2013. </remarks>
public RSSViewModel()
{
this.channel = new ObservableCollection<RSSChannelModel>();
this.createTime = DateTime.Now;
}
#endregion
#region Property
/// <summary> Gets or sets the channel list. </summary>
/// <value> The channel. </value>
[XmlArray("rss")]
[XmlArrayItem("channel")]
public ObservableCollection<RSSChannelModel> Channel
{
get
{
return this.channel;
}
set
{
if (value != this.channel)
{
this.channel = value;
}
}
}
/// <summary> Gets the creation time. </summary>
/// <value> The create time. </value>
public DateTime CreateTime
{
get
{
return this.createTime;
}
}
#endregion
}
}