Convert CanLaunchWebBrowser to expression body

This commit is contained in:
Patrick Barron 2023-01-27 18:33:32 -05:00
parent 990bd7d1ee
commit 8898012121

View File

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