This commit is contained in:
parent
8f665394ff
commit
3aec0399d0
|
@ -1,8 +1,8 @@
|
||||||
:start
|
:start
|
||||||
::定义版本
|
::定义版本
|
||||||
set EFCORE2=2.2.0.20
|
set EFCORE2=2.2.0.21
|
||||||
set EFCORE3=3.2.0.20
|
set EFCORE3=3.2.0.21
|
||||||
set EFCORE5=5.2.0.20
|
set EFCORE5=5.2.0.21
|
||||||
|
|
||||||
::删除所有bin与obj下的文件
|
::删除所有bin与obj下的文件
|
||||||
@echo off
|
@echo off
|
||||||
|
|
|
@ -109,7 +109,8 @@ namespace ShardingCore.Sharding.Enumerators
|
||||||
#if EFCORE2
|
#if EFCORE2
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_asyncSource.Dispose();
|
_asyncSource?.Dispose();
|
||||||
|
_syncSource?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
|
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
|
||||||
|
@ -134,8 +135,13 @@ namespace ShardingCore.Sharding.Enumerators
|
||||||
{
|
{
|
||||||
if (tryGetCurrentError)
|
if (tryGetCurrentError)
|
||||||
return default;
|
return default;
|
||||||
|
if (_asyncSource!= null)
|
||||||
return _asyncSource.Current;
|
return _asyncSource.Current;
|
||||||
}catch(Exception e)
|
if (_syncSource != null)
|
||||||
|
return _syncSource.Current;
|
||||||
|
return default;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
tryGetCurrentError = true;
|
tryGetCurrentError = true;
|
||||||
return default;
|
return default;
|
||||||
|
|
Loading…
Reference in New Issue