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.Mac/Native/BaseMonoApp.cs | 6 +++--- MediaBrowser.Server.Mac/Native/NativeApp.cs | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Server.Mac/Native') diff --git a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs index 9821f49ddd..57610dfc2c 100644 --- a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs +++ b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs @@ -19,16 +19,16 @@ namespace MediaBrowser.Server.Mac /// /// 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.Mac/Native/NativeApp.cs b/MediaBrowser.Server.Mac/Native/NativeApp.cs index f7c2dd4c95..4515be0517 100644 --- a/MediaBrowser.Server.Mac/Native/NativeApp.cs +++ b/MediaBrowser.Server.Mac/Native/NativeApp.cs @@ -13,7 +13,27 @@ namespace MediaBrowser.Server.Mac public override void Shutdown() { 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