using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Startup.Common;
namespace MediaBrowser.Server.Mono.Native
{
///
/// Class NativeApp
///
internal class NativeApp : BaseMonoApp
{
public NativeApp(StartupOptions startupOptions, ILogger logger)
: base(startupOptions, logger)
{
}
///
/// Shutdowns this instance.
///
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
{
// A restart script must be provided
return StartupOptions.ContainsOption("-restartpath");
}
}
///
/// Restarts this instance.
///
public override void Restart(StartupOptions startupOptions)
{
MainClass.Restart(startupOptions);
}
}
}