Refactoring Plugin.Feature

This commit is contained in:
bao-qian
2015-11-02 19:27:46 +00:00
parent 7a38143f5e
commit 86da8cbd17
13 changed files with 59 additions and 44 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -12,7 +11,6 @@ using Wox.Core.UserSettings;
using Wox.Infrastructure;
using Wox.Infrastructure.Logger;
using Wox.Plugin;
using Wox.Plugin.Features;
namespace Wox.Core.Plugin
{
@@ -229,7 +227,7 @@ namespace Wox.Core.Plugin
return AllPlugins.FirstOrDefault(o => o.Metadata.ID == id);
}
public static IEnumerable<PluginPair> GetPlugins<T>() where T : class
public static IEnumerable<PluginPair> GetPlugins<T>() where T : IFeatures
{
return from p in AllPlugins where p.Plugin is T select p;
}

View File

@@ -3,7 +3,6 @@ using System.Linq;
using System.Windows;
using Wox.Core.i18n;
using Wox.Core.Plugin;
using Wox.Infrastructure;
using Wox.Plugin;
namespace Wox.Core.UI