This repository has been archived on 2022-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
bookmark-manager/Models/BookmarkItemViewModel.cs

44 lines
1.3 KiB
C#
Raw Permalink Normal View History

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();
}
}
}