RuoVea.ExUtil 8.0.0.1

dotnet add package RuoVea.ExUtil --version 8.0.0.1
NuGet\Install-Package RuoVea.ExUtil -Version 8.0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RuoVea.ExUtil" Version="8.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RuoVea.ExUtil --version 8.0.0.1
#r "nuget: RuoVea.ExUtil, 8.0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RuoVea.ExUtil as a Cake Addin
#addin nuget:?package=RuoVea.ExUtil&version=8.0.0.1

// Install RuoVea.ExUtil as a Cake Tool
#tool nuget:?package=RuoVea.ExUtil&version=8.0.0.1

RuoVea.ExUtil

介绍
	Common  AES加解密工具 UtilAes、RSA工具类 UtilRsa、OrderNum  生成 Salt 盐、枚举扩展属性 EnumExtension、
	链接错误: ConnctionException、参数错误处理 ParamiterException 、异常信息扩展 ExceptionEx、异常信息封装类 ExceptionMessage
	CommonUtils:根据文件类型分配路径、获得IP地址、获得IP地址、获取 User-Agent 所有信息、客户端IP地址、得到客户端IP地址、得到局域网IP地址、请求UserAgent信息、请求Url、得到操作系统版本、UserAgent信息、远程路径Encode处理、标准化远程目录路径、获取请求的ip4、
	Extensions: 类型转换扩展、日期时间扩展、json序列反序列化、可空类型、验证扩展、Linq扩展
	Const: 汉字及拼音首字母、常用简体汉字、字符串工具方法
	时间操作: Time、UnixTime
	Validate:邮箱、时间、电话、身份证、手机、最大长度、数值、不可空、网址、微信
	xml文件操作
	TreeBuildUtil树的构建
	字符串验证帮助类 ValidatorUtil:验证输入字符串为数字(带小数)、验证中国电话格式是否有效,格式010-85849685、验证输入字符串为电话号码、验证是否是有效传真号码、
	验证手机号是否合法、验证身份证是否有效、验证是否是有效邮箱地址、验证是否只含有汉字、是否有多余的字符 防止SQL注入、是否由数字、26个英文字母或者下划线組成的字串、
	由数字、26个英文字母、汉字組成的字串、由数字、26个英文字母組成的字串、判断用户输入是否为日期
	获取服务器信息 ExMachine
	系统Shell命令 ExShell
	图片工具类 ExImage 保存二进制流到文件、删除文件夹里面所有的文件、无损压缩图片
	字符串中间部分字符替换成特殊字符、枚举校验
	HttpUtils:HttpPost、HttpGet
使用示例
Stopwatch计时器

计时器开始
Stopwatch stopwatch = TimerStart();
计时器结束
double milliseconds=TimerEnd(stopwatch);

#region 删除数组中的重复项
public static string[] RemoveDup(string[] values)

 
相关文件
数值

数值转换 int ToInt(this object data)
转换为可空整型  int? ToIntOrNull(this object data)
转换为双精度浮点数 double ToDouble(this object data)
转换为双精度浮点数,并按指定的小数位4舍5入 double ToDouble(this object data, int digits)
转换为可空双精度浮点数 double? ToDoubleOrNull(this object data)
转换为高精度浮点数 decimal ToDecimal(this object data)
转换为高精度浮点数,并按指定的小数位4舍5入 decimal ToDecimal(this object data, int digits)
转换为可空高精度浮点数 decimal? ToDecimalOrNull(this object data)
转换为可空高精度浮点数,并按指定的小数位4舍5入 decimal? ToDecimalOrNull(this object data, int digits)
转换为日期 DateTime ToDate(this object data)
转换为可空日期 DateTime? ToDateOrNull(this object data)
转换为布尔值 bool ToBool(this object data)
获取布尔值 bool? GetBool(this object data)
转换为可空布尔值 bool? ToBoolOrNull(this object data)
转换为字符串 string ToString(this object data)
获取对象值 object GetObject(this object data, string name)
获取字符串 string GetString(this object data, string name)
string 转 byte[]  byte[] GetBytes(this string str)
byte[] 转 string  string GetString(this byte[] bytes)
将一个字典转化为 QueryString  string ToQueryString(this Dictionary<string, string> dict, bool urlEncode = true)
将一个字符串 URL 编码 string UrlEncode(this string str)
移除空值项  void RemoveEmptyValueItems(this Dictionary<string, string> dict)


