mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
some UI staff
This commit is contained in:
@@ -20,15 +20,19 @@ namespace WinAlfred.PluginLoader
|
||||
try
|
||||
{
|
||||
Assembly asm = Assembly.LoadFile(metadata.ExecuteFile);
|
||||
List<Type> types = asm.GetTypes().Where(o => o.GetInterfaces().Contains(typeof(IPlugin))).ToList();
|
||||
List<Type> types = asm.GetTypes().Where(o => o.GetInterfaces().Contains(typeof (IPlugin))).ToList();
|
||||
if (types.Count == 0)
|
||||
{
|
||||
Log.Error(string.Format("Cound't load plugin {0}: didn't find the class who implement IPlugin", metadata.Name));
|
||||
Log.Error(string.Format("Cound't load plugin {0}: didn't find the class who implement IPlugin",
|
||||
metadata.Name));
|
||||
continue;
|
||||
}
|
||||
if (types.Count > 1)
|
||||
{
|
||||
Log.Error(string.Format("Cound't load plugin {0}: find more than one class who implement IPlugin, there should only one class implement IPlugin", metadata.Name));
|
||||
Log.Error(
|
||||
string.Format(
|
||||
"Cound't load plugin {0}: find more than one class who implement IPlugin, there should only one class implement IPlugin",
|
||||
metadata.Name));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -43,9 +47,9 @@ namespace WinAlfred.PluginLoader
|
||||
{
|
||||
Log.Error(string.Format("Cound't load plugin {0}: {1}", metadata.Name, e.Message));
|
||||
#if (DEBUG)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
{
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user