2
0
Эх сурвалжийг харах

Convert CanLaunchWebBrowser to expression body

Patrick Barron 2 жил өмнө
parent
commit
8898012121

+ 3 - 17
Emby.Server.Implementations/ApplicationHost.cs

@@ -187,23 +187,9 @@ namespace Emby.Server.Implementations
 
         public bool CoreStartupHasCompleted { get; private set; }
 
-        public virtual bool CanLaunchWebBrowser
-        {
-            get
-            {
-                if (!Environment.UserInteractive)
-                {
-                    return false;
-                }
-
-                if (_startupOptions.IsService)
-                {
-                    return false;
-                }
-
-                return OperatingSystem.IsWindows() || OperatingSystem.IsMacOS();
-            }
-        }
+        public virtual bool CanLaunchWebBrowser => Environment.UserInteractive
+            && !_startupOptions.IsService
+            && (OperatingSystem.IsWindows() || OperatingSystem.IsMacOS());
 
         /// <summary>
         /// Gets the <see cref="INetworkManager"/> singleton instance.