@@ -11,22 +11,25 @@ type ReadPartialOption =
11
11
| FromVersionInclusive of int
12
12
| MessageCount of int
13
13
| NoPrefetch
14
- | ReadDirection of ReadDirection
14
+ | ReadForwards
15
+ | ReadBackWards
15
16
16
17
[<RequireQualifiedAccess>]
17
18
type ReadEntireOption =
18
19
| CancellationToken of CancellationToken
19
20
| FromVersionInclusive of int
20
21
| NoPrefetch
21
- | ReadDirection of ReadDirection
22
+ | ReadForwards
23
+ | ReadBackWards
22
24
23
25
[<RequireQualifiedAccess>]
24
26
type ReadAllOption =
25
27
| CancellationToken of CancellationToken
26
28
| FromPositionInclusive of int64
27
29
| MessageCount of int
28
30
| NoPrefetch
29
- | ReadDirection of ReadDirection
31
+ | ReadForwards
32
+ | ReadBackWards
30
33
31
34
module Read =
32
35
@@ -45,7 +48,8 @@ module Read =
45
48
| ReadPartialOption.FromVersionInclusive version -> fromVersionInclusive <- Some version
46
49
| ReadPartialOption.MessageCount count -> messageCount <- count
47
50
| ReadPartialOption.NoPrefetch -> prefetch <- false
48
- | ReadPartialOption.ReadDirection direction -> readDirection <- direction)
51
+ | ReadPartialOption.ReadForwards -> readDirection <- ReadDirection.Forward
52
+ | ReadPartialOption.ReadBackWards -> readDirection <- ReadDirection.Backward)
49
53
50
54
let fromVersionInclusive ' =
51
55
match readDirection, fromVersionInclusive with
@@ -90,12 +94,13 @@ module Read =
90
94
| ReadEntireOption.CancellationToken token -> cancellationToken <- token
91
95
| ReadEntireOption.FromVersionInclusive version -> fromVersionInclusive <- Some version
92
96
| ReadEntireOption.NoPrefetch -> prefetch <- false
93
- | ReadEntireOption.ReadDirection direction -> readDirection <- direction)
97
+ | ReadEntireOption.ReadForwards -> readDirection <- ReadDirection.Forward
98
+ | ReadEntireOption.ReadBackWards -> readDirection <- ReadDirection.Backward)
94
99
95
100
let options =
96
101
[
97
102
ReadPartialOption.MessageCount System.Int32.MaxValue
98
- ReadPartialOption.ReadDirection readDirection
103
+ ReadPartialOption.ReadForwards
99
104
]
100
105
101
106
let options ' =
@@ -131,7 +136,8 @@ module Read =
131
136
| ReadAllOption.FromPositionInclusive position -> fromPositionInclusive <- Some position
132
137
| ReadAllOption.MessageCount count -> messageCount <- count
133
138
| ReadAllOption.NoPrefetch -> prefetch <- false
134
- | ReadAllOption.ReadDirection direction -> readDirection <- direction)
139
+ | ReadAllOption.ReadForwards -> readDirection <- ReadDirection.Forward
140
+ | ReadAllOption.ReadBackWards -> readDirection <- ReadDirection.Backward)
135
141
136
142
let fromPositionInclusive ' =
137
143
match readDirection, fromPositionInclusive with
0 commit comments