/// <summary> /// Output all properties /// </summary> /// <returns>A string</returns> public override string ToString() { var toString = new StringBuilder(); toString.Append("ID: ").AppendLine(Id); toString.Append("CreatedAt: ").AppendLine(CreatedAt.ToString(CultureInfo.InvariantCulture)); toString.Append("ModifiedAt: ").AppendLine(ModifiedAt.ToString(CultureInfo.InvariantCulture)).AppendLine(); toString.Append("OriginalWidth: ").AppendLine(OriginalWidth.ToString(CultureInfo.InvariantCulture)); toString.Append("OriginalHeight: ").AppendLine(OriginalHeight.ToString(CultureInfo.InvariantCulture)); toString.Append("Url: ").AppendLine(Url); toString.Append("Sizes: ").AppendLine(Sizes.Keys.Count.ToString(CultureInfo.InvariantCulture)); foreach (var size in Sizes) { toString.Append(size.Key).Append(" - ").AppendLine(size.Value); } return(toString.ToString()); }
public override string ToString() { var sb = new StringBuilder(); sb.AppendFormat("type: {0} id: {1} created_by: {2} created_at: {3} modified_by: {4} modified_at: {5} owned_by: {6} name: {7} description: {8} size: {9}", Type, Id, CreatedBy, CreatedAt.HasValue ? CreatedAt.ToString() : "null", ModifedBy, ModifiedAt.HasValue ? ModifiedAt.ToString() : "null", OwnedBy, Name, Description, Size); if (ItemCollection != null) { foreach (var item in ItemCollection.Entries) { if (item != null) { sb.Append("\n\t"); sb.Append(item); } } } return(sb.ToString()); }