From 1bb882adb1e058ea4d6706ebf78ec4e23322c884 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Mon, 5 Jul 2021 10:01:13 +0800 Subject: [PATCH] Update document --- .../Customizing-Application-Modules-Extending-Entities.md | 6 +++--- .../Customizing-Application-Modules-Extending-Entities.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/Customizing-Application-Modules-Extending-Entities.md b/docs/en/Customizing-Application-Modules-Extending-Entities.md index bafcc01da2..c2bcd314d4 100644 --- a/docs/en/Customizing-Application-Modules-Extending-Entities.md +++ b/docs/en/Customizing-Application-Modules-Extending-Entities.md @@ -152,14 +152,14 @@ public class MyDistributedIdentityUserChangeEventHandler : * It implements multiple `IDistributedEventHandler` interfaces: **Created**, **Updated** and **Deleted**. Because, the distributed event bus system publishes events individually. There is no "Changed" event like the local event bus. * It subscribes to `EntityEto`, which is a generic event class that is **automatically published** for all type of entities by the ABP framework. This is why it checks the **entity type** (checking the entity type as string since we assume that there is no type safe reference to the `IdentityUser` entity). -Pre-built application modules do not define specialized event types yet (like `IdentityUserEto` - "ETO" means "Event Transfer Object"). This feature is on the road map and will be available in a short term ([follow this issue](https://github.com/abpframework/abp/issues/3033)). Once it is implemented, you will be able to subscribe to individual entity types. Example: +Pre-built application modules do not define specialized event types yet (like `UserEto` - "ETO" means "Event Transfer Object"). This feature is on the road map and will be available in a short term ([follow this issue](https://github.com/abpframework/abp/issues/3033)). Once it is implemented, you will be able to subscribe to individual entity types. Example: ````csharp public class MyDistributedIdentityUserCreatedEventHandler : - IDistributedEventHandler>, + IDistributedEventHandler>, ITransientDependency { - public async Task HandleEventAsync(EntityCreatedEto eventData) + public async Task HandleEventAsync(EntityCreatedEto eventData) { var userId = eventData.Entity.Id; var userName = eventData.Entity.UserName; diff --git a/docs/zh-Hans/Customizing-Application-Modules-Extending-Entities.md b/docs/zh-Hans/Customizing-Application-Modules-Extending-Entities.md index 6c895f71d2..8fd0921a83 100644 --- a/docs/zh-Hans/Customizing-Application-Modules-Extending-Entities.md +++ b/docs/zh-Hans/Customizing-Application-Modules-Extending-Entities.md @@ -151,14 +151,14 @@ public class MyDistributedIdentityUserChangeEventHandler : * 它实现了多个 `IDistributedEventHandler` 接口: **创建**,**更改**和**删除**,因为分布式事件总线单独发布事件,没有本地事件总线那样的"Changed"事件. * 它订阅了 `EntityEto`, 这是一个通用的事件类,ABP框架针对所有类型的实体**自动发布**. 这就是为什么它检查**实体类型**(因为我们没有假设有对 `IdentityUser` 实体有安全的类型引用,所以它是字符串类型的). -预构建应用模块没有定义专门的事件类型(如`IdentityUserEto` - "ETO" 意思是 "事件传输对象"). 此功能在路线图上([关注这个issue](https://github.com/abpframework/abp/issues/3033)),一旦完成后,你就可以订阅独立的实体类型: +预构建应用模块没有定义专门的事件类型(如`UserEto` - "ETO" 意思是 "事件传输对象"). 此功能在路线图上([关注这个issue](https://github.com/abpframework/abp/issues/3033)),一旦完成后,你就可以订阅独立的实体类型: ````csharp public class MyDistributedIdentityUserCreatedEventHandler : - IDistributedEventHandler>, + IDistributedEventHandler>, ITransientDependency { - public async Task HandleEventAsync(EntityCreatedEto eventData) + public async Task HandleEventAsync(EntityCreatedEto eventData) { var userId = eventData.Entity.Id; var userName = eventData.Entity.UserName;