日期时间扩展 Extensions

获取格式化字符串,带时分秒,格式"yyyy-MM-dd HH:mm:ss"   string ToDateTimeString(this DateTime dateTime, bool isRemoveSecond = false)
获取格式化字符串,带时分秒,格式"yyyy-MM-dd HH:mm:ss"  string ToDateTimeString(this DateTime? dateTime, bool isRemoveSecond = false)
获取格式化字符串,不带时分秒,格式"yyyy-MM-dd"  string ToDateString(this DateTime dateTime)
获取格式化字符串,不带时分秒,格式yyyy-MM-dd  string ToDateString(this DateTime? dateTime)
获取格式化字符串,不带年月日,格式HH:mm:ss  string ToTimeString(this DateTime dateTime)
获取格式化字符串,不带年月日,格式HH:mm:ss  string ToTimeString(this DateTime? dateTime)
获取格式化字符串,带毫秒,格式yyyy-MM-dd HH:mm:ss.fff  string ToMillisecondString(this DateTime dateTime)
获取格式化字符串,带毫秒,格式"yyyy-MM-dd HH:mm:ss.fff"  string ToMillisecondString(this DateTime? dateTime)
获取格式化字符串,不带时分秒,格式yyyy年MM月dd日  string ToChineseDateString(this DateTime dateTime)
获取格式化字符串,不带时分秒,格式"yyyy年MM月dd日"  string ToChineseDateString(this DateTime? dateTime)
获取格式化字符串,带时分秒,格式"yyyy年MM月dd日 HH时mm分"  string ToChineseDateTimeString(this DateTime dateTime, bool isRemoveSecond = false)
获取格式化字符串,带时分秒,格式"yyyy年MM月dd日 HH时mm分"  string ToChineseDateTimeString(this DateTime? dateTime, bool isRemoveSecond = false)
获取时间戳  long GetTimeStamp(this DateTime dateTime)
时间戳转换成日期  DateTime GetTimeSpmpToDate(this object timeStamp)    


扩展.json序列反序列化

转成json对象  object Json2Obj(this string Json)
转成json字串  string Json2Str(this object obj, bool long2Str = true)
转成json字串  string Json2Str(this object obj, string datetimeformats, bool long2Str = true)
字串反序列化成指定对象实体  T ToObject<T>(this string Json)
字串反序列化成指定对象实体(列表)  List<T> ToList<T>(this string Json)
字串反序列化成DataTable  DataTable ToTable(this string Json)
字串反序列化成linq对象  JObject ToJObject(this string Json)
list转换为Json  string ListToJson<T>(this IList<T> list)
对象转换为json  string ToJson(this object jsonObject)
对象集合转换为json  string ToJson(this IEnumerable array)
普通集合转换Json  string ToArrayString(this IEnumerable array)
DataSet转换为Json  string ToJson(this DataSet dataSet)
Datatable转换为Json  string ToJson(this DataTable dt)
DataTable转换为Json string ToJson(this DataTable dt, string jsonName)
DataReader转换为Json  string ReaderJson(this IDataReader dataReader)
反序列化 T DeserializeObject<T>(this string entityString)
序列化  string Serialize(this object obj, JsonSerializerSettings formatDate = null)
    

扩展 - 可空类型

