コード例 #1
0
        internal string ToHtmlString()
        {
            CheckLink();

            /*
             *  <b>bold</b>, <strong>bold</strong>
             *  <i>italic</i>, <em>italic</em>
             *  <a href="URL">inline URL</a>
             *  <code>inline fixed-width code</code>
             *  <pre>pre-formatted fixed-width code block</pre>
             */

            return($"<b>Новое видео на канале {AuthorName}</b>" + "\n\r" +
                   $"<a href=\"https://www.youtube.com/watch?v={VideoId}\">{Title}</a>" + "\n\r" +
                   $"Опубликовано (UTC): {DTpublished.ToString()}");
        }
コード例 #2
0
        internal String ToMarkdownString()
        {
            CheckLink();

            /*
             * bold text*
             *  _italic text_
             *  [text](URL)
             *  `inline fixed-width code`
             *  ```pre-formatted fixed-width code block```
             */

            return($"*Новое видео на канале {AuthorName}*" + "\n\r" +
                   $"[{Title}](https://www.youtube.com/watch?v={VideoId})" + "\n\r" +
                   $"Опубликовано (UTC): {DTpublished.ToString()}");
        }
コード例 #3
0
        public override String ToString()
        {
            CheckLink();

            return($"Id: {Id}" + "\n\r" +
                   $"VideoId: {VideoId}" + "\n\r" +
                   $"ChannelId: {ChannelId}" + "\n\r" +
                   $"Title: {Title}" + "\n\r" +
                   $"Link: {Link}" + "\n\r" +
                   $"Publsihed: {Published}" + "\n\r" +
                   $"Updated:   {Updated}" + "\n\r" +
                   $"Author.Name: {AuthorName}" + "\n\r" +
                   $"Author.Uri: {AuthorUri}" + "\n\r" +
                   $"IsNewVideo: {IsNewVideo}" + "\n\r" +
                   $"DTUpdated: {DTupdated.ToString()}" + "\n\r" +
                   $"DTPublished: {DTpublished.ToString()}" + "\n\r" +
                   $"updated - published: {DTupdated.Subtract(DTpublished)}" + "\n\r" +
                   $"published - updated: {DTpublished.Subtract(DTupdated)}" + "\n\r" +
                   $"10 min: {TimeSpan.FromMinutes(10)}");
        }