Merge pull request #9239 from xyfy/patch-4

Add an `remove` extentions in AutoEntityDistributedEventSelectorListExtensions.cs  adjust the `Add<TEntity>`
pull/9453/head
maliming 4 years ago committed by GitHub
commit bf96281ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,6 +50,19 @@ namespace Volo.Abp.Domain.Entities.Events.Distributed
);
}
/// <summary>
/// Remove a specific entity type and the types derived from that entity type.
/// </summary>
/// <typeparam name="TEntity">Type of the entity</typeparam>
public static void Remove<TEntity>([NotNull] this IAutoEntityDistributedEventSelectorList selectors)
where TEntity : IEntity
{
Check.NotNull(selectors, nameof(selectors));
var selectorName = "Entity:" + typeof(TEntity).FullName;
selectors.RemoveAll(s => s.Name == selectorName);
}
/// <summary>
/// Adds all entity types.
/// </summary>

Loading…
Cancel
Save