修改项目结构

This commit is contained in:
izory
2021-09-25 09:23:50 +08:00
parent 988ed714a7
commit b70ab3cd85
12 changed files with 14 additions and 13 deletions

View File

@@ -0,0 +1,46 @@
//using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 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 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;
//}
}
}