2015-01-03 15:20:34 +08:00
|
|
|
|
namespace Wox.Plugin.WebSearch.SuggestionSources
|
2014-07-21 22:27:57 +08:00
|
|
|
|
{
|
|
|
|
|
|
public class SuggestionSourceFactory
|
|
|
|
|
|
{
|
2015-02-20 21:14:15 +08:00
|
|
|
|
public static ISuggestionSource GetSuggestionSource(string name,PluginInitContext context)
|
2014-07-21 22:27:57 +08:00
|
|
|
|
{
|
|
|
|
|
|
switch (name.ToLower())
|
|
|
|
|
|
{
|
|
|
|
|
|
case "google":
|
2015-02-20 21:14:15 +08:00
|
|
|
|
return new Google(context.Proxy);
|
2014-07-21 22:27:57 +08:00
|
|
|
|
|
|
|
|
|
|
case "baidu":
|
2015-02-20 21:14:15 +08:00
|
|
|
|
return new Baidu(context.Proxy);
|
2014-07-21 22:27:57 +08:00
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|