Esempio n. 1
0
        public override string ToString()
        {
            string result = $"Id:{Id} Created:{CreatedAt.ToShortDateString()}\nName:{Name}\nEmail:{Email}\nAddress:{MyAddress}\n";

            if (Todos != null && Todos.Count() > 0)
            {
                result += "\tToDos list:\n";
                foreach (var item in Todos)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            if (Posts != null && Posts.Count() > 0)
            {
                result += "\tPosts list:\n";
                foreach (var item in Posts)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            if (Comments != null && Comments.Count() > 0)
            {
                result += "\tComments list:\n";
                foreach (var item in Comments)
                {
                    result += item.ToString();
                }
                result += "\n";
            }
            return(result);
        }
Esempio n. 2
0
 public string Details()
 {
     return($"Created: { CreatedAt.ToShortDateString() }\nTitle: { Title }\nDescription: { Description }\nLikes: { this.Like }");
 }
 public override string ToString()
 {
     return($"CreatedAt:{CreatedAt.ToShortDateString()} - UserId:{UserId} - Length:{Body.Length} - Likes:{Likes} - PostId:{PostId}");
 }
Esempio n. 4
0
 public override string ToString()
 {
     return($"TodoId:{Id} - Created:{CreatedAt.ToShortDateString()} - Name:{Name}({Name.Length}) - Completed:{IsComplete} - UserId:{UserId}\n");
 }
Esempio n. 5
0
 public override string ToString()
 => $"[{Id}] {Name} (cap: {Capacity}/{MaxCapacity}) от " + CreatedAt.ToShortDateString() + ((RemovedAt != null) ? "(удалено " + RemovedAt?.ToShortDateString() + ")" : "");
Esempio n. 6
0
 private string getDateToUse()
 {
     return(UpdatedAt.HasValue ? UpdatedAt.Value.ToShortDateString() : CreatedAt.ToShortDateString());
 }
Esempio n. 7
0
 public override string ToString()
 {
     return($"PostId:{Id} - CreatedAt:{CreatedAt.ToShortDateString()} - Title:{Title} - UserId:{UserId} - Likes:{Likes} - Comments:{Comments.Count()}\n");
 }
Esempio n. 8
0
 public override string ToString()
 {
     return($"{Id} - {Name} {CreatedAt.ToShortDateString()} - {FinishedAt.ToShortDateString()}");
 }
Esempio n. 9
0
 /// <inheritdoc />
 public override string ToString() => $"Name: {Name}, CreatedAt: {CreatedAt.ToShortDateString()}, Id: {IdInDay}";