lazy延时属性父子关系的1v多类型判断修正,解决 int? != int 的 bug

This commit is contained in:
28810
2019-01-26 10:32:53 +08:00
parent 8448d648cf
commit b9a9106f86
3 changed files with 6 additions and 4 deletions

View File

@ -27,6 +27,7 @@ public static class FreeSqlGlobalExtensions {
});
public static bool IsNumberType(this Type that) => that == null ? false : dicIsNumberType.Value.ContainsKey(that);
public static bool IsNullableType(this Type that) => that?.FullName.StartsWith("System.Nullable`1[") == true;
internal static Type NullableTypeOrThis(this Type that) => that?.IsNullableType() == true ? that.GenericTypeArguments.First() : that;
/// <summary>
/// 测量两个经纬度的距离,返回单位:米