View on GitHub
Clean Architecture Toolkit for .NET
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications.
It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design.

|   HOME   |   MODULE OVERVIEW   |   DEMO   |   CAT.FLUENTWORKFLOWS   |

Code Reference

» Cat.FluentWorkflows.Queries Assembly » Cat.FluentWorkflows.Queries Namespace » CatWorkflowBuilderExtensions Class

CatWorkflowBuilderExtensions.ProcessQuery<TWorkflowState,TQuery,TResult>(this ICatWorkflowBuilder<TWorkflowState>) Method

Adds a step that processes a query. The query is created with its parameterless constructor. Fill it with Input, like .Input(s => s.Id, step => step.Query.Id). Read the result with Output, like .Output(step => step.Response!.Value, s => s.Todo). A failed query ends the workflow with BreakCascade and the errors of the query.

public static Cat.FluentWorkflows.Abstractions.ICatStepBuilder<TWorkflowState,Cat.FluentWorkflows.Queries.Steps.CatProcessQueryStep<TQuery,TResult>> ProcessQuery<TWorkflowState,TQuery,TResult>(this Cat.FluentWorkflows.Abstractions.ICatWorkflowBuilder<TWorkflowState> builder)
    where TWorkflowState : class, Cat.FluentWorkflows.Abstractions.ICatWorkflowState<TWorkflowState>
    where TQuery : class, Cat.Queries.Abstractions.ICatQuery<TResult>;

Type parameters

TWorkflowState

The state of the workflow.

TQuery

The query to process.

TResult

The type of the data the query returns.

Parameters

builder Cat.FluentWorkflows.Abstractions.ICatWorkflowBuilder<TWorkflowState>

The builder to add the step to.

Returns

Cat.FluentWorkflows.Abstractions.ICatStepBuilder<TWorkflowState,Cat.FluentWorkflows.Queries.Steps.CatProcessQueryStep<TQuery,TResult>>
A builder to connect the step to the state with Input and Output.