|
|
@ -19,6 +19,8 @@ using Squidex.Infrastructure.EventSourcing; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
using Squidex.Infrastructure.Reflection; |
|
|
using Squidex.Text; |
|
|
using Squidex.Text; |
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable SA1013 // Closing braces should be spaced correctly
|
|
|
|
|
|
|
|
|
namespace Squidex.Domain.Apps.Entities.Contents |
|
|
namespace Squidex.Domain.Apps.Entities.Contents |
|
|
{ |
|
|
{ |
|
|
public sealed class ContentChangedTriggerHandler : IRuleTriggerHandler |
|
|
public sealed class ContentChangedTriggerHandler : IRuleTriggerHandler |
|
|
@ -99,13 +101,13 @@ namespace Squidex.Domain.Apps.Entities.Contents |
|
|
case ContentDeleted: |
|
|
case ContentDeleted: |
|
|
result.Type = EnrichedContentEventType.Deleted; |
|
|
result.Type = EnrichedContentEventType.Deleted; |
|
|
break; |
|
|
break; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Published: |
|
|
case ContentStatusChanged { Change: StatusChange.Published }: |
|
|
result.Type = EnrichedContentEventType.Published; |
|
|
result.Type = EnrichedContentEventType.Published; |
|
|
break; |
|
|
break; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Unpublished: |
|
|
case ContentStatusChanged { Change: StatusChange.Unpublished }: |
|
|
result.Type = EnrichedContentEventType.Unpublished; |
|
|
result.Type = EnrichedContentEventType.Unpublished; |
|
|
break; |
|
|
break; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Change: |
|
|
case ContentStatusChanged { Change: StatusChange.Change }: |
|
|
result.Type = EnrichedContentEventType.StatusChanged; |
|
|
result.Type = EnrichedContentEventType.StatusChanged; |
|
|
break; |
|
|
break; |
|
|
case ContentUpdated: |
|
|
case ContentUpdated: |
|
|
@ -142,11 +144,11 @@ namespace Squidex.Domain.Apps.Entities.Contents |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Created"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Created"; |
|
|
case ContentDeleted e: |
|
|
case ContentDeleted e: |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Deleted"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Deleted"; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Published: |
|
|
case ContentStatusChanged { Change: StatusChange.Published } e: |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Published"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Published"; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Unpublished: |
|
|
case ContentStatusChanged { Change: StatusChange.Unpublished } e: |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Unpublished"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Unpublished"; |
|
|
case ContentStatusChanged e when e.Change == StatusChange.Change: |
|
|
case ContentStatusChanged { Change: StatusChange.Change } e: |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}StatusChanged"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}StatusChanged"; |
|
|
case ContentUpdated e: |
|
|
case ContentUpdated e: |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Updated"; |
|
|
return $"{e.SchemaId.Name.ToPascalCase()}Updated"; |
|
|
|