Update: Plugin Updating

Updating plugins from the plugin catalogue, and automatic updating of
plugins after a newer version of Disco is installed.
This commit is contained in:
Gary Sharp
2013-02-14 19:00:01 +11:00
parent 734b02fa1d
commit 8f769809c2
53 changed files with 3795 additions and 2975 deletions
+22
View File
@@ -10,6 +10,7 @@ using System.IO.Compression;
using Disco.Models.BI.Interop.Community;
using System.Web;
using Newtonsoft.Json;
using System.Threading;
namespace Disco.Services.Plugins
{
@@ -477,6 +478,27 @@ namespace Disco.Services.Plugins
return categoryDisplayNames;
}
#region Restart App
private static object _restartTimerLock = new object();
private static Timer _restartTimer;
internal static void RestartApp(int DelayMilliseconds)
{
lock (_restartTimerLock)
{
if (_restartTimer != null)
{
_restartTimer.Dispose();
}
_restartTimer = new Timer((state) =>
{
HttpRuntime.UnloadAppDomain();
//AppDomain.Unload(AppDomain.CurrentDomain);
}, null, DelayMilliseconds, Timeout.Infinite);
}
}
#endregion
#region Plugin Referenced Assemblies Resolving
public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)