From fb48dd34870d5ef8d1d636d83af5132e26b99449 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 23 May 2015 18:01:13 -0400 Subject: support mono restarts --- MediaBrowser.Server.Mono/Native/BaseMonoApp.cs | 6 +++--- MediaBrowser.Server.Mono/Native/NativeApp.cs | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Mono/Native') diff --git a/MediaBrowser.Server.Mono/Native/BaseMonoApp.cs b/MediaBrowser.Server.Mono/Native/BaseMonoApp.cs index aea6d73679..ba96ca737b 100644 --- a/MediaBrowser.Server.Mono/Native/BaseMonoApp.cs +++ b/MediaBrowser.Server.Mono/Native/BaseMonoApp.cs @@ -21,16 +21,16 @@ namespace MediaBrowser.Server.Mono.Native /// /// Restarts this instance. /// - public void Restart() + public virtual void Restart() { - + throw new NotImplementedException(); } /// /// Determines whether this instance [can self restart]. /// /// true if this instance [can self restart]; otherwise, false. - public bool CanSelfRestart + public virtual bool CanSelfRestart { get { diff --git a/MediaBrowser.Server.Mono/Native/NativeApp.cs b/MediaBrowser.Server.Mono/Native/NativeApp.cs index d92b86157a..8c954ffcc5 100644 --- a/MediaBrowser.Server.Mono/Native/NativeApp.cs +++ b/MediaBrowser.Server.Mono/Native/NativeApp.cs @@ -13,5 +13,25 @@ namespace MediaBrowser.Server.Mono.Native { MainClass.Shutdown(); } + + /// + /// Determines whether this instance [can self restart]. + /// + /// true if this instance can self restart; otherwise, false. + public override bool CanSelfRestart + { + get + { + return true; + } + } + + /// + /// Restarts this instance. + /// + public override void Restart() + { + MainClass.Restart(); + } } } -- cgit v1.2.3