Class Derivation<TReq, TResp, TResult>
Fluent API for creating request derivations with types on the left side.
public static class Derivation<TReq, TResp, TResult>
Type Parameters
TReqThe source operation's request type.
TRespThe source operation's response type.
TResultThe 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
operationNamestringThe name of the operation to derive from.
Returns
- TypedSingleSourceDerivationBuilder<TReq, TResp, TResult>