private async Task PatchCore(UpdateContent c, ContentOperation operation)
        {
            operation.MustHavePermission(Permissions.AppContentsUpdate);
            operation.MustHaveData(c.Data);

            if (!c.DoNotValidate)
            {
                await operation.ValidateInputPartialAsync(c.Data, c.OptimizeValidation, Snapshot.IsPublished());
            }

            if (!c.DoNotValidateWorkflow)
            {
                await operation.CheckUpdateAsync();
            }

            var newData = c.Data.MergeInto(Snapshot.Data);

            if (newData.Equals(Snapshot.Data))
            {
                return;
            }

            if (!c.DoNotScript)
            {
                newData = await operation.ExecuteUpdateScriptAsync(newData);
            }

            if (!c.DoNotValidate)
            {
                await operation.ValidateContentAsync(newData, c.OptimizeValidation, Snapshot.IsPublished());
            }

            Update(c, newData);
        }