Skip to content

Commit 65aef11

Browse files
committed
添加启动参数校验,发布x.3.0.2版本
1 parent ab31ffd commit 65aef11

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

nuget-publish.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
:start
22
::定义版本
3-
set EFCORE2=2.3.0.01
4-
set EFCORE3=3.3.0.01
5-
set EFCORE5=5.3.0.01
3+
set EFCORE2=2.3.0.02
4+
set EFCORE3=3.3.0.02
5+
set EFCORE5=5.3.0.02
66

77
::删除所有bin与obj下的文件
88
@echo off

src/ShardingCore/DIExtensions/ShardingCoreConfigBuilder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public ShardingQueryBuilder<TShardingDbContext, TActualDbContext> Begin(Action<S
3535
{
3636
var shardingCoreBeginOptions = new ShardingCoreBeginOptions();
3737
shardingCoreBeginOptionsConfigure?.Invoke(shardingCoreBeginOptions);
38+
if (shardingCoreBeginOptions.ParallelQueryMaxThreadCount <= 0)
39+
throw new ArgumentException(
40+
$"{nameof(shardingCoreBeginOptions.ParallelQueryMaxThreadCount)} should greater than zero thread count");
41+
if (shardingCoreBeginOptions.ParallelQueryTimeOut.TotalMilliseconds <= 0)
42+
throw new ArgumentException(
43+
$"{nameof(shardingCoreBeginOptions.ParallelQueryTimeOut)} should greater than zero milliseconds");
3844
ShardingConfigOption.EnsureCreatedWithOutShardingTable = shardingCoreBeginOptions.EnsureCreatedWithOutShardingTable;
3945
ShardingConfigOption.AutoTrackEntity = shardingCoreBeginOptions.AutoTrackEntity;
4046
ShardingConfigOption.ParallelQueryMaxThreadCount = shardingCoreBeginOptions.ParallelQueryMaxThreadCount;

0 commit comments

Comments
 (0)