mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
27 lines
660 B
C#
27 lines
660 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Wox.Plugin.WebSearch.SuggestionSources
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|