using System; using System.Text; namespace bzit.bomg.Models { public class BookmarkItemViewModel { public string SiteName { get; set; } public string SiteAddress { get; set; } public string SiteDescription { get; set; } public string FaviconAddress { get; set; } public string TreeviewPath { get; set; } public BookmarkItemModel ToModel() { return new BookmarkItemModel() { SiteName = this.SiteName, SiteAddress = this.SiteAddress, SiteDescription = this.SiteDescription, FaviconAddress = this.FaviconAddress, TreeviewPath = this.TreeviewPath }; } public new string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("Name = "); sb.Append(this.SiteName ?? string.Empty); sb.Append(Environment.NewLine); sb.Append("Address = "); sb.Append(this.SiteAddress ?? string.Empty); sb.Append(Environment.NewLine); sb.Append("Description = "); sb.Append(this.SiteDescription ?? string.Empty); sb.Append(Environment.NewLine); return sb.ToString(); } } }