安全返回值 T SafeValue<T>(this T? value) where T : struct
是否包含 bool ContainsEx(this string obj, string value)
字串是否在指定字串中存在 bool Like(this string obj, string value)
安全判断是空 bool IsNullOrWhiteSpace(this string str)
安全判断不是空 bool NotNullOrWhiteSpace(this string str)
安全判断是空 bool IsNullOrWhiteSpace(this int? str)
安全判断不是空  bool NotNullOrWhiteSpace(this int? str)
安全判断是空  bool IsNullOrWhiteSpace(this int str)
安全判断不是空  bool NotNullOrWhiteSpace(this int str)
将字符串转换为int类型数组  List<string> StrToListString(this string str)
去除重复列表数据  IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
删除最后结尾的一个逗号  string DelLastComma(this string str)    
删除最后结尾的指定字符后的字符  string DelLastChar(this string str, string strchar)
删除最后结尾的长度  string DelLastLength(this string str, int Length)
     

转换成地址参数  string ToParams(object source)
 
Splice(拼接集合元素)
拼接集合元素  string Splice<T>(this IEnumerable<T> list, string quotes = "", string separator = ",")
将值的首字母大写  string FirstUpper(this string value)
将值的首字母小写 string FirstLower(this string value)
将字符串转成驼峰形式 string ToCamel(this string value)
将字符串转成驼峰形式 去除下划线 string ToCamelAny(this string value)
是否包含中文 bool ContainsChinese(this string text)
是否包含数字 bool ContainsNumber(this string text)
去除重复 string Distinct(this string value)
截断字符串 string Truncate(this string text, int length, int endCharCount = 0, string endChar = ".")
获取最后一个属性  string GetLastProperty(this string propertyName)
取得HTML中所有图片的 URL。  string[] GetHtmlImageUrlList(this string sHtmlText)
过滤Emoji string FilterEmoji(this string str)
将字符串转换为long类型数组 List<long> StrToListLong(this string str)
正则匹配  bool IsMatch(this string value, string pattern, RegexOptions options)
正则匹配  bool IsMatch(this string value, string pattern)
切割时间  (string beginTime, string endTime) Splitting(this string timeStr, char split = '/')
    
    
验证扩展

检测空值,为null则抛出ArgumentNullException异常  void CheckNull(this object obj, string parameterName)    
是否为空  bool IsEmpty(this string value)
是否为空  bool IsEmpty(this Guid? value)  
是否为空  bool IsEmpty(this Guid value)
是否为空  bool IsEmpty(this object value)   
将传入的字符串中间部分字符替换成特殊字符  string ReplaceWithSpecialChar(this string value, int startLen = 4, int endLen = 4, char specialChar = '*')    
枚举校验  bool IsDefined<enumType>(this Enum? value)  
Long类型Json序列化重写 在js中传输会导致精度丢失,故而在序列化时转换成字符类型  LongToStringConverter  
是否可以转换 bool CanConvert(Type objectType)
读json object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
写json  WriteJson(JsonWriter writer, object value, JsonSerializer serializer)


Linq扩展 创建一个访问属性的表达式 Expression Property(this Expression expression, string propertyName)
条件表达式且(第一个true才执行第二个) Expression AndAlso(this Expression left, Expression right) 
创建一个回调带有参数方法的表达式 Expression Call(this Expression instance, string methodName, params Expression[] arguments) 
创建一个比较表达式 Expression GreaterThan(this Expression left, Expression right) 

Lambda表达式 Expression<T> ToLambda<T>(this Expression body, params ParameterExpression[] parameters) 
Lambda(真) Expression<Func<T, bool>> True<T>() { return param => true; }
Lambda(假) Expression<Func<T, bool>> False<T>() { return param => false; }
组合And Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) 
组合Or Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> first, Expression<Func<T, bool>> second) 
使用指定的合并函数将第一个表达式与第二个表达式合并 static Expression<T> Compose<T>(this Expression<T> first, Expression<T> second, Func<Expression, Expression, Expression> merge) 

