using BookmarkManager; using System; using System.Text; namespace bzit.bomg.Models { public class BookmarkItem { public string SiteName { get; set; } public string SiteAddress { get; set; } public string SiteDescription { get; set; } public string TreeviewPath { get; set; } public string Notes { get; set; } public new string ToString() { StringBuilder sb = new StringBuilder(); if (!string.IsNullOrWhiteSpace(this.SiteName)) { sb.AppendLine("Name"); sb.AppendLine(this.SiteName + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.SiteAddress)) { sb.AppendLine("Address"); sb.AppendLine(this.SiteAddress + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.SiteDescription)) { sb.AppendLine("Description"); sb.AppendLine(this.SiteDescription + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.Notes)) { sb.AppendLine("Notes"); sb.AppendLine(this.Notes + Environment.NewLine); } return sb.ToString(); } public string ToHash() => Crypto.GetSHA256Hash(this.SiteAddress); } }