Table of Contents

Class Derivation<TReq, TResp, TResult>

Namespace
Microsoft.Accordant
Assembly
Accordant.Operations.dll

Fluent API for creating request derivations with types on the left side.

public static class Derivation<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
Derivation<TReq, TResp, TResult>
Inherited Members

Examples

// Types on the left (like a type declaration)
Derivation<Todo, ApiResult<Todo>, (string, string)>.From("CreateTodo")
    .When((req, resp) => resp.IsSuccess)
    .As((req, resp) => (resp.Data.UserId, resp.Data.TodoId))

Methods

From(string)

Start defining a derivation from a single source operation.

public static TypedSingleSourceDerivationBuilder<TReq, TResp, TResult> From(string operationName)

Parameters

operationName string

The name of the operation to derive from.

Returns

TypedSingleSourceDerivationBuilder<TReq, TResp, TResult>