Browse Source

Added IAppHost.Name

Luke Pulverenti 11 years ago
parent
commit
ac8ffb8db0

+ 6 - 0
MediaBrowser.Common.Implementations/BaseApplicationHost.cs

@@ -165,6 +165,12 @@ namespace MediaBrowser.Common.Implementations
 
         protected IIsoManager IsoManager { get; private set; }
 
+        /// <summary>
+        /// Gets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        public abstract string Name { get; }
+
         /// <summary>
         /// Initializes a new instance of the <see cref="BaseApplicationHost{TApplicationPathsType}"/> class.
         /// </summary>

+ 6 - 0
MediaBrowser.Common/IApplicationHost.cs

@@ -13,6 +13,12 @@ namespace MediaBrowser.Common
     /// </summary>
     public interface IApplicationHost
     {
+        /// <summary>
+        /// Gets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        string Name { get; }
+
         /// <summary>
         /// Occurs when [application updated].
         /// </summary>

+ 13 - 1
MediaBrowser.ServerApplication/ApplicationHost.cs

@@ -185,6 +185,18 @@ namespace MediaBrowser.ServerApplication
 
         }
 
+        /// <summary>
+        /// Gets the name.
+        /// </summary>
+        /// <value>The name.</value>
+        public override string Name
+        {
+            get
+            {
+                return "Media Browser Server";
+            }
+        }
+
         /// <summary>
         /// Gets a value indicating whether this instance can self restart.
         /// </summary>
@@ -732,7 +744,7 @@ namespace MediaBrowser.ServerApplication
             {
                 ServerAuthorization.AuthorizeServer(
                     ServerConfigurationManager.Configuration.HttpServerPortNumber,
-                    HttpServerUrlPrefixes.First(), 
+                    HttpServerUrlPrefixes.First(),
                     ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber,
                     UdpServerEntryPoint.PortNumber,
                     ConfigurationManager.CommonApplicationPaths.TempDirectory);