Пример #1
0
 private void WebhookCreatedEventHandler(object sender, CreateResourceEventArgs <Webhook> eventArgs)
 {
     this.eventService.FireEventAsync(this, new ErtisAuthEvent
     {
         EventType    = ErtisAuthEventType.WebhookCreated,
         UtilizerId   = eventArgs.Utilizer.Id,
         Document     = eventArgs.Resource,
         MembershipId = eventArgs.Utilizer.MembershipId
     });
 }
Пример #2
0
        private async Task OnMembershipCreatedAsync(CreateResourceEventArgs <Membership> e)
        {
            var scheduler = await this.schedulerFactory.GetScheduler();

            await this.ScheduleJobAsync(scheduler, e.Resource);
        }
Пример #3
0
 private void OnMembershipCreated(object sender, CreateResourceEventArgs <Membership> e) =>
 this.OnMembershipCreatedAsync(e).ConfigureAwait(false).GetAwaiter().GetResult();