mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Add IExclusivePlugin
This commit is contained in:
30
Wox.Core/Plugin/QueryDispatcher/ExclusiveQueryDispatcher.cs
Normal file
30
Wox.Core/Plugin/QueryDispatcher/ExclusiveQueryDispatcher.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Wox.Core.Exception;
|
||||
using Wox.Core.UserSettings;
|
||||
using Wox.Infrastructure.Logger;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Wox.Core.Plugin.QueryDispatcher
|
||||
{
|
||||
public class ExclusiveQueryDispatcher : BaseQueryDispatcher
|
||||
{
|
||||
protected override List<PluginPair> GetPlugins(Query query)
|
||||
{
|
||||
List<PluginPair> pluginPairs = new List<PluginPair>();
|
||||
var exclusivePluginPair = PluginManager.GetExclusivePlugin(query) ??
|
||||
PluginManager.GetActionKeywordPlugin(query);
|
||||
if (exclusivePluginPair != null)
|
||||
{
|
||||
pluginPairs.Add(exclusivePluginPair);
|
||||
}
|
||||
|
||||
return pluginPairs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user