Browse Source

Merge branch 'dev' into cotur/cms-kit/comments

pull/7757/head
Ahmet 6 years ago
parent
commit
7f1f45a34e
  1. 7
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor
  2. 43
      framework/src/Volo.Abp.RabbitMQ/Volo/Abp/RabbitMQ/RabbitMqMessageConsumer.cs

7
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor

@ -1,11 +1,14 @@
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Microsoft.Extensions.Localization
@using Volo.Abp.Users
@using Volo.Abp.MultiTenancy
@using global::Localization.Resources.AbpUi
@inject ICurrentUser CurrentUser
@inject ICurrentTenant CurrentTenant
@inject IJSRuntime JsRuntime
@inject NavigationManager Navigation
@inject SignOutSessionStateManager SignOutManager
@inject IStringLocalizer<AbpUiResource> UiLocalizer
<AuthorizeView>
<Authorized>
<Dropdown>
@ -28,12 +31,12 @@
}
}
<DropdownDivider />
<DropdownItem Clicked="BeginSignOut">Logout</DropdownItem>
<DropdownItem Clicked="BeginSignOut">@UiLocalizer["Logout"]</DropdownItem>
</DropdownMenu>
</Dropdown>
</Authorized>
<NotAuthorized>
<a class="nav-link" href="authentication/login">Log in</a>
<a class="nav-link" href="authentication/login">@UiLocalizer["Login"]</a>
</NotAuthorized>
</AuthorizeView>
@code{

43
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);
}
}
}

Loading…
Cancel
Save