mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Remove instance logic for BinaryStorage and JsonStorage, part 1
1. part of #389 2. huge refactoring
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
using Wox.Infrastructure.Storage;
|
||||
using Wox.Plugin.WebSearch.Annotations;
|
||||
using Wox.Plugin.WebSearch.SuggestionSources;
|
||||
|
||||
@@ -10,9 +11,22 @@ namespace Wox.Plugin.WebSearch
|
||||
{
|
||||
public class WebSearchPlugin : IPlugin, ISettingProvider, IPluginI18n, IInstantQuery, IMultipleActionKeywords
|
||||
{
|
||||
private WebSearchStorage _settings = WebSearchStorage.Instance;
|
||||
public PluginInitContext Context { get; private set; }
|
||||
|
||||
private readonly PluginSettingsStorage<Settings> _storage;
|
||||
private readonly Settings _settings;
|
||||
|
||||
public WebSearchPlugin()
|
||||
{
|
||||
_storage = new PluginSettingsStorage<Settings>();
|
||||
_settings = _storage.Load();
|
||||
}
|
||||
|
||||
~WebSearchPlugin()
|
||||
{
|
||||
_storage.Save();
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
|
||||
Reference in New Issue
Block a user