参数帮定器 ParameterRebinder  
获取服务器信息  ExMachine
获取资源使用信息 dynamic GetMachineUseInfo()
获取基本参数 dynamic GetMachineBaseInfo()
获取CPU使用率 string GetCpuRate()
获得硬盘使用率 string GetDiskRate()
获取内存信息 dynamic GetRamInfo()
系统Shell命令 Machine.ExShell
Bash命令 string Bash(string command)
cmd命令 string Cmd(string fileName, string args)
在控制台输出类 ConsoleHelper

在控制台输出  void WriteColorLine(string str, ConsoleColor color)
打印错误信息  void WriteErrorLine(this string str, ConsoleColor color = ConsoleColor.Red) => WriteColorLine(str, color);
打印警告信息  void WriteWarningLine(this string str, ConsoleColor color = ConsoleColor.Yellow) => WriteColorLine(str, color);
打印正常信息  void WriteInfoLine(this string str, ConsoleColor color = ConsoleColor.White) => WriteColorLine(str, color);
打印成功的信息  void WriteSuccessLine(this string str, ConsoleColor color = ConsoleColor.Green) => WriteColorLine(str, color);
汉字及拼音首字母  public const string ChinesePinYin =  
常用简体汉字  public const string SimplifiedChinese =  
英文字母  public const string Letters = "abcdefghijklmnopqrstuvwxyz";
数字  public const string Numbers = "0123456789";
空字符串 string Empty
获取汉字的拼音简码,即首字母缩写,范例中国,返回zg  string PinYin(string chineseText)
从拼音简码文件获取 string ResolvePinYinByFile(string text)
获取全局唯一值 string Unique()
根据文件类型分配路径  string AssigendPath(string fileExt, string path)


时间操作 Time

当前时间 DateTime Now
短日期格式(yyyy/MM/dd) string ShortDate
长日期格式(yyyy月MM日dd日) string LongDate
日期时间(yyyy/MM/dd HH:mm) string ShortDateTime 
日期时间(yyyy年MM月dd日 HH时mm分) string LongDateTime 
日期时间(yyyy年MM月dd日 HH时mm分) string LongTime 
日期时间(yyyy年MM月dd日 HH时mm分)  string ShortTime 
当前日期  string GetToday() 
当前日期自定义格式  string GetToday(string format) 
当前日期 加添加,减天数 -1、1  string GetDate(int i) 
当前日期 加添加,减天数 -1、1  string GetDate(int i, string dateformat) 
返回本年有多少天 int GetDaysOfYear(int iYear) 
本年有多少天 int GetDaysOfYear(DateTime dt)
本月有多少天 int GetDaysOfMonth(int iYear, int Month)
本月有多少天 int GetDaysOfMonth(DateTime dt)
返回当前日期的星期名称 string GetWeekNameOfDay(DateTime dt)
返回当前日期的星期编号 int GetWeekNumberOfDay(DateTime dt)
获取某一年有多少周 int GetWeekAmount(int year) 
获取某一日期是该年中的第几周 int GetWeekOfYear(DateTime dt) 
根据某年的第几周获取这周的起止日期 void WeekRange(int year, int weekOrder, ref DateTime firstDate, ref DateTime lastDate)
返回两个日期之间相差的天数 int DiffDays(DateTime dtfrm, DateTime dtto) 
返回两个日期之间相差的小时数 int DiffHours(DateTime dtfrm, DateTime dtto) 
返回两个日期之间相差的分钟数 int DiffMinutes(DateTime dtfrm, DateTime dtto) 
输入的字符串转化为日期。如果字符串的格式非法,则返回当前日期。 DateTime ToDate(string strInput)
将日期对象转化为格式字符串 string ToString(DateTime oDateTime, string strFormat)
获取当前日期是星期几 int GetNumberWeekDay(DateTime dt) 
获取中式星期信息 string GetChineseWeekDay(int y, int m, int d)
获取中国时间 string GetChineseDateTime(DateTime dt) 


