From 7fcb5121aeda73c72fc78cceb5f012f73bfbcc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 19 Feb 2021 18:15:10 +0300 Subject: [PATCH 1/3] Should check the result of QueueBindCommands.TryPeek. --- .../Abp/RabbitMQ/RabbitMqMessageConsumer.cs | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs index f757efab64..894f68d097 100644 --- a/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs +++ b/framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs @@ -90,29 +90,30 @@ namespace Volo.Abp.RabbitMQ lock (ChannelSendSyncLock) { - QueueBindCommands.TryPeek(out var command); - - switch (command.Type) + if (QueueBindCommands.TryPeek(out var command)) { - case QueueBindType.Bind: - Channel.QueueBind( - queue: Queue.QueueName, - exchange: Exchange.ExchangeName, - routingKey: command.RoutingKey - ); - break; - case QueueBindType.Unbind: - Channel.QueueUnbind( - queue: Queue.QueueName, - exchange: Exchange.ExchangeName, - routingKey: command.RoutingKey - ); - break; - default: - throw new AbpException($"Unknown {nameof(QueueBindType)}: {command.Type}"); + switch (command.Type) + { + case QueueBindType.Bind: + Channel.QueueBind( + queue: Queue.QueueName, + exchange: Exchange.ExchangeName, + routingKey: command.RoutingKey + ); + break; + case QueueBindType.Unbind: + Channel.QueueUnbind( + queue: Queue.QueueName, + exchange: Exchange.ExchangeName, + routingKey: command.RoutingKey + ); + break; + default: + throw new AbpException($"Unknown {nameof(QueueBindType)}: {command.Type}"); + } + + QueueBindCommands.TryDequeue(out command); } - - QueueBindCommands.TryDequeue(out command); } } } From 909e5c0db815bb485a08d628f992bbb6bc309279 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 22 Feb 2021 11:14:53 +0800 Subject: [PATCH 2/3] Localize login&logout text --- .../Themes/Basic/LoginDisplay.razor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 18ebfbd4ba..312c741032 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,11 +1,16 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication +@using Microsoft.Extensions.Localization +@using Volo.Abp.Localization @using Volo.Abp.Users @using Volo.Abp.MultiTenancy +@using Volo.Abp.Validation.Localization +@using global::Localization.Resources.AbpUi @inject ICurrentUser CurrentUser @inject ICurrentTenant CurrentTenant @inject IJSRuntime JsRuntime @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager +@inject IStringLocalizer UiLocalizer @@ -28,12 +33,12 @@ } } - Logout + @UiLocalizer["Logout"] - Log in + @UiLocalizer["Login"] @code{ From 8a3c70d13a9d339bce3e8e750de63afb96d2654e Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 22 Feb 2021 11:17:19 +0800 Subject: [PATCH 3/3] Remove unnecessary using --- .../Themes/Basic/LoginDisplay.razor | 2 -- 1 file changed, 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 312c741032..eebfb501a5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,9 +1,7 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication @using Microsoft.Extensions.Localization -@using Volo.Abp.Localization @using Volo.Abp.Users @using Volo.Abp.MultiTenancy -@using Volo.Abp.Validation.Localization @using global::Localization.Resources.AbpUi @inject ICurrentUser CurrentUser @inject ICurrentTenant CurrentTenant