Class FlowWithContext<TIn, TCtxIn, TOut, TCtxOut, TMat>
A flow that provides operations which automatically propagate the context of an element.
Only a subset of common operations from Flow is supported. As an escape hatch you can
use [[FlowWithContextOps.via]] to manually provide the context propagation for otherwise unsupported
operations.
An "empty" flow can be created by calling Create<TIn, TCtx>().
Inheritance
FlowWithContext<TIn, TCtxIn, TOut, TCtxOut, TMat>
Implements
IGraph<
FlowShape<
System.ValueTuple<TIn, TCtxIn>,
System.ValueTuple<TOut, TCtxOut>>, TMat>
IGraph<
FlowShape<
System.ValueTuple<TIn, TCtxIn>,
System.ValueTuple<TOut, TCtxOut>>>
Assembly: Akka.Streams.dll
Syntax
public sealed class FlowWithContext<TIn, TCtxIn, TOut, TCtxOut, TMat> : GraphDelegate<FlowShape<(TIn, TCtxIn), (TOut, TCtxOut)>, TMat>, IGraph<FlowShape<(TIn, TCtxIn), (TOut, TCtxOut)>, TMat>, IGraph<FlowShape<(TIn, TCtxIn), (TOut, TCtxOut)>>
Type Parameters
Name |
Description |
TIn |
|
TCtxIn |
|
TOut |
|
TCtxOut |
|
TMat |
|
Methods
|
Improve this Doc
View Source
AsFlow()
Declaration
public Flow<(TIn, TCtxIn), (TOut, TCtxOut), TMat> AsFlow()
Returns
Type |
Description |
Flow<System.ValueTuple<TIn, TCtxIn>, System.ValueTuple<TOut, TCtxOut>, TMat> |
|
|
Improve this Doc
View Source
MapMaterializedValue<TMat2>(Func<TMat, TMat2>)
Declaration
public FlowWithContext<TIn, TCtxIn, TOut, TCtxOut, TMat2> MapMaterializedValue<TMat2>(Func<TMat, TMat2> combine)
Parameters
Type |
Name |
Description |
Func<TMat, TMat2> |
combine |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Via<TOut2, TCtx2, TMat2>(IGraph<FlowShape<(TOut, TCtxOut), (TOut2, TCtx2)>, TMat2>)
Transform this flow by the regular flow. The given flow must support manual context propagation by
taking and producing tuples of (data, context).
This can be used as an escape hatch for operations that are not (yet) provided with automatic
context propagation here.
Declaration
public FlowWithContext<TIn, TCtxIn, TOut2, TCtx2, TMat> Via<TOut2, TCtx2, TMat2>(IGraph<FlowShape<(TOut, TCtxOut), (TOut2, TCtx2)>, TMat2> viaFlow)
Parameters
Type |
Name |
Description |
IGraph<FlowShape<System.ValueTuple<TOut, TCtxOut>, System.ValueTuple<TOut2, TCtx2>>, TMat2> |
viaFlow |
|
Returns
Type Parameters
Name |
Description |
TOut2 |
|
TCtx2 |
|
TMat2 |
|
|
Improve this Doc
View Source
ViaMaterialized<TOut2, TCtx2, TMat2, TMat3>(IGraph<FlowShape<(TOut, TCtxOut), (TOut2, TCtx2)>, TMat2>, Func<TMat, TMat2, TMat3>)
Transform this flow by the regular flow. The given flow must support manual context propagation by
taking and producing tuples of (data, context).
This can be used as an escape hatch for operations that are not (yet) provided with automatic
context propagation here.
The combine
function is used to compose the materialized values of this flow and that
flow into the materialized value of the resulting Flow.
Declaration
public FlowWithContext<TIn, TCtxIn, TOut2, TCtx2, TMat3> ViaMaterialized<TOut2, TCtx2, TMat2, TMat3>(IGraph<FlowShape<(TOut, TCtxOut), (TOut2, TCtx2)>, TMat2> viaFlow, Func<TMat, TMat2, TMat3> combine)
Parameters
Type |
Name |
Description |
IGraph<FlowShape<System.ValueTuple<TOut, TCtxOut>, System.ValueTuple<TOut2, TCtx2>>, TMat2> |
viaFlow |
|
Func<TMat, TMat2, TMat3> |
combine |
|
Returns
Type Parameters
Name |
Description |
TOut2 |
|
TCtx2 |
|
TMat2 |
|
TMat3 |
|
Implements
Extension Methods