UnixTime
 
将64位Unix时间(UTC)转换为表示本地时间中相同时间的DateTime实例 DateTime ToDateTime(long time) 
时间返回秒数 long ToInt64(DateTime time) 
确定一个给定的年份(以1900年以来的年数表示)是否为闰年 bool IsLeapYear(int y)
获取时间搓 long Ticks()


递归工具类,用于遍历有父子关系的节点,例如菜单树,字典树等等  TreeBuildUtil<T> 

构造树节点 Build(List<T> nodes)   


字符检查扩展方法 Check 

判断为空 void IsNotEmpty(Guid argument, string argumentName) 
判断不为空 void IsNotEmpty(string argument, string argumentName) 
判断超出长度 void IsNotOutOfLength(string argument, int length, string argumentName) 
不为空 void IsNotNull(object argument, string argumentName, string message = "") 
不是负数 void IsNotNegative(int argument, string argumentName) 
不是负数或者零 void IsNotNegativeOrZero(int argument, string argumentName) 
不是无效日期 void IsNotInvalidDate(DateTime argument, string argumentName) 
不在过去 void IsNotInPast(DateTime argument, string argumentName) 
不在未来 void IsNotInFuture(DateTime argument, string argumentName) 
不是负数 void IsNotNegative(TimeSpan argument, string argumentName) 
不是负数或者零 void IsNotNegativeOrZero(TimeSpan argument, string argumentName) 
不为空 void IsNotEmpty<T>(ICollection<T> argument, string argumentName) 
超出限定值 void IsNotOutOfRange(int argument, int min, int max, string argumentName) 
等于指定长度 void IsEqualLength(int sourceLength, int limitLength, string argumentName)
文件不存在 void IsNotExistsFile(string argument, string argumentName)
文件夹不存在 void IsNotExistsDirectory(string argument, string argumentName)


验证操作 Valid

