public void ContentPartDetached(ContentPartDetachedContext context)
        {
            _logger.LogInformation("User wants to remove {ContentPart} from {ContentType}.",
                                   context.ContentPartName, context.ContentTypeName);

            if (context.ContentPartName == nameof(GraphSyncPart))
            {
                // if the graph sync part is removed that means we should remove all items of that type from the graphs
                //todo: user gets a confirmation dialog, but would be better if we double checked, informing them of the consequences!

                _logger.LogInformation("Removing all items of {ContentType} as it no longer has a GraphSyncPart.",
                                       context.ContentTypeName);

                _contentTypeOrchestrator.DeleteItemsOfType(context.ContentTypeName).GetAwaiter().GetResult();
                return;
            }

            _contentTypeOrchestrator.RemovePartFromItemsOfType(context.ContentTypeName, context.ContentPartName)
            .GetAwaiter().GetResult();
        }
 public void ContentPartDetached(ContentPartDetachedContext context)
 {
 }
 public void ContentPartDetached(ContentPartDetachedContext context)
 {
     EnsureIdentity(context);
 }
 public void ContentPartDetached(ContentPartDetachedContext context) {
 }
 public void ContentPartDetached(ContentPartDetachedContext context) {
     RecordContentTypePartAuditTrailEvent(ContentTypeAuditTrailEventProvider.PartRemoved, context.ContentTypeName, context.ContentPartName);
 }
Beispiel #6
0
 public void ContentPartDetached(ContentPartDetachedContext context)
 {
     RecordContentTypePartAuditTrailEvent(ContentTypeAuditTrailEventProvider.PartRemoved, context.ContentTypeName, context.ContentPartName);
 }