SyndicationItem.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. //
  2. // System.ServiceModel.Syndication.SyndicationItem
  3. //
  4. // Authors:
  5. // Joel Reed ([email protected])
  6. //
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining
  9. // a copy of this software and associated documentation files (the
  10. // "Software"), to deal in the Software without restriction, including
  11. // without limitation the rights to use, copy, modify, merge, publish,
  12. // distribute, sublicense, and/or sell copies of the Software, and to
  13. // permit persons to whom the Software is furnished to do so, subject to
  14. // the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be
  17. // included in all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  20. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  22. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  23. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  24. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  25. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. //
  27. using System;
  28. using System.Xml;
  29. namespace System.ServiceModel.Syndication
  30. {
  31. public class SyndicationItem
  32. {
  33. private string id;
  34. private TextSyndicationContent summary;
  35. private TextSyndicationContent title;
  36. private SyndicationContent content;
  37. private SyndicationFeed sourceFeed;
  38. private DateTime publishDate;
  39. private DateTime lastUpdatedTime;
  40. private TextSyndicationContent copyright;
  41. public SyndicationItem()
  42. {
  43. publishDate = new DateTime(0);
  44. lastUpdatedTime = new DateTime(0);
  45. }
  46. public void WriteTo(XmlWriter writer, SyndicationSerializer serializer)
  47. {
  48. serializer.WriteTo(writer, this);
  49. }
  50. public string Id
  51. {
  52. get { return id; }
  53. set { id = value; }
  54. }
  55. public SyndicationContent Content
  56. {
  57. get { return content; }
  58. set { content = value; }
  59. }
  60. public TextSyndicationContent Copyright
  61. {
  62. get { return copyright; }
  63. set { copyright = value; }
  64. }
  65. public DateTime LastUpdatedTime
  66. {
  67. get { return lastUpdatedTime; }
  68. set { lastUpdatedTime = value; }
  69. }
  70. public DateTime PublishDate
  71. {
  72. get { return publishDate; }
  73. set { publishDate = value; }
  74. }
  75. public SyndicationFeed SourceFeed
  76. {
  77. get { return sourceFeed; }
  78. set { sourceFeed = value; }
  79. }
  80. public TextSyndicationContent Summary {
  81. get { return summary; }
  82. set { summary = value; }
  83. }
  84. public TextSyndicationContent Title {
  85. get { return title; }
  86. set { title = value; }
  87. }
  88. }
  89. }