忽略dll文件git

This commit is contained in:
“wanyongkang”
2023-07-29 10:19:42 +08:00
parent 7f97317bcc
commit b562aba2b1
3868 changed files with 63608 additions and 385427 deletions

View File

@@ -1,46 +0,0 @@
using Microsoft.AspNetCore.Http;
using System;
using System.Linq;
namespace Hncore.Infrastructure.Extension
{
public static class RequestExtension
{
public static string Get(this HttpRequest request, string key)
{
if (request.Query.ContainsKey(key))
{
return request.Query[key];
}
return "";
}
public static int GetInt(this HttpRequest request, string key)
{
if (request.Query.ContainsKey(key))
{
return Convert.ToInt32(request.Query[key]);
}
return 0;
}
public static string GetUrl(this HttpRequest request, bool full=true)
{
if (full)
{
return $"{request.Scheme}://{request.Host}{request.Path}{request.QueryString}";
}
return $"{request.Path}{request.QueryString}";
}
public static string Remove(this HttpRequest request, string key)
{
var q = request.Query.Where(m => !m.Key.Equals(key, StringComparison.InvariantCultureIgnoreCase));
var kvs = q.Select(m => $"{m.Key}={m.Value}");
return string.Join("&", kvs);
}
}
}