优化了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

@@ -216,8 +216,8 @@ namespace Serein.Library
MethodName = this.MethodName,
MethodAnotherName = this.MethodAnotherName,
NodeType = this.MethodDynamicType.ToString(),
ParameterDetailsInfos = this.ParameterDetailss.Select(p => p.ToInfo()).ToArray(),
ReturnTypeFullName = this.ReturnType.FullName,
ParameterDetailsInfos = this.ParameterDetailss?.Select(p => p.ToInfo()).ToArray(),
ReturnTypeFullName = this.ReturnType?.FullName,
IsParamsArgIndex = this.ParamsArgIndex,
};
}

View File

@@ -174,9 +174,9 @@ namespace Serein.Library
IsParams = this.IsParams,
DataTypeFullName = this.DataType.FullName,
Name = this.Name,
ExplicitTypeFullName = this.ExplicitType.FullName,
ExplicitTypeFullName = this.ExplicitType?.FullName,
InputType = this.InputType.ToString(),
Items = this.Items.Select(it => it).ToArray(),
Items = this.Items?.Select(it => it).ToArray(),
};
}

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;