This commit is contained in:
bao-qian 2015-11-02 22:15:06 +00:00
parent 86da8cbd17
commit cd0d9052e8
2 changed files with 3 additions and 3 deletions

View file

@ -229,7 +229,7 @@ namespace Wox.Core.Plugin
public static IEnumerable<PluginPair> GetPlugins<T>() where T : IFeatures public static IEnumerable<PluginPair> GetPlugins<T>() where T : IFeatures
{ {
return from p in AllPlugins where p.Plugin is T select p; return AllPlugins.Where(p => p.Plugin is T);
} }
private static PluginPair GetExclusivePlugin(Query query) private static PluginPair GetExclusivePlugin(Query query)

View file

@ -39,9 +39,9 @@ namespace Wox.Core.UI
internal static void ApplyPluginLanguages() internal static void ApplyPluginLanguages()
{ {
RemoveResource(PluginManager.DirectoryName); RemoveResource(PluginManager.DirectoryName);
foreach (var languageFile in (PluginManager.GetPlugins<IPluginI18n>(). foreach (var languageFile in PluginManager.GetPlugins<IPluginI18n>().
Select(plugin => InternationalizationManager.Instance.GetLanguageFile(((IPluginI18n)plugin.Plugin).GetLanguagesFolder())). Select(plugin => InternationalizationManager.Instance.GetLanguageFile(((IPluginI18n)plugin.Plugin).GetLanguagesFolder())).
Where(file => !string.IsNullOrEmpty(file)))) Where(file => !string.IsNullOrEmpty(file)))
{ {
Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary
{ {