接口文件
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace Hncore.Infrastructure.Common
|
||||
{
|
||||
public class EnvironmentVariableHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前环境是否为生产模式
|
||||
/// </summary>
|
||||
public static bool IsAspNetCoreProduction => Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Production";
|
||||
|
||||
public static string HostName => Environment.GetEnvironmentVariable("HOSTNAME");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user