Ejemplo n.º 1
0
        protected async Task On(WebhookCreated @event, EnvelopeHeaders headers)
        {
            await EnsureWebooksLoadedAsync();

            await Collection.CreateAsync(@event, headers, w =>
            {
                SimpleMapper.Map(@event, w);

                w.SchemaIds = w.Schemas.Select(x => x.SchemaId).ToList();

                inMemoryWebhooks.GetOrAddNew(w.AppId).RemoveAll(x => x.Id == w.Id);
                inMemoryWebhooks.GetOrAddNew(w.AppId).Add(w);
            });
        }
Ejemplo n.º 2
0
 protected void On(WebhookCreated @event)
 {
     isCreated = true;
 }