예제 #1
0
        public string Describe()
        {
            var builder = new StringBuilder();

            builder.Append($"**{Name}**");
            if (!string.IsNullOrEmpty(Duration))
            {
                builder.Append($" [{Duration}]");
            }
            builder.AppendLine();

            builder.AppendLine($"{Link}");

            if (ImageLink != null)
            {
                builder.AppendLine($"{ImageLink}");
            }

            builder.AppendLine($"published {PublishedDate.ToString("yyyy-MM-dd HH:mm")}");
            builder.AppendLine();

            builder.AppendLine(Summary);

            return(builder.ToString());
        }
예제 #2
0
        public override void ToStream(Stream output)
        {
            output.Write(TLUtils.SignatureToBytes(Signature));

            Author.ToStream(output);
            PublishedDate.ToStream(output);
        }
예제 #3
0
 public override byte[] ToBytes()
 {
     return(TLUtils.Combine(
                TLUtils.SignatureToBytes(Signature),
                Author.ToBytes(),
                PublishedDate.ToBytes()));
 }
예제 #4
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.Append($"**{Name}**");

            if (!string.IsNullOrEmpty(Duration))
            {
                builder.Append($" [{Duration}]");
            }
            builder.AppendLine();

            builder.AppendLine($"published {PublishedDate.ToString("yyyy-MM-dd HH:mm")}");
            builder.AppendLine();

            return(builder.ToString());
        }