Пример #1
0
        public void Delete(DeleteWebhook command)
        {
            Guard.NotNull(command, nameof(command));

            VerifyCreatedAndNotDeleted();

            RaiseEvent(SimpleMapper.Map(command, new WebhookDeleted()));
        }
Пример #2
0
        public SchemaDomainObject DeleteWebhook(DeleteWebhook command)
        {
            Guard.NotNull(command, nameof(command));

            VerifyCreatedAndNotDeleted();
            VerifyWebhookExists(command.Id);

            RaiseEvent(SimpleMapper.Map(command, new WebhookDeleted()));

            return(this);
        }
 protected Task On(DeleteWebhook command, CommandContext context)
 {
     return(handler.UpdateAsync <SchemaDomainObject>(context, s => s.DeleteWebhook(command)));
 }
 protected Task On(DeleteWebhook command, CommandContext context)
 {
     return(handler.UpdateAsync <WebhookDomainObject>(context, c => c.Delete(command)));
 }