7
7
8
8
using System ;
9
9
using System . Runtime . CompilerServices ;
10
+ using Akka . Annotations ;
10
11
11
12
namespace Akka . Streams . Dsl
12
13
{
@@ -17,28 +18,27 @@ namespace Akka.Streams.Dsl
17
18
/// operations.
18
19
///
19
20
/// An "empty" flow can be created by calling <see cref="FlowWithContext.Create{TCtx,TIn}"/>.
20
- ///
21
- /// API MAY CHANGE
22
- ///</summary>
23
- public sealed class FlowWithContext < TCtxIn , TIn , TCtxOut , TOut , TMat >
21
+ ///</summary>
22
+ [ ApiMayChange ]
23
+ public sealed class FlowWithContext < TIn , TCtxIn , TOut , TCtxOut , TMat >
24
24
: GraphDelegate < FlowShape < ( TIn , TCtxIn ) , ( TOut , TCtxOut ) > , TMat >
25
25
{
26
- internal FlowWithContext ( Flow < ( TIn , TCtxIn ) , ( TOut , TCtxOut ) , TMat > flow )
26
+ internal FlowWithContext ( Flow < ( TIn , TCtxIn ) , ( TOut , TCtxOut ) , TMat > flow )
27
27
: base ( flow )
28
28
{
29
29
}
30
-
30
+
31
31
///<summary>
32
32
/// Transform this flow by the regular flow. The given flow must support manual context propagation by
33
33
/// taking and producing tuples of (data, context).
34
34
///
35
35
/// This can be used as an escape hatch for operations that are not (yet) provided with automatic
36
36
/// context propagation here.
37
37
///</summary>
38
- public FlowWithContext < TCtxIn , TIn , TCtx2 , TOut2 , TMat > Via < TCtx2 , TOut2 , TMat2 > (
38
+ public FlowWithContext < TIn , TCtxIn , TOut2 , TCtx2 , TMat > Via < TOut2 , TCtx2 , TMat2 > (
39
39
IGraph < FlowShape < ( TOut , TCtxOut ) , ( TOut2 , TCtx2 ) > , TMat2 > viaFlow ) =>
40
40
FlowWithContext . From ( Flow . FromGraph ( Inner ) . Via ( viaFlow ) ) ;
41
-
41
+
42
42
///<summary>
43
43
/// Transform this flow by the regular flow. The given flow must support manual context propagation by
44
44
/// taking and producing tuples of (data, context).
@@ -49,7 +49,7 @@ public FlowWithContext<TCtxIn, TIn, TCtx2, TOut2, TMat> Via<TCtx2, TOut2, TMat2>
49
49
/// The <paramref name="combine"/> function is used to compose the materialized values of this flow and that
50
50
/// flow into the materialized value of the resulting Flow.
51
51
///</summary>
52
- public FlowWithContext < TCtxIn , TIn , TCtx2 , TOut2 , TMat3 > ViaMaterialized < TCtx2 , TOut2 , TMat2 , TMat3 > (
52
+ public FlowWithContext < TIn , TCtxIn , TOut2 , TCtx2 , TMat3 > ViaMaterialized < TOut2 , TCtx2 , TMat2 , TMat3 > (
53
53
IGraph < FlowShape < ( TOut , TCtxOut ) , ( TOut2 , TCtx2 ) > , TMat2 > viaFlow , Func < TMat , TMat2 , TMat3 > combine ) =>
54
54
FlowWithContext . From ( Flow . FromGraph ( Inner ) . ViaMaterialized ( viaFlow , combine ) ) ;
55
55
@@ -60,17 +60,17 @@ public FlowWithContext<TCtxIn, TIn, TCtx2, TOut2, TMat3> ViaMaterialized<TCtx2,
60
60
public static class FlowWithContext
61
61
{
62
62
/// <summary>
63
- /// Creates an "empty" <see cref="FlowWithContext{TCtxIn, TIn,TCtxOut ,TOut,TMat}"/> that passes elements through with their context unchanged.
63
+ /// Creates an "empty" <see cref="FlowWithContext{TIn,TCtxIn ,TOut,TCtxOut ,TMat}"/> that passes elements through with their context unchanged.
64
64
/// </summary>
65
- /// <typeparam name="TCtx"></typeparam>
66
65
/// <typeparam name="TIn"></typeparam>
66
+ /// <typeparam name="TCtx"></typeparam>
67
67
/// <returns></returns>
68
- public static FlowWithContext < TCtx , TIn , TCtx , TIn , NotUsed > Create < TCtx , TIn > ( )
68
+ public static FlowWithContext < TIn , TCtx , TIn , TCtx , NotUsed > Create < TIn , TCtx > ( )
69
69
{
70
70
var under = Flow . Create < ( TIn , TCtx ) , NotUsed > ( ) ;
71
- return new FlowWithContext < TCtx , TIn , TCtx , TIn , NotUsed > ( under ) ;
71
+ return new FlowWithContext < TIn , TCtx , TIn , TCtx , NotUsed > ( under ) ;
72
72
}
73
-
73
+
74
74
/// <summary>
75
75
/// Creates a FlowWithContext from a regular flow that operates on a pair of `(data, context)` elements.
76
76
/// </summary>
@@ -81,8 +81,8 @@ public static FlowWithContext<TCtx, TIn, TCtx, TIn, NotUsed> Create<TCtx, TIn>()
81
81
/// <typeparam name="TOut"></typeparam>
82
82
/// <typeparam name="TMat"></typeparam>
83
83
/// <returns></returns>
84
- public static FlowWithContext < TCtxIn , TIn , TCtxOut , TOut , TMat > From < TCtxIn , TIn , TCtxOut , TOut , TMat > (
85
- Flow < ( TIn , TCtxIn ) , ( TOut , TCtxOut ) , TMat > flow ) =>
86
- new FlowWithContext < TCtxIn , TIn , TCtxOut , TOut , TMat > ( flow ) ;
84
+ public static FlowWithContext < TIn , TCtxIn , TOut , TCtxOut , TMat > From < TIn , TCtxIn , TOut , TCtxOut , TMat > (
85
+ Flow < ( TIn , TCtxIn ) , ( TOut , TCtxOut ) , TMat > flow ) =>
86
+ new FlowWithContext < TIn , TCtxIn , TOut , TCtxOut , TMat > ( flow ) ;
87
87
}
88
88
}
0 commit comments