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); }); }
protected void On(WebhookCreated @event) { isCreated = true; }