@@ -16,42 +16,59 @@ module ReadRaw =
16
16
| StartPosition.End -> - 1 L
17
17
| StartPosition.SpecificPosition position -> position
18
18
19
- let readFromAllStream : SqlStreamStore.IStreamStore -> ReadingDirection -> StartPosition -> MessageCount -> Async < ReadAllPage > =
20
- fun store readingDirection startPositionInclusive msgCount ->
21
- match readingDirection with
22
- | ReadingDirection.Forward ->
23
- store.ReadAllForwards( fromStartPositionInclusive startPositionInclusive, msgCount)
24
- | ReadingDirection.Backward ->
25
- store.ReadAllBackwards( fromStartPositionInclusive startPositionInclusive, msgCount)
26
- |> Async.AwaitTask
19
+ let readFromAllStream ( store : SqlStreamStore.IStreamStore )
20
+ ( readingDirection : ReadingDirection )
21
+ ( startPositionInclusive : StartPosition )
22
+ ( msgCount : int )
23
+ : Async < ReadAllPage > =
24
+ match readingDirection with
25
+ | ReadingDirection.Forward -> store.ReadAllForwards( fromStartPositionInclusive startPositionInclusive, msgCount)
26
+ | ReadingDirection.Backward ->
27
+ store.ReadAllBackwards( fromStartPositionInclusive startPositionInclusive, msgCount)
28
+ |> Async.AwaitTask
27
29
28
- let readFromAllStream ' : SqlStreamStore.IStreamStore -> ReadingDirection -> StartPosition -> MessageCount -> bool -> CancellationToken -> Async < ReadAllPage > =
29
- fun store readingDirection startPositionInclusive msgCount prefetchJson cancellationToken ->
30
- match readingDirection with
31
- | ReadingDirection.Forward ->
32
- store.ReadAllForwards
33
- ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
34
- | ReadingDirection.Backward ->
35
- store.ReadAllBackwards
36
- ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
37
- |> Async.AwaitTask
30
+ let readFromStream ( store : SqlStreamStore.IStreamStore )
31
+ ( readingDirection : ReadingDirection )
32
+ ( streamName : string )
33
+ ( readVersion : ReadVersion )
34
+ ( msgCount : int )
35
+ : Async < ReadStreamPage > =
36
+ match readingDirection with
37
+ | ReadingDirection.Forward ->
38
+ store.ReadStreamForwards( StreamId( streamName), fromReadVersion readVersion, msgCount)
39
+ | ReadingDirection.Backward ->
40
+ store.ReadStreamBackwards( StreamId( streamName), fromReadVersion readVersion, msgCount)
41
+ |> Async.AwaitTask
38
42
39
- let readFromStream : SqlStreamStore.IStreamStore -> ReadingDirection -> StreamName -> ReadVersion -> MessageCount -> Async < ReadStreamPage > =
40
- fun store readingDirection streamName readVersion msgCount ->
41
- match readingDirection with
42
- | ReadingDirection.Forward ->
43
- store.ReadStreamForwards( StreamId( streamName), fromReadVersion readVersion, msgCount)
44
- | ReadingDirection.Backward ->
45
- store.ReadStreamBackwards( StreamId( streamName), fromReadVersion readVersion, msgCount)
46
- |> Async.AwaitTask
43
+ let readFromAllStream ' ( store : SqlStreamStore.IStreamStore )
44
+ ( readingDirection : ReadingDirection )
45
+ ( startPositionInclusive : StartPosition )
46
+ ( msgCount : int )
47
+ ( prefetchJson : bool )
48
+ ( cancellationToken : CancellationToken )
49
+ : Async < ReadAllPage > =
50
+ match readingDirection with
51
+ | ReadingDirection.Forward ->
52
+ store.ReadAllForwards
53
+ ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
54
+ | ReadingDirection.Backward ->
55
+ store.ReadAllBackwards
56
+ ( fromStartPositionInclusive startPositionInclusive, msgCount, prefetchJson, cancellationToken)
57
+ |> Async.AwaitTask
47
58
48
- let readFromStream ' : SqlStreamStore.IStreamStore -> ReadingDirection -> StreamName -> ReadVersion -> MessageCount -> bool -> CancellationToken -> Async < ReadStreamPage > =
49
- fun store readingDirection streamName readVersion msgCount prefetchJson cancellationToken ->
50
- match readingDirection with
51
- | ReadingDirection.Forward ->
52
- store.ReadStreamForwards
53
- ( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson, cancellationToken)
54
- | ReadingDirection.Backward ->
55
- store.ReadStreamBackwards
56
- ( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson, cancellationToken)
57
- |> Async.AwaitTask
59
+ let readFromStream ' ( store : SqlStreamStore.IStreamStore )
60
+ ( readingDirection : ReadingDirection )
61
+ ( streamName : string )
62
+ ( readVersion : ReadVersion )
63
+ ( msgCount : int )
64
+ ( prefetchJson : bool )
65
+ ( cancellationToken : CancellationToken )
66
+ : Async < ReadStreamPage > =
67
+ match readingDirection with
68
+ | ReadingDirection.Forward ->
69
+ store.ReadStreamForwards
70
+ ( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson, cancellationToken)
71
+ | ReadingDirection.Backward ->
72
+ store.ReadStreamBackwards
73
+ ( StreamId( streamName), fromReadVersion readVersion, msgCount, prefetchJson, cancellationToken)
74
+ |> Async.AwaitTask
0 commit comments