快速业务通道

ASP.NET伏撹RSS Feed

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-05-21

念粁扮寂壓亟RSS Feed。

将狛阻叱肝議俐個?委?購議旗鷹亟撹阻汽鏡議窃。

湖状嶷喘扮珊麻曳熟圭宴議。噐頁薮竃栖?寄社匯軟冩梢冩梢。

參和頁RssBase.cs窃?

1using System;
2using System.Collections.Generic;
3using System.Xml;
4
5namespace MyMedia.Utilities
6{
7  public class RssBase
8  {
9    RssBase constructor#region RssBase constructor
10    public RssBase(XmlTextWriter rssWriter)
11    {
12      this.rssWriter = rssWriter;
13    }
14    public RssBase(XmlTextWriter rssWriter, bool hasMedia, IList<ItemInfo> items)
15    {
16      this.rssWriter = rssWriter;
17      this.hasMedia = hasMedia;
18      this.items = items;
19    }
20    #endregion
21
22    [Serializable]
23    public sealed class ItemInfo
24    {
25      ItemInfo constructor#region ItemInfo constructor
26      public ItemInfo() { }
27      public ItemInfo(string itemTitle, string itemLink, string itemDescription, string itemPubDate, string itemAuthor, string itemGuid)
28      {
29        this.itemTitle = itemTitle;
30        this.itemLink = itemLink;
31        this.itemDescription = itemDescription;
32        this.itemAuthor = itemAuthor;
33        this.itemGuid = itemGuid;
34        this.itemPubDate = itemPubDate;
35      }
36      public ItemInfo(string itemTitle, string itemLink, string itemDescription, string itemPubDate, string itemAuthor,
37              string itemGuid, string mediaContentUrl, string mediaTitle, string mediaDescription,
38              string mediaThumbUrl, string mediaThumbWidth, string mediaThumbHeight, string mediaAuthor)
39      {
40        this.itemTitle = itemTitle;
41        this.itemLink = itemLink;
42        this.itemDescription = itemDescription;
43        this.itemPubDate = itemPubDate;
44        this.itemAuthor = itemAuthor;
45        this.itemGuid = itemGuid;
46        this.mediaContentUrl = mediaContentUrl;
47        this.mediaTitle = mediaTitle;
48        this.mediaDescription = mediaDescription;
49        this.mediaThumbUrl = mediaThumbUrl;
50        this.mediaThumbWidth = mediaThumbWidth;
51        this.mediaThumbHeight = mediaThumbHeight;
52        this.mediaAuthor = mediaAuthor;
53      }
54      #endregion
55
56      Internal item variables#region Internal item variables
57      // Item variables
58      private string itemTitle;
59      private string itemLink;
60      private string itemDescription;
61      private string itemPubDate = DateTime.Now.ToString("r");
62      private string itemDateTaken = DateTime.Now.ToString();
63      private string itemAuthor;
64      private string itemGuid;
65      // Media variables
66      private string mediaContentUrl;
67    

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号