Files
win8phoneApp/CampusAppWP8/CampusAppWP8ScheduledTaskAgent/Model/RSS/RSSViewModel.cs
2013-09-17 13:48:37 +02:00

84 lines
2.0 KiB
C#

//-----------------------------------------------------------------------------
// <copyright file="RSSViewModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>24.06.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8ScheduledTaskAgent.Model.RSS
{
using System;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
/// <summary>
/// ViewModel of the RSS feed, containing the feed/channel object.
/// </summary>
[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>
public RSSViewModel()
{
this.channel = new ObservableCollection<RSSChannelModel>();
this.createTime = DateTime.Now;
}
#endregion
#region Property
/// <summary>
/// Gets or sets the channel list.
/// </summary>
[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>
public DateTime CreateTime
{
get
{
return this.createTime;
}
}
#endregion
}
}