Jackett/src/Jackett.Common/Utils/DotNetCoreUtil.cs

29 lines
734 B
C#
Raw Normal View History

2020-02-09 02:35:16 +00:00
using System;
using System.Runtime.InteropServices;
namespace Jackett.Common.Utils
{
public static class DotNetCoreUtil
{
public static bool IsRunningOnDotNetCore
{
get
{
var runningOnDotNetCore = false;
try
{
runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("core", StringComparison.OrdinalIgnoreCase) >= 0;
}
catch
{
//Issue only appears to occur for small number of users on Mono
runningOnDotNetCore = false;
}
return runningOnDotNetCore;
}
}
}
}