优化了Workbench上的操作。

This commit is contained in:
fengjiayi
2025-05-30 23:31:31 +08:00
parent f0eb11c914
commit a19733eff5
35 changed files with 807 additions and 225 deletions

View File

@@ -200,6 +200,10 @@ namespace Serein.Library.Utils
/// <returns></returns>
public static T ValueParse<T>(object value) where T : struct, IComparable<T>
{
if (value is T data)
{
return data;
}
string valueStr = value.ToString();
return valueStr.ToValueData<T>() ;
}
@@ -228,7 +232,8 @@ namespace Serein.Library.Utils
{
if (string.IsNullOrEmpty(valueStr))
{
return default(T);
throw new NullReferenceException();
//return default(T);
}
var type = typeof(T);
object result;