From 78f972c41fe3ffae497e23499c77361ff8c33539 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 8 Apr 2025 08:20:16 +0800 Subject: [PATCH] Rename IgnoreEventSelectors to IgnoredEventSelectors. --- .../framework/infrastructure/event-bus/distributed/index.md | 4 ++-- .../Events/Distributed/AbpDistributedEntityEventOptions.cs | 4 ++-- .../Abp/Domain/Entities/Events/EntityChangeEventHelper.cs | 2 +- .../Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs | 4 ++-- .../src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs | 4 ++-- .../Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/framework/infrastructure/event-bus/distributed/index.md b/docs/en/framework/infrastructure/event-bus/distributed/index.md index a311893d65..d56215fa12 100644 --- a/docs/en/framework/infrastructure/event-bus/distributed/index.md +++ b/docs/en/framework/infrastructure/event-bus/distributed/index.md @@ -299,12 +299,12 @@ Configure(options => ); //Ignore for a single entity - options.IgnoreEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); }); ```` * The `type.Namespace.StartsWith("MyProject.")` provides flexibility to decide if the events should be published for the given entity type. Returns `true` to accept a `Type`. -* The `IgnoreEventSelectors` is used to ignore the events for the specified entity types. It is useful if you enabled for all entities and want to ignore for some entities. +* The `IgnoredEventSelectors` is used to ignore the events for the specified entity types. It is useful if you enabled for all entities and want to ignore for some entities. You can add more than one selector. If one of the selectors match for an entity type, then it is selected. diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs index 9168996bb5..8109d945bc 100644 --- a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs @@ -4,14 +4,14 @@ public class AbpDistributedEntityEventOptions { public IAutoEntityDistributedEventSelectorList AutoEventSelectors { get; } - public IAutoEntityDistributedEventSelectorList IgnoreEventSelectors { get; } + public IAutoEntityDistributedEventSelectorList IgnoredEventSelectors { get; } public EtoMappingDictionary EtoMappings { get; set; } public AbpDistributedEntityEventOptions() { AutoEventSelectors = new AutoEntityDistributedEventSelectorList(); - IgnoreEventSelectors = new AutoEntityDistributedEventSelectorList(); + IgnoredEventSelectors = new AutoEntityDistributedEventSelectorList(); EtoMappings = new EtoMappingDictionary(); } } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs index 980390195a..eb16a6910c 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs @@ -69,7 +69,7 @@ public class EntityChangeEventHelper : IEntityChangeEventHelper, ITransientDepen private bool ShouldPublishDistributedEventForEntity(object entity) { var entityType = ProxyHelper.UnProxy(entity).GetType(); - return !DistributedEntityEventOptions.IgnoreEventSelectors.IsMatch(entityType) && + return !DistributedEntityEventOptions.IgnoredEventSelectors.IsMatch(entityType) && DistributedEntityEventOptions.AutoEventSelectors.IsMatch(entityType); } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs index 04c65be897..6af11ebeca 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs @@ -32,8 +32,8 @@ public class AbpEntityFrameworkCoreModule : AbpModule Configure(options => { - options.IgnoreEventSelectors.Add(); - options.IgnoreEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); }); } } diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs index 95733d8c77..8e8ad345fc 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs @@ -52,8 +52,8 @@ public class AbpMongoDbModule : AbpModule Configure(options => { - options.IgnoreEventSelectors.Add(); - options.IgnoreEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); }); } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs index 64724312ea..36979fdd7c 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs @@ -34,7 +34,7 @@ public abstract class EntityChangeEvents_Tests : TestAppTestBase { services.Configure(options => { - options.IgnoreEventSelectors.Add(); + options.IgnoredEventSelectors.Add(); }); }