Ejemplo n.º 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());
        }
Ejemplo n.º 2
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());
        }