Exemple #1
0
        public async Task <ActionResult <PagedList <WorkflowDefinition> > > Handle(CancellationToken cancellationToken = default)
        {
            var specification = Specification <WebhookDefinition> .Identity;
            var items         = await _webhookDefinitionStore.FindManyAsync(specification, cancellationToken : cancellationToken);

            return(Json(items, _serializerSettingsProvider.GetSettings()));
        }
Exemple #2
0
        public async ValueTask <IEnumerable <ActivityType> > GetActivityTypesAsync(CancellationToken cancellationToken = default)
        {
            var specification = Specification <WebhookDefinition> .Identity;
            var definitions   = await _webhookDefinitionStore.FindManyAsync(specification, cancellationToken : cancellationToken);

            var activityTypes = new List <ActivityType>();

            foreach (var definition in definitions)
            {
                var activity = CreateWebhookActivityType(definition);
                activityTypes.Add(activity);
            }

            return(activityTypes);
        }
 public Task <IEnumerable <WebhookDefinition> > FindManyAsync(ISpecification <WebhookDefinition> specification, IOrderBy <WebhookDefinition>?orderBy = null, IPaging?paging = null, CancellationToken cancellationToken = default)
 => _store.FindManyAsync(specification, orderBy, paging, cancellationToken);