aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Mac/Native/NativeApp.cs
blob: 59fa92dd188d8cf40e69f52abe4aaddc05bbd93a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using MediaBrowser.Server.Startup.Common;
using MediaBrowser.Model.Logging;

namespace MediaBrowser.Server.Mac
{
	/// <summary>
	/// Class NativeApp
	/// </summary>
	public class NativeApp : BaseMonoApp
	{
		public NativeApp(ILogger logger)
	            : base(logger)
	        {
	        }

        /// <summary>
		/// Shutdowns this instance.
		/// </summary>
		public override void Shutdown()
		{
			MainClass.Shutdown();
        }

        /// <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
            {
                return true;
            }
        }

        /// <summary>
        /// Restarts this instance.
        /// </summary>
		public override void Restart(StartupOptions options)
        {
            MainClass.Restart();
        }
	}
}