Flow.Launcher/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/Bookmark.cs

22 lines
650 B
C#
Raw Permalink Normal View History

using System.Collections.Generic;
namespace Flow.Launcher.Plugin.BrowserBookmark.Models
{
2021-09-21 18:50:51 +00:00
// Source may be important in the future
public record Bookmark(string Name, string Url, string Source = "")
{
2021-09-21 18:50:51 +00:00
public override int GetHashCode()
{
2021-09-21 18:50:51 +00:00
var hashName = Name?.GetHashCode() ?? 0;
var hashUrl = Url?.GetHashCode() ?? 0;
return hashName ^ hashUrl;
}
2021-09-21 18:50:51 +00:00
public virtual bool Equals(Bookmark other)
{
2021-09-21 18:50:51 +00:00
return other != null && Name == other.Name && Url == other.Url;
}
public List<CustomBrowser> CustomBrowsers { get; set; }= new();
}
2021-09-21 18:50:51 +00:00
}