Browse Source

Resolved #9897: Marked EntityCreatingEventData, EntityUpdatingEventData, EntityDeletingEventData and EntityChangingEventData as obsolete.

pull/9909/head
Halil İbrahim Kalkan 5 years ago
parent
commit
61cac95775
  1. 6
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs
  2. 1
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs
  3. 1
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs
  4. 1
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs
  5. 1
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs
  6. 2
      framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs

6
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs

@ -46,7 +46,9 @@ namespace Volo.Abp.Domain.Entities.Events
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityCreatingEventData<>),
#pragma warning restore 618
entity,
entity
);
@ -91,7 +93,9 @@ namespace Volo.Abp.Domain.Entities.Events
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityUpdatingEventData<>),
#pragma warning restore 618
entity,
entity
);
@ -125,7 +129,9 @@ namespace Volo.Abp.Domain.Entities.Events
{
TriggerEventWithEntity(
LocalEventBus,
#pragma warning disable 618
typeof(EntityDeletingEventData<>),
#pragma warning restore 618
entity,
entity
);

1
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs

@ -8,6 +8,7 @@ namespace Volo.Abp.Domain.Entities.Events
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityChangedEventData. Please use EntityChangedEventData instead.")]
public class EntityChangingEventData<TEntity> : EntityEventData<TEntity>
{
/// <summary>

1
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs

@ -7,6 +7,7 @@ namespace Volo.Abp.Domain.Entities.Events
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityCreatedEventData. Please use EntityCreatedEventData instead.")]
public class EntityCreatingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>

1
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs

@ -7,6 +7,7 @@ namespace Volo.Abp.Domain.Entities.Events
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityDeleteEventData. Please use EntityDeleteEventData instead.")]
public class EntityDeletingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>

1
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs

@ -7,6 +7,7 @@ namespace Volo.Abp.Domain.Entities.Events
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
[Serializable]
[Obsolete("This event is no longer needed and identical to EntityUpdatedEventData. Please use EntityUpdatedEventData instead.")]
public class EntityUpdatingEventData<TEntity> : EntityChangingEventData<TEntity>
{
/// <summary>

2
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/EntityChangeEvents_Tests.cs

@ -38,7 +38,9 @@ namespace Volo.Abp.TestApp.Testing
using (var uow = GetRequiredService<IUnitOfWorkManager>().Begin())
{
#pragma warning disable 618
LocalEventBus.Subscribe<EntityCreatingEventData<Person>>(data =>
#pragma warning restore 618
{
creatingEventTriggered.ShouldBeFalse();
createdEventTriggered.ShouldBeFalse();

Loading…
Cancel
Save