念粁扮寂壓亟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
|