mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
MVVM refactoring for web search plugin, part 1
1. #486 2. fix #778 #763 #742 3. MVVM refactoring 4. remove IMultipleActionKeywords interface, use PluginManager directly
This commit is contained in:
@@ -3,25 +3,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Wox.Plugin.WebSearch.SuggestionSources
|
||||
{
|
||||
//todo rename file
|
||||
public abstract class SuggestionSource
|
||||
{
|
||||
public virtual string Domain { get; set; }
|
||||
|
||||
public abstract Task<List<string>> GetSuggestions(string query);
|
||||
|
||||
public static SuggestionSource GetSuggestionSource(string name)
|
||||
{
|
||||
switch (name.ToLower())
|
||||
{
|
||||
case "google":
|
||||
return new Google();
|
||||
|
||||
case "baidu":
|
||||
return new Baidu();
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public abstract Task<List<string>> Suggestions(string query);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user