📄 rssitemtag.cs
字号:
/*
* RssItemTag.cs @Microsoft Visual Studio 2008 <.NET Framework 3.5>
* AfritXia
* 2008-01-31
*
* Copyright(c) http://www.AfritXia.NET/
*
*/
using System;
using NET.AfritXia.RssFoundation.RssChannel.RssItem;
using NET.AfritXia.RssFoundation.RssGeneric;
namespace NET.AfritXia.RssFoundation
{
/// <summary>
/// item 标记
/// </summary>
public class RssItemTag : RssTagBase
{
#region 类构造器
/// <summary>
/// 类默认构造器
/// </summary>
public RssItemTag()
: base()
{
}
#endregion
/// <summary>
/// 获取标记名称
/// </summary>
protected override string TagName
{
get
{
return "item";
}
}
/// <summary>
/// 空标记值
/// </summary>
public override object Value
{
set
{
throw new NotSupportedException("不能为该标记赋值 ( Cannot put value for this Tag )");
}
get
{
return null;
}
}
/// <summary>
/// 设置或获取标题, TitleTag 属性的简化操作形式
/// </summary>
public string Title
{
set
{
this.TitleTag = new TitleTag(value);
}
get
{
if (this.TitleTag == null)
return null;
return this.TitleTag.Value;
}
}
/// <summary>
/// 设置或获取 title 标记
/// </summary>
public TitleTag TitleTag
{
set
{
if (value == null)
{
base.RemoveChildTag<TitleTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<TitleTag>();
}
}
/// <summary>
/// 设置或获取链接, LinkTag 属性的简化操作形式
/// </summary>
public string Link
{
set
{
this.LinkTag = new LinkTag(value);
}
get
{
if (this.LinkTag == null)
return null;
return this.LinkTag.Value;
}
}
/// <summary>
/// 设置或获取 link 标记
/// </summary>
public LinkTag LinkTag
{
set
{
if (value == null)
{
base.RemoveChildTag<LinkTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<LinkTag>();
}
}
/// <summary>
/// 设置或获取描述说明信息, DescriptionTag 属性的简化操作形式
/// </summary>
public string Description
{
set
{
this.DescriptionTag = new DescriptionTag(value);
}
get
{
if (this.DescriptionTag == null)
return null;
return this.DescriptionTag.Value;
}
}
/// <summary>
/// 设置或获取 description 标记
/// </summary>
public DescriptionTag DescriptionTag
{
set
{
if (value == null)
{
base.RemoveChildTag<DescriptionTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<DescriptionTag>();
}
}
/// <summary>
/// 设置或获取作者, AuthorTag 属性的简化操作形式
/// </summary>
public string Author
{
set
{
this.AuthorTag = new AuthorTag(value);
}
get
{
if (this.AuthorTag == null)
return null;
return this.AuthorTag.Value;
}
}
/// <summary>
/// 设置或获取 author 标记
/// </summary>
public AuthorTag AuthorTag
{
set
{
if (value == null)
{
base.RemoveChildTag<AuthorTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<AuthorTag>();
}
}
/// <summary>
/// 设置或获取所属类别, CategoryTag 属性的简化操作形式
/// </summary>
public string Category
{
set
{
this.CategoryTag = new CategoryTag(value);
}
get
{
if (this.CategoryTag == null)
return null;
return this.CategoryTag.Value;
}
}
/// <summary>
/// 设置或获取 category 标记
/// </summary>
public CategoryTag CategoryTag
{
set
{
if (value == null)
{
base.RemoveChildTag<CategoryTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<CategoryTag>();
}
}
/// <summary>
/// 设置或获取相关评论地址, CommentsTag 属性的简化操作形式
/// </summary>
public string Comments
{
set
{
this.CommentsTag = new CommentsTag(value);
}
get
{
if (this.CommentsTag == null)
return null;
return this.CommentsTag.Value;
}
}
/// <summary>
/// 设置或获取 comments 标记
/// </summary>
public CommentsTag CommentsTag
{
set
{
if (value == null)
{
base.RemoveChildTag<CommentsTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<CommentsTag>();
}
}
/// <summary>
/// 设置或获取媒体对象
/// </summary>
public EnclosureTag Enclosure
{
set
{
if (value == null)
{
base.RemoveChildTag<EnclosureTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<EnclosureTag>();
}
}
/// <summary>
/// 设置或获取标识, GuidTag 属性的简化操作形式
/// </summary>
public string Guid
{
set
{
this.GuidTag = new GuidTag(value);
}
get
{
if (this.GuidTag == null)
return null;
return this.GuidTag.Value;
}
}
/// <summary>
/// 设置或获取 guid 标记
/// </summary>
public GuidTag GuidTag
{
set
{
if (value == null)
{
base.RemoveChildTag<GuidTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<GuidTag>();
}
}
/// <summary>
/// 设置或获取频道发布日期, PubDateTag 属性的简化操作形式
/// </summary>
public DateTime PubDate
{
set
{
this.PubDateTag = new PubDateTag(value);
}
get
{
if (this.PubDateTag == null)
return new DateTime(0);
return this.PubDateTag.Value;
}
}
/// <summary>
/// 设置或获取 pubDate 标记
/// </summary>
public PubDateTag PubDateTag
{
set
{
if (value == null)
{
base.RemoveChildTag<PubDateTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<PubDateTag>();
}
}
/// <summary>
/// 设置或获取 RSS 频道来源, SourceTag 属性的简化操作形式
/// </summary>
public string Source
{
set
{
this.SourceTag = new SourceTag(value);
}
get
{
if (this.SourceTag == null)
return null;
return this.SourceTag.Value;
}
}
/// <summary>
/// 设置或获取 source 标记
/// </summary>
public SourceTag SourceTag
{
set
{
if (value == null)
{
base.RemoveChildTag<SourceTag>();
return;
}
base.AddChildTag(value);
}
get
{
return base.GetChildTag<SourceTag>();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -