feat:上线服务监控功能

This commit is contained in:
橙子
2023-04-19 22:38:46 +08:00
parent 9ebafff392
commit 8f143be4b0
15 changed files with 1510 additions and 106 deletions

View File

@@ -0,0 +1,44 @@
//using Microsoft.AspNetCore.Http;
namespace Yi.Framework.Infrastructure.Extensions
{
public static partial class Extensions
{
public static bool IsEmpty(this object value)
{
if (value != null && !string.IsNullOrEmpty(value.ParseToString()))
{
return false;
}
else
{
return true;
}
}
public static bool IsNotEmpty(this object value)
{
return !IsEmpty(value);
}
public static bool IsNullOrZero(this object value)
{
if (value == null || value.ParseToString().Trim() == "0")
{
return true;
}
else
{
return false;
}
}
//public static bool IsAjaxRequest(this HttpRequest request)
//{
// if (request == null)
// throw new ArgumentNullException("request");
// if (request.Headers != null)
// return request.Headers["X-Requested-With"] == "XMLHttpRequest";
// return false;
//}
}
}