Refactoring [WIP]

This commit is contained in:
qianlifeng
2014-12-26 19:36:43 +08:00
parent 31281c7faa
commit 50f6044a2f
28 changed files with 515 additions and 325 deletions

View File

@@ -2,9 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wox.Core.Plugin;
using Wox.Helper;
using Wox.Plugin;
using Wox.PluginLoader;
namespace Wox.Commands
{
@@ -15,7 +15,7 @@ namespace Wox.Commands
public static void DispatchCommand(Query query)
{
if (Plugins.HitThirdpartyKeyword(query))
if (PluginManager.HitThirdpartyKeyword(query))
{
pluginCmd.Dispatch(query);
}

View File

@@ -2,11 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Wox.Core.Plugin;
using Wox.Helper;
using Wox.Infrastructure.Logger;
using Wox.Infrastructure.Storage.UserSettings;
using Wox.Plugin;
using Wox.PluginLoader;
namespace Wox.Commands
{
@@ -14,7 +14,7 @@ namespace Wox.Commands
{
public override void Dispatch(Query query)
{
PluginPair thirdPlugin = Plugins.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == query.ActionName);
PluginPair thirdPlugin = PluginManager.AllPlugins.FirstOrDefault(o => o.Metadata.ActionKeyword == query.ActionName);
if (thirdPlugin != null && !string.IsNullOrEmpty(thirdPlugin.Metadata.ActionKeyword))
{
var customizedPluginConfig = UserSettingStorage.Instance.CustomizedPluginConfigs.FirstOrDefault(o => o.ID == thirdPlugin.Metadata.ID);

View File

@@ -3,16 +3,16 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Wox.Core.Plugin;
using Wox.Infrastructure.Storage.UserSettings;
using Wox.Plugin;
using Wox.Plugin.SystemPlugins;
using Wox.PluginLoader;
namespace Wox.Commands
{
public class SystemCommand : BaseCommand
{
private IEnumerable<PluginPair> allSytemPlugins = Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System);
private IEnumerable<PluginPair> allSytemPlugins = PluginManager.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.System);
public override void Dispatch(Query query)
{