是否邮箱 bool IsEmail(string value, bool isRestrict = false)
是否存在邮箱 bool HasEmail(string value, bool isRestrict = false)
是否合法的手机号码 bool IsPhoneNumber(string value)
是否手机号码 bool IsMobileNumber(string value)
是否存在手机号码 bool HasMobileNumberSimple(string value, bool isRestrict = false)
是否中国移动号码 bool IsChinaMobilePhone(string value)
是否中国联通号码 bool IsChinaUnicomPhone(string value)
是否中国电信号码 bool IsChinaTelecomPhone(string value)
是否中国电话,格式010-85849685 bool IsTel(string value)
是否身份证号码 bool IsIdCard(string value)
是否Base64编码 bool IsBase64String(string value)
是否Guid bool IsGuid(string guid)
是否Url地址(统一资源定位) bool IsUrl(string value)
是否Uri(统一资源标识) bool IsUri(string value)
是否主域名或者www开头的域名 bool IsMainDomainUrl(string value)
是否主域名 bool IsMainDomain(string value)
是否域名 bool IsDomain(string value)
是否Mac地址 bool IsMac(string value)
是否大于0的正整数 bool IsPositiveInteger(string value)
是否Int32类型 bool IsInt32(string value)
是否Double类型 bool IsDouble(string value)
是否Double类型 bool IsDouble(string value, double minValue, double maxValue, int digit)
是否密码One的格式,6-25位包含特殊字符 bool IsPasswordOne(string value)
是否密码One的格式,指定密码长度,包含特殊字符 bool IsPasswordOne(string value, int min, int max)
是否密码Two的格式,6-25位包含特殊字符 bool IsPasswordTwo(string value)
是否密码格式 bool IsPassworld(object value, int minLength = 8, int maxLength = 32)
是否密码格式 bool IsSuperPassworld(object value, int minLength = 8, int maxLength = 32)
是否登录账号,6-30位长度 bool IsLoginName(string value)
是否登录账号 bool IsLoginName(string value, int min, int max)
是否银行卡号,16位或19位银行卡(简单校验) bool IsBandCard(string value)
是否安全Sql语句 bool IsSafeSqlString(string value)
是否有效版本号,范例1.3,1.1.5,1.25.256  bool IsVersion(string value, int length = 5)
是否中文字符 bool IsChineseWord(string value)
是否中文 bool IsChinese(string value)
是否包含中文 bool IsContainsChinese(string value)
是否包含数字 bool IsContainsNumber(string value)
是否IP地址 bool IsIpAddress(string value)
是否整数 bool IsInteger(string value)
是否Unicode字符串 bool IsUnicode(string value)
字符串长度是否在指定范围内,一个中文为2个字符 bool IsLengthStr(string value, int begin, int end)
是否中国邮政编码,6位数字 bool IsChinesePostalCode(string value)
是否正常字符,字母、数字、下划线的组合 bool IsNormalChar(string value)
是否指定后缀 bool IsPostfix(string value, string[] postfixs)
是否数字型 bool IsDecimal(string value)
是否重复,范例112,返回true bool IsRepeat(string value)
是否合法QQ号码 bool IsQQ(string value)
是否颜色值。检查颜色值是否为3/6位的合法颜色值。例如FFF、FFFFFF bool IsColorValue(string value)
是否全角字符,包含汉字在内 bool IsWideWord(string value)
是否半角字符,包含汉字在内 bool IsNarrowWord(string value)
是否数字。0-9的数字,不包含符号"."和"-" bool IsOnlyNumber(string value)
是否数字字符串(包括小数) bool IsNumber(this string objStr)
数值 两位小数的数字 bool IsNumber2(object value)
验证输入字符串为带小数点正数 bool IsNumberpo(this string str)
验证输入字符串为带小数点正负数 bool IsNumberic(this string str)
是否大写英文字母组成的字符串 bool IsUpperCaseChar(string value)
是否大写英文字母 bool IsUpperCaseChar(char value)
是否小写英文字母组成的字符串 bool IsLowerCaseChar(string value)
是否小写英文字母 bool IsLowerCaseChar(char value)
是否时间格式 bool IsTime(string value)
是否日期 bool IsDate(string value, bool isRegex = false)
是否日期 bool IsDate(string value, string format)
是否日期 bool IsDate(string value, string format, IFormatProvider provider, DateTimeStyles styles)
是否大于最小时间 bool IsDateTimeMin(string value, DateTime min)
是否小于最大时间 bool IsDateTimeMax(string value, DateTime max)
判断用户输入是否为日期 bool IsDateTime(this string str)
是否微信号码 bool IsWeChartNumber(object value)
验证输入字符串为电话号码 bool IsPhone(this string str)
验证是否是有效传真号码 bool IsFax(this string str)
验证手机号是否合法 号段为13,14,15,16,17,18,19  0,86开头将自动识别 bool IsMobile(this string str)
验证是否是有效邮箱地址 bool IsEmail(this string str)
验证是否是有效QQ邮箱地址  bool IsQqEmail(this string str)
验证是否只含有汉字 bool IsOnlyChinese(this string strLn)
是否有多余的字符 防止SQL注入 bool IsBadString(this string str)
是否由数字、26个英文字母或者下划线組成的字串 bool IsNzx(this string str)
由数字、26个英文字母、汉字組成的字串 bool IsSzzmChinese(this string str) 
是否由数字、26个英文字母組成的字串 bool IsSzzm(this string str)
验证输入字符串为邮政编码 bool IsPostCode(this string str)
检查对象的输入长度 bool CheckLength(this string str, int length)


xml文件操作

往项目里包含文件 void WriteCsproj(string csprojPath, string filePath, bool isContent)
 

HttpUtils

