mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-30 21:56:37 +08:00
feat: 添加事件总线
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Cike.EventBus.EventHandlerAbstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Domain.Shared.Identity.Etos;
|
||||
|
||||
namespace Yi.RBAC.Domain.Identity.Event
|
||||
{
|
||||
public class LoginEventHandler : IDistributedEventHandler<LoginEventArgs>
|
||||
{
|
||||
public Task HandlerAsync(LoginEventArgs eventData)
|
||||
{
|
||||
Console.WriteLine(eventData.UserName+"登录系统");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
||||
<ProjectReference Include="..\..\..\module\Yi.Framework.EventBus\Yi.Framework.EventBus.csproj" />
|
||||
<ProjectReference Include="..\..\..\module\Yi.Framework.ThumbnailSharp\Yi.Framework.ThumbnailSharp.csproj" />
|
||||
<ProjectReference Include="..\Yi.RBAC.Domain.Shared\Yi.RBAC.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Data;
|
||||
using Yi.Framework.EventBus;
|
||||
using Yi.Framework.ThumbnailSharp;
|
||||
using Yi.RBAC.Domain.Shared;
|
||||
|
||||
@@ -17,7 +18,8 @@ namespace Yi.RBAC.Domain
|
||||
[DependsOn(
|
||||
typeof(YiRBACDomainSharedModule),
|
||||
typeof(YiFrameworkDataModule),
|
||||
typeof(YiFrameworkThumbnailSharpModule)
|
||||
typeof(YiFrameworkThumbnailSharpModule),
|
||||
typeof(YiFrameworkEventBusModule)
|
||||
)]
|
||||
public class YiRBACDomainModule : IStartupModule
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user