Class TypedSingleSourceDerivationBuilder<TReq, TResp, TResult>
Builder for typed single-source derivations with all type parameters specified upfront. This enables cleaner When() and As() calls without type parameters.
public class TypedSingleSourceDerivationBuilder<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
-
TypedSingleSourceDerivationBuilder<TReq, TResp, TResult>
- Inherited Members
Methods
As(Func<TReq, TResp, TResult, TResult>)
Define the derivation that creates a single request with template support (no filter).
public RequestDerivation As(Func<TReq, TResp, TResult, TResult> factory)
Parameters
factoryFunc<TReq, TResp, TResult, TResult>Function that creates the derived request from source request/response and template.
Returns
As(Func<TReq, TResp, TResult>)
Define the derivation that creates a single request (no template, no filter).
public RequestDerivation As(Func<TReq, TResp, TResult> factory)
Parameters
factoryFunc<TReq, TResp, TResult>Function that creates the derived request from source request/response.
Returns
AsVariants(Func<TReq, TResp, Dictionary<string, TResult>>)
Define a derivation that produces multiple request variants (no template, no filter). Use this for cases like generating both IfMatch and IfNoneMatch requests.
public RequestDerivation AsVariants(Func<TReq, TResp, Dictionary<string, TResult>> factory)
Parameters
factoryFunc<TReq, TResp, Dictionary<string, TResult>>Function that creates a dictionary of variant label to derived request.
Returns
AsVariants(Func<TReq, TResp, TResult, Dictionary<string, TResult>>)
Define a derivation that produces multiple request variants with template support (no filter).
public RequestDerivation AsVariants(Func<TReq, TResp, TResult, Dictionary<string, TResult>> factory)
Parameters
factoryFunc<TReq, TResp, TResult, Dictionary<string, TResult>>Function that creates a dictionary of variant label to derived request.
Returns
When(Func<TReq, TResp, bool>)
Add a filter condition. Derivation is skipped when predicate returns false.
public TypedWhenBuilder<TReq, TResp, TResult> When(Func<TReq, TResp, bool> predicate)
Parameters
Returns
- TypedWhenBuilder<TReq, TResp, TResult>