发起POST同步请求 string HttpPost(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary<string, string> headers = null)    
发起POST异步请求 Task<string> HttpPostAsync(string url, string postData = null, string contentType = null, int timeOut = 30, Dictionary<string, string> headers = null)    
发起GET同步请求 string HttpGet(string url, Dictionary<string, string> headers = null)    
发起GET异步请求 Task<string> HttpGetAsync(string url, Dictionary<string, string> headers = null)
     




Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on RuoVea.ExUtil:

Package Downloads
RuoVea.ExFilter

注入 进行全局的异常日志收集、执行操作日志、参数验证 services.ExceptionSetup();// 注入 全局错误日志处 services.ExceptionSetup(ExceptionLog actionOptions);// 注入 全局错误日志处 services.ExceptionSetup(builder.Configuration.GetSection("AopOption:ExceptionLog"));// 注入 全局错误日志处 services.RequestActionSetup();// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(RequestLog actionOptions);// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(builder.Configuration.GetSection("AopOption:RequestLog"));// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.ResourceSetup();//对资源型信息进行过滤 services.ResultSetup();//对结果进行统一 services.ApISafeSetup(AppSign actionOptions);//接口安全校验 services.ApISafeSetup(builder.Configuration.GetSection("AopOption:AppSign"));//接口安全校验 services.ApISignSetup(AppSign actionOptions);//签名验证 ( appKey + signKey + timeStamp + data ); services.ApISignSetup(builder.Configuration.GetSection("AopOption:AppSign"));//签名验证 ( appKey + signKey + timeStamp + data ); services.AddValidateSetup();//模型校验 services.AddUiFilesZipSetup();//将前端UI压缩文件进行解压 不进行接口安全校验 -> NonAplSafeAttribute 不签名验证 -> NonAplSignAttribute 不进行全局的异常日志收集 -> NonExceptionAttribute 不对资源型信息进行过滤 -> NonResourceAttribute 不对结果进行统一 -> NonRestfulResultAttribute

RuoVea.ExSugar

Sqlsugar扩展 快速注入 使用方式: service.AddSqlsugar();

RuoVea.ExWeb

CorsUrls、IPLimit、SafeIps、Jwt 配置

RuoVea.ExGlobal

web 注入 全局错误日志、操作日志记录

PBKDF2.Key

PBKDF2(Password-Based Key Derivation Function)是一个用来导出密钥的函数,常用于生成加密的密码。它的基本原理是通过一个伪随机函数(例如HMAC函数),把明文和一个盐值作为输入参数,然后重复进行运算,并最终产生密钥。如果重复的次数足够大,破解的成本就会变得很高。而盐值的添加也会增加“彩虹表”攻击的难度。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.0.1 199 12/1/2023
8.0.0 108 11/24/2023
6.0.13.2 207 12/1/2023
6.0.13.1 622 11/23/2023
6.0.13 1,225 3/11/2023
6.0.12 1,163 9/30/2022
6.0.11 372 9/30/2022
6.0.10 347 9/30/2022
6.0.9 365 9/30/2022
6.0.7 344 9/30/2022
6.0.6 359 9/30/2022
6.0.5 962 9/14/2022
6.0.4 393 9/8/2022
6.0.3 374 8/24/2022
6.0.2 388 8/16/2022
6.0.0 3,702 2/9/2022
5.0.19 3,591 11/25/2021
5.0.18 417 11/22/2021
5.0.17 268 11/22/2021
5.0.16 649 11/19/2021
5.0.15 825 11/5/2021
5.0.13 765 11/3/2021
5.0.12 280 11/2/2021
5.0.11 335 11/1/2021
5.0.10 453 10/12/2021
5.0.9 303 10/6/2021
5.0.8 302 10/5/2021
5.0.7 1,052 9/30/2021
5.0.6 445 9/29/2021
5.0.5 292 9/29/2021
5.0.4 363 9/29/2021
5.0.3 346 9/28/2021
5.0.2 350 9/28/2021
5.0.1 398 9/27/2021
5.0.0 400 9/27/2021
2.1.1.1 98 11/24/2023