This commit is contained in:
xuejiaming 2021-09-22 20:48:03 +08:00
parent 8f665394ff
commit 3aec0399d0
2 changed files with 13 additions and 7 deletions

View File

@ -1,8 +1,8 @@
:start
::定义版本
set EFCORE2=2.2.0.20
set EFCORE3=3.2.0.20
set EFCORE5=5.2.0.20
set EFCORE2=2.2.0.21
set EFCORE3=3.2.0.21
set EFCORE5=5.2.0.21
::删除所有bin与obj下的文件
@echo off

View File

@ -109,7 +109,8 @@ namespace ShardingCore.Sharding.Enumerators
#if EFCORE2
public void Dispose()
{
_asyncSource.Dispose();
_asyncSource?.Dispose();
_syncSource?.Dispose();
}
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
@ -134,8 +135,13 @@ namespace ShardingCore.Sharding.Enumerators
{
if (tryGetCurrentError)
return default;
if (_asyncSource!= null)
return _asyncSource.Current;
}catch(Exception e)
if (_syncSource != null)
return _syncSource.Current;
return default;
}
catch (Exception e)
{
tryGetCurrentError = true;
return default;