You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|01-> cmd.SetHandler(Action<'A>(fun a -> handler (a)), cvd 0)
145
-
|02-> cmd.SetHandler(Action<'A, 'B>(fun a b -> handler (a, b)), cvd 0, cvd 1)
146
-
|03-> cmd.SetHandler(Action<'A, 'B, 'C>(fun a b c -> handler (a, b, c)), cvd 0, cvd 1, cvd 2)
147
-
|04-> cmd.SetHandler(Action<'A, 'B, 'C, 'D>(fun a b c d -> handler (a, b, c, d)), cvd 0, cvd 1, cvd 2, cvd 3)
148
-
|05-> cmd.SetHandler(Action<'A, 'B, 'C, 'D, 'E>(fun a b c d e -> handler (a, b, c, d, e)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4)
149
-
|06-> cmd.SetHandler(Action<'A, 'B, 'C, 'D, 'E, 'F>(fun a b c d e f -> handler (a, b, c, d, e, f)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5)
150
-
|07-> cmd.SetHandler(Action<'A, 'B, 'C, 'D, 'E, 'F, 'G>(fun a b c d e f g -> handler (a, b, c, d, e, f, g)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5, cvd 6)
151
-
|08-> cmd.SetHandler(Action<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H>(fun a b c d e f g h -> handler (a, b, c, d, e, f, g, h)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5, cvd 6, cvd 7)
136
+
|00-> cmd.SetHandler(Action(fun()->
137
+
handler ()))
138
+
|01-> cmd.SetHandler(Action<IC>(fun ctx ->
139
+
leta:'A = getValue ctx 0
140
+
handler (a)))
141
+
|02-> cmd.SetHandler(Action<IC>(fun ctx ->
142
+
leta:'A = getValue ctx 0
143
+
letb:'B = getValue ctx 1
144
+
handler (a, b)))
145
+
|03-> cmd.SetHandler(Action<IC>(fun ctx ->
146
+
leta:'A = getValue ctx 0
147
+
letb:'B = getValue ctx 1
148
+
letc:'C = getValue ctx 2
149
+
handler (a, b, c)))
150
+
|04-> cmd.SetHandler(Action<IC>(fun ctx ->
151
+
leta:'A = getValue ctx 0
152
+
letb:'B = getValue ctx 1
153
+
letc:'C = getValue ctx 2
154
+
letd:'D = getValue ctx 3
155
+
handler (a, b, c, d)))
156
+
|05-> cmd.SetHandler(Action<IC>(fun ctx ->
157
+
leta:'A = getValue ctx 0
158
+
letb:'B = getValue ctx 1
159
+
letc:'C = getValue ctx 2
160
+
letd:'D = getValue ctx 3
161
+
lete:'E = getValue ctx 4
162
+
handler (a, b, c, d, e)))
163
+
|06-> cmd.SetHandler(Action<IC>(fun ctx ->
164
+
leta:'A = getValue ctx 0
165
+
letb:'B = getValue ctx 1
166
+
letc:'C = getValue ctx 2
167
+
letd:'D = getValue ctx 3
168
+
lete:'E = getValue ctx 4
169
+
letf:'F = getValue ctx 5
170
+
handler (a, b, c, d, e, f)))
171
+
|07-> cmd.SetHandler(Action<IC>(fun ctx ->
172
+
leta:'A = getValue ctx 0
173
+
letb:'B = getValue ctx 1
174
+
letc:'C = getValue ctx 2
175
+
letd:'D = getValue ctx 3
176
+
lete:'E = getValue ctx 4
177
+
letf:'F = getValue ctx 5
178
+
letg:'G = getValue ctx 6
179
+
handler (a, b, c, d, e, f, g)))
180
+
|08-> cmd.SetHandler(Action<IC>(fun ctx ->
181
+
leta:'A = getValue ctx 0
182
+
letb:'B = getValue ctx 1
183
+
letc:'C = getValue ctx 2
184
+
letd:'D = getValue ctx 3
185
+
lete:'E = getValue ctx 4
186
+
letf:'F = getValue ctx 5
187
+
letg:'G = getValue ctx 6
188
+
leth:'H = getValue ctx 7
189
+
handler (a, b, c, d, e, f, g, h)))
152
190
|_-> raise (NotImplementedException("Only 8 inputs are supported."))
153
191
cmd
154
192
155
193
/// Sets a command handler that returns an `int` status code.
|01-> cmd.SetHandler(Func<'A, Task>(fun a -> handler (a)), cvd 0)
243
-
|02-> cmd.SetHandler(Func<'A, 'B, Task>(fun a b -> handler (a, b)), cvd 0, cvd 1)
244
-
|03-> cmd.SetHandler(Func<'A, 'B, 'C, Task>(fun a b c -> handler (a, b, c)), cvd 0, cvd 1, cvd 2)
245
-
|04-> cmd.SetHandler(Func<'A, 'B, 'C, 'D, Task>(fun a b c d -> handler (a, b, c, d)), cvd 0, cvd 1, cvd 2, cvd 3)
246
-
|05-> cmd.SetHandler(Func<'A, 'B, 'C, 'D, 'E, Task>(fun a b c d e -> handler (a, b, c, d, e)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4)
247
-
|06-> cmd.SetHandler(Func<'A, 'B, 'C, 'D, 'E, 'F, Task>(fun a b c d e f -> handler (a, b, c, d, e, f)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5)
248
-
|07-> cmd.SetHandler(Func<'A, 'B, 'C, 'D, 'E, 'F, 'G, Task>(fun a b c d e f g -> handler (a, b, c, d, e, f, g)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5, cvd 6)
249
-
|08-> cmd.SetHandler(Func<'A, 'B, 'C, 'D, 'E, 'F, 'G, 'H, Task>(fun a b c d e f g h -> handler (a, b, c, d, e, f, g, h)), cvd 0, cvd 1, cvd 2, cvd 3, cvd 4, cvd 5, cvd 6, cvd 7)
270
+
|00-> cmd.SetHandler(Func<Task>(fun()->
271
+
handler ()))
272
+
|01-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
273
+
leta:'A = getValue ctx 0
274
+
handler (a)))
275
+
|02-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
276
+
leta:'A = getValue ctx 0
277
+
letb:'B = getValue ctx 1
278
+
handler (a, b)))
279
+
|03-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
280
+
leta:'A = getValue ctx 0
281
+
letb:'B = getValue ctx 1
282
+
letc:'C = getValue ctx 2
283
+
handler (a, b, c)))
284
+
|04-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
285
+
leta:'A = getValue ctx 0
286
+
letb:'B = getValue ctx 1
287
+
letc:'C = getValue ctx 2
288
+
letd:'D = getValue ctx 3
289
+
handler (a, b, c, d)))
290
+
|05-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
291
+
leta:'A = getValue ctx 0
292
+
letb:'B = getValue ctx 1
293
+
letc:'C = getValue ctx 2
294
+
letd:'D = getValue ctx 3
295
+
lete:'E = getValue ctx 4
296
+
handler (a, b, c, d, e)))
297
+
|06-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
298
+
leta:'A = getValue ctx 0
299
+
letb:'B = getValue ctx 1
300
+
letc:'C = getValue ctx 2
301
+
letd:'D = getValue ctx 3
302
+
lete:'E = getValue ctx 4
303
+
letf:'F = getValue ctx 5
304
+
handler (a, b, c, d, e, f)))
305
+
|07-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
306
+
leta:'A = getValue ctx 0
307
+
letb:'B = getValue ctx 1
308
+
letc:'C = getValue ctx 2
309
+
letd:'D = getValue ctx 3
310
+
lete:'E = getValue ctx 4
311
+
letf:'F = getValue ctx 5
312
+
letg:'G = getValue ctx 6
313
+
handler (a, b, c, d, e, f, g)))
314
+
|08-> cmd.SetHandler(Func<IC, Task>(fun ctx ->
315
+
leta:'A = getValue ctx 0
316
+
letb:'B = getValue ctx 1
317
+
letc:'C = getValue ctx 2
318
+
letd:'D = getValue ctx 3
319
+
lete:'E = getValue ctx 4
320
+
letf:'F = getValue ctx 5
321
+
letg:'G = getValue ctx 6
322
+
leth:'H = getValue ctx 7
323
+
handler (a, b, c, d, e, f, g, h)))
250
324
|_-> raise (NotImplementedException("Only 8 inputs are supported."))
0 commit comments