mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Remove instance logic for BinaryStorage and JsonStorage, part 1
1. part of #389 2. huge refactoring
This commit is contained in:
@@ -4,22 +4,9 @@ using Wox.Infrastructure.Storage;
|
||||
|
||||
namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
public class WebSearchStorage : JsonStrorage<WebSearchStorage>
|
||||
public class Settings
|
||||
{
|
||||
[JsonProperty]
|
||||
public List<WebSearch> WebSearches { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public bool EnableWebSearchSuggestion { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
public string WebSearchSuggestionSource { get; set; }
|
||||
|
||||
protected override string FileName { get; } = "settings_plugin_websearch";
|
||||
|
||||
protected override WebSearchStorage LoadDefault()
|
||||
{
|
||||
WebSearches = new List<WebSearch>(new List<WebSearch>()
|
||||
public List<WebSearch> WebSearches { get; set; } = new List<WebSearch>
|
||||
{
|
||||
new WebSearch
|
||||
{
|
||||
@@ -173,9 +160,10 @@ namespace Wox.Plugin.WebSearch
|
||||
Url = "http://www.search.yahoo.com/search?p={q}",
|
||||
Enabled = true
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return this;
|
||||
}
|
||||
public bool EnableWebSearchSuggestion { get; set; }
|
||||
|
||||
public string WebSearchSuggestionSource { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user