mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-08 00:46:34 +08:00
版本号更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<Title>SereinFow</Title>
|
||||
<Version>1.2.3</Version>
|
||||
<Version>1.2.4</Version>
|
||||
<Description>动态节点流、可视化编辑的基本依赖,支持导入C# DLL生成自定义节点,提供二次开发支持,适合用于可视化编程和流程设计</Description>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<RepositoryUrl>https://github.com/fhhyyp/serein-flow</RepositoryUrl>
|
||||
|
||||
@@ -12,8 +12,13 @@ namespace Serein.Library.Utils
|
||||
public static class TypeHelper
|
||||
{
|
||||
|
||||
|
||||
public static string GetFriendlyName(this Type type,bool isFullName = true)
|
||||
/// <summary>
|
||||
/// 对于泛型类型以友好格式显示其文本值
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="isFullName"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetFriendlyName(this Type type, bool isFullName = true)
|
||||
{
|
||||
if (type.IsGenericType)
|
||||
{
|
||||
@@ -45,11 +50,20 @@ namespace Serein.Library.Utils
|
||||
}
|
||||
else
|
||||
{
|
||||
return TypeMap.TryGetValue(type, out var alias) ? alias : isFullName ? type.FullName : type.Name; ;
|
||||
|
||||
if (isFullName)
|
||||
{
|
||||
return type.FullName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return type.Name;
|
||||
}
|
||||
//return TypeMap.TryGetValue(type, out var alias) ? alias : isFullName ? type.FullName : type.Name; ;
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Dictionary<Type, string> TypeMap = new Dictionary<Type, string>
|
||||
/*private static readonly Dictionary<Type, string> TypeMap = new Dictionary<Type, string>
|
||||
{
|
||||
[typeof(int)] = "int",
|
||||
[typeof(string)] = "string",
|
||||
@@ -67,7 +81,7 @@ namespace Serein.Library.Utils
|
||||
[typeof(ulong)] = "ulong",
|
||||
[typeof(ushort)] = "ushort",
|
||||
[typeof(sbyte)] = "sbyte",
|
||||
};
|
||||
};*/
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user