Browse Source
Merge pull request #260 from colinin/4.3
upgrade cap to 5.0.2
pull/274/head
cKey
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
6 deletions
-
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
-
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPMessageExtensions.cs
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<Import Project="..\..\..\common.props" /> |
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
|
<TargetFramework>netstandard2.0</TargetFramework> |
|
|
|
<TargetFramework>netstandard2.1</TargetFramework> |
|
|
|
<RootNamespace /> |
|
|
|
<Description>Cap分布式事件总线</Description> |
|
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile> |
|
|
|
@ -11,7 +11,7 @@ |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="DotNetCore.CAP" Version="3.1.2" /> |
|
|
|
<PackageReference Include="DotNetCore.CAP" Version="5.0.2" /> |
|
|
|
<PackageReference Include="Volo.Abp.BackgroundWorkers" Version="4.3.0" /> |
|
|
|
<PackageReference Include="Volo.Abp.EventBus" Version="4.3.0" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
@ -16,16 +16,17 @@ namespace LINGYUN.Abp.EventBus.CAP |
|
|
|
/// <returns></returns>
|
|
|
|
public static bool TryGetTenantId( |
|
|
|
this Message message, |
|
|
|
out Guid tenantId) |
|
|
|
out Guid? tenantId) |
|
|
|
{ |
|
|
|
if (message.Headers.TryGetValue(AbpCAPHeaders.TenantId, out string tenantStr)) |
|
|
|
{ |
|
|
|
if (Guid.TryParse(tenantStr, out tenantId)) |
|
|
|
if (Guid.TryParse(tenantStr, out Guid id)) |
|
|
|
{ |
|
|
|
tenantId = id; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
tenantId = null; |
|
|
|
return false; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
@ -36,7 +37,7 @@ namespace LINGYUN.Abp.EventBus.CAP |
|
|
|
public static Guid? GetTenantIdOrNull( |
|
|
|
this Message message) |
|
|
|
{ |
|
|
|
if (message.TryGetTenantId(out Guid tenantId)) |
|
|
|
if (message.TryGetTenantId(out Guid? tenantId)) |
|
|
|
{ |
|
|
|
return tenantId; |
|
|
|
} |
|
|
|
|