jellyfin/MediaBrowser.Server.Mono/Native/NativeApp.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2016-05-01 23:48:37 +02:00
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Startup.Common;
2015-06-05 16:27:01 +02:00
namespace MediaBrowser.Server.Mono.Native
2013-09-25 02:54:51 +02:00
{
/// <summary>
/// Class NativeApp
/// </summary>
2014-11-26 05:27:55 +01:00
internal class NativeApp : BaseMonoApp
2013-09-25 02:54:51 +02:00
{
2016-05-01 23:48:37 +02:00
public NativeApp(StartupOptions startupOptions, ILogger logger)
: base(startupOptions, logger)
2015-10-05 18:05:08 +02:00
{
}
2013-09-25 02:54:51 +02:00
/// <summary>
/// Shutdowns this instance.
/// </summary>
2014-11-24 00:10:41 +01:00
public override void Shutdown()
2013-09-25 02:54:51 +02:00
{
MainClass.Shutdown();
2013-09-25 02:54:51 +02:00
}
2015-05-24 00:01:13 +02:00
/// <summary>
/// Determines whether this instance [can self restart].
/// </summary>
/// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
public override bool CanSelfRestart
{
get
{
2016-01-10 18:36:38 +01:00
// A restart script must be provided
return StartupOptions.ContainsOption("-restartpath");
2015-05-24 00:01:13 +02:00
}
}
/// <summary>
/// Restarts this instance.
/// </summary>
2015-06-05 16:27:01 +02:00
public override void Restart(StartupOptions startupOptions)
2015-05-24 00:01:13 +02:00
{
2015-06-05 16:27:01 +02:00
MainClass.Restart(startupOptions);
2015-05-24 00:01:13 +02:00
}
2013-09-25 02:54:51 +02:00
}
}