Table of Contents

Class TypedWhenBuilder<TReq, TResp, TResult>

Namespace
Microsoft.Accordant
Assembly
Accordant.Operations.dll

Builder for typed derivations with a When() filter applied.

public class TypedWhenBuilder<TReq, TResp, TResult>

Type Parameters

TReq

The source operation's request type.

TResp

The source operation's response type.

TResult

The derived request type (also used as template type).

Inheritance
TypedWhenBuilder<TReq, TResp, TResult>
Inherited Members

Methods

As(Func<TReq, TResp, TResult, TResult>)

Define the derivation that creates a single request with template support when the filter passes. Returns empty (skips derivation) when the filter returns false.

public RequestDerivation As(Func<TReq, TResp, TResult, TResult> factory)

Parameters

factory Func<TReq, TResp, TResult, TResult>

Function that creates the derived request from source request/response and template.

Returns

RequestDerivation

As(Func<TReq, TResp, TResult>)

Define the derivation that creates a single request when the filter passes. Returns empty (skips derivation) when the filter returns false.

public RequestDerivation As(Func<TReq, TResp, TResult> factory)

Parameters

factory Func<TReq, TResp, TResult>

Function that creates the derived request from source request/response.

Returns

RequestDerivation

AsVariants(Func<TReq, TResp, Dictionary<string, TResult>>)

Define a derivation that produces multiple request variants when the filter passes. Returns empty (skips derivation) when the filter returns false.

public RequestDerivation AsVariants(Func<TReq, TResp, Dictionary<string, TResult>> factory)

Parameters

factory Func<TReq, TResp, Dictionary<string, TResult>>

Function that creates a dictionary of variant label to derived request.

Returns

RequestDerivation

AsVariants(Func<TReq, TResp, TResult, Dictionary<string, TResult>>)

Define a derivation that produces multiple request variants with template support when the filter passes. Returns empty (skips derivation) when the filter returns false.

public RequestDerivation AsVariants(Func<TReq, TResp, TResult, Dictionary<string, TResult>> factory)

Parameters

factory Func<TReq, TResp, TResult, Dictionary<string, TResult>>

Function that creates a dictionary of variant label to derived request.

Returns

RequestDerivation