mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Allow PluginManager class to manage the reload call
This commit is contained in:
@@ -3,9 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Wox.Core.Resource;
|
|
||||||
using Wox.Infrastructure;
|
using Wox.Infrastructure;
|
||||||
using Wox.Infrastructure.Exception;
|
|
||||||
using Wox.Infrastructure.Logger;
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Infrastructure.Storage;
|
using Wox.Infrastructure.Storage;
|
||||||
using Wox.Infrastructure.UserSettings;
|
using Wox.Infrastructure.UserSettings;
|
||||||
@@ -66,6 +64,15 @@ namespace Wox.Core.Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ReloadData()
|
||||||
|
{
|
||||||
|
foreach(var plugin in AllPlugins)
|
||||||
|
{
|
||||||
|
var reloadablePlugin = plugin.Plugin as IReloadable;
|
||||||
|
reloadablePlugin?.ReloadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static PluginManager()
|
static PluginManager()
|
||||||
{
|
{
|
||||||
ValidateUserDirectory();
|
ValidateUserDirectory();
|
||||||
|
|||||||
Reference in New Issue
Block a user