Skip to content

Commit

Permalink
更新包版本并添加条件编译指令
Browse files Browse the repository at this point in the history
更新了 `NewLife.IoT.csproj` 文件中的 `NewLife.Core` 包版本,从 `10.10.2024.0701` 更新为 `10.10.2024.710-beta0951`。
在 `TypeHelper.cs` 文件中,添加了一个条件编译指令 `#if NET40`,用于在 .NET Framework 4.0 环境下定义一个新的方法 `IsNumericType`,该方法用于判断指定类型是否为数字类型。
  • Loading branch information
猿人易 committed Jul 11, 2024
1 parent 3f0ac22 commit 5a4ed74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NewLife.IoT/NewLife.IoT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0701" />
<PackageReference Include="NewLife.Core" Version="10.10.2024.710-beta0951" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
<PackageReference Include="NewLife.Core" Version="10.10.2024.0701-net40" />
Expand Down
2 changes: 2 additions & 0 deletions NewLife.IoT/TypeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public static IDictionary<String, String> GetIoTTypes(Boolean full = false)
}
}

#if NET40
/// <summary>
/// 指定类型是否数字类型。包括整数、小数、字节、字符等
/// </summary>
Expand All @@ -262,4 +263,5 @@ public static Boolean IsNumber(this Type type)
_ => false,
};
}
#endif
}

0 comments on commit 5a4ed74

Please sign in to comment.