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()); }
public override void ToStream(Stream output) { output.Write(TLUtils.SignatureToBytes(Signature)); Author.ToStream(output); PublishedDate.ToStream(output); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Author.ToBytes(), PublishedDate.ToBytes())); }
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()); }