// RssModel.cs
//
// library module that models an RSS 2.0 file.
//
// Thu, 16 Nov 2006 16:27
//
//
using System.Xml.Serialization;
using System.IO;
namespace dinoch.demo.rss
{
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[XmlType("rss", AnonymousType=true)]
[XmlRoot("rss", Namespace="", IsNullable=false)]
public partial class RssModel {
public RssModel() { }
private Channel[] channelField;
[XmlElement("channel", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public Channel[] channels {
get { return this.channelField; }
set { this.channelField = value; }
}
[XmlAttribute]
public string version {
get { return "2.0"; }
set { }
}
private XmlSerializerNamespaces ns = null;
private XmlSerializerNamespaces NS {
get {
if (ns==null) {
ns= new XmlSerializerNamespaces();
ns.Add("","");
}
return ns;
}
}
public class XmlTextWriterFormattedNoDeclaration : System.Xml.XmlTextWriter {
public XmlTextWriterFormattedNoDeclaration (System.IO.TextWriter w) : base(w) { Formatting= System.Xml.Formatting.Indented;}
public override void WriteStartDocument () { }
}
public string AsFeed()
{
XmlSerializer s = new XmlSerializer(this.GetType());
StringWriter sw = new StringWriter();
s.Serialize( new XmlTextWriterFormattedNoDeclaration(sw), this, NS );
string serializedXml = sw.ToString();
return serializedXml;
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[XmlType(AnonymousType=true)]
public partial class Channel
{
public Channel(){}
public Channel(string Title, string Link, string Description, string Generator)
{
titleField= Title;
linkField= Link;
descriptionField= Description;
generatorField= Generator;
}
private string titleField;
private string linkField;
private string descriptionField;
private string languageField;
private string pubDateField;
private string lastBuildDateField;
private string docsField;
private string generatorField;
private string managingEditorField;
private string webMasterField;
private ChannelItem[] itemField;
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string title {
get { return this.titleField; }
set { this.titleField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string link {
get { return this.linkField; }
set { this.linkField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string description {
get { return this.descriptionField; }
set { this.descriptionField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string language {
get { return this.languageField; }
set { this.languageField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string pubDate {
get { return this.pubDateField; }
set { this.pubDateField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string lastBuildDate {
get { return this.lastBuildDateField; }
set { this.lastBuildDateField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string docs {
get { return this.docsField; }
set { this.docsField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string generator {
get { return this.generatorField; }
set { this.generatorField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string managingEditor {
get { return this.managingEditorField; }
set { this.managingEditorField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string webMaster {
get { return this.webMasterField; }
set { this.webMasterField = value; }
}
[XmlElement("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public ChannelItem[] itemList {
get { return this.itemField; }
set { this.itemField = value; }
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[XmlType(AnonymousType=true)]
public partial class ChannelItem
{
public ChannelItem() { }
public ChannelItem(string Title, string Link, string Description, string PubDate)
{
titleField= Title;
linkField= Link;
descriptionField= Description;
pubDateField= PubDate;
}
private string titleField;
private string linkField;
private string descriptionField;
private string pubDateField;
private string guidField;
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string title {
get { return this.titleField; }
set { this.titleField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string link {
get { return this.linkField; }
set { this.linkField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string description {
get { return this.descriptionField; }
set { this.descriptionField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string pubDate {
get { return this.pubDateField; }
set { this.pubDateField = value; }
}
[XmlElement(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string guid {
get { return this.guidField; }
set { this.guidField = value; }
}
}
#if NOT
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
public partial class NewDataSet
{
private rss[] itemsField;
///
[XmlElement("rss")]
public rss[] Items {
get {
return this.itemsField;
}
set {
this.itemsField = value;
}
}
}
#endif
}