Skip to content

Commit

Permalink
v1.6.3 - 增加 ExistsRegister/RemoveRegister 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Sep 16, 2022
1 parent 90d9557 commit 314b986
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/FreeSql.Cloud/FreeSql.Cloud.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard20;net40</TargetFrameworks>
<Version>1.6.2</Version>
<Version>1.6.3</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>提供跨数据库访问,分布式事务TCC、SAGA解决方案,支持 .NET Core 2.1+, .NET Framework 4.0+.</Description>
Expand Down
2 changes: 2 additions & 0 deletions src/FreeSql.Cloud/FreeSqlCloud.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ internal IFreeSql GetBySnapshot(TDBKey dbkey)
return _ib.Get(dbkey);
}

public bool RemoveRegister(TDBKey dbkey) => _ib.TryRemove(dbkey, false);
public bool ExistsRegister(TDBKey dbkey) => _ib.Exists(dbkey);
public FreeSqlCloud<TDBKey> Register(TDBKey dbkey, Func<IFreeSql> create)
{
if (_ib.TryRegister(dbkey, create))
Expand Down

0 comments on commit 314b986

Please sign in to comment.