Make DatabaseSchema notifications stateful

This commit is contained in:
Mole
2021-04-16 14:51:56 +02:00
parent 44c59db649
commit d31a9859b2
3 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
namespace Umbraco.Cms.Core.Events
{
public class CancelableNotification : ICancelableNotification
public class CancelableNotification : StatefulNotification, ICancelableNotification
{
public bool Cancel { get; set; }
public void CancelOperation()

View File

@@ -2,7 +2,7 @@ using Umbraco.Cms.Core.Events;
namespace Umbraco.Cms.Infrastructure.Migrations.Events
{
internal class DatabaseSchemaCreatedNotification : INotification
internal class DatabaseSchemaCreatedNotification : StatefulNotification
{
}

View File

@@ -146,7 +146,8 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Install
CreateTable(false, table, dataCreation);
}
FireAfterCreation(new DatabaseSchemaCreatedNotification());
DatabaseSchemaCreatedNotification createdNotification = new DatabaseSchemaCreatedNotification().WithStateFrom(creatingNotification);
FireAfterCreation(createdNotification);
}
/// <summary>