!72 GetReaderByToken 传入 cancellationToken,支持取消信号

Merge pull request !72 from 杜子腾/master
This commit is contained in:
阿妮亚 2025-01-15 06:07:31 +00:00 committed by Gitee
commit bc6380418a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 15 additions and 2 deletions

View File

@ -31,11 +31,11 @@ namespace SqlSugar
#region abstract Methods
public virtual bool SupportReadToken { get; set; }
public virtual bool SupportReadToken { get; set; } = true;
public virtual Task<bool> GetReaderByToken(IDataReader dataReader, CancellationToken cancellationToken)
{
return ((DbDataReader)dataReader).ReadAsync();
return ((DbDataReader)dataReader).ReadAsync(cancellationToken);
}
public virtual void ChangeJsonType(SugarParameter paramter)
{

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>C:\Users\Administrator\Desktop\编译打包</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>