コード例 #1
0
        public void CommonSetCoreChannelPropertiesUsingHelperMethods(Rss20 rss, string optionalTitle = "")
        {
            RssChannel chan = rss.channel;

            string default_title = "TEST CHANNEL CREATED WITH HELPER METHODS";
            string title         = optionalTitle.Length > 0 ? optionalTitle : default_title;



            chan.AddTitle(title);
            chan.AddLink("http://something.com/rss");
            chan.AddPubDate(DateTime.Today);
            chan.AddLastBuildDate(DateTime.Today);

            chan.AddDescription("This is a channel that is created for sirpenski.syndication.rss20 testing purposes");
            chan.AddLanguage("en");
            chan.AddCopyright("Copyright " + DateTime.Today.ToString("yyyy") + ". All Rights Reserved");
            chan.AddManagingEditor("*****@*****.**");
            chan.AddWebMaster("*****@*****.**");
            chan.AddCategory("TEST", "http://something.com");
            chan.AddCategory("RSS");
            chan.AddGenerator("sirpenski.syndication.rss20");
            chan.AddDocs("http://something.com/format_of_this_channel");
            chan.AddCloud("http://something.com", 11092, "/path/to/service", "notifyChannelUpdate", "xml-rpc");
            chan.AddTtl(1440);

            chan.AddImage("http://something.com/images/rss/rss_channel_logo_88x88.gif", "Channel Icon", "http://something.com", 88, 88);

            chan.AddSkipHour(1);
            chan.AddSkipHour(2);
            chan.AddSkipHour(3);

            chan.AddSkipDay(RssChannelSkipDays.DAY_SATURDAY);
            chan.AddSkipDay(RssChannelSkipDays.DAY_SUNDAY);
        }