コード例 #1
0
 public static Task <Either <InfusioError, InfusioResult <T> > > RunWithLogs <T>(this InfusioOp <T> op, InfusioClient client, IEnumerable <string> logs = default) =>
 RunAsync(op, InfusioState.Create(Seq(logs), useLogging: true), client).ToEither();
コード例 #2
0
 static EitherAsync <InfusioError, InfusioResult <T> > RunAsync <T>(InfusioOp <T> op, InfusioState state, InfusioClient client) =>
 op is InfusioOp <T> .Return r?Right <InfusioError, InfusioResult <T> >(new InfusioResult <T>(r.Value, state.Logs)).ToAsync() :
コード例 #3
0
 public static Task <Either <InfusioError, T> > Run <T>(this InfusioOp <T> op, InfusioClient client) =>
 RunAsync(op, InfusioState.Create(useLogging: false), client).Match(
     Left: e => Left <InfusioError, T>(e),
     Right: r => r.Value
     );
コード例 #4
0
 public static Task <Either <InfusioError, InfusioResult <T> > > Run <T>(this InfusioOp <T> op, InfusioClient client, InfusioState state) =>
 RunAsync(op, state, client).ToEither();
コード例 #5
0
 static EitherAsync <InfusioError, InfusioResult <B> > Exe <T, B>(Show <InfusioOp <T> > show, HttpWorkflow <T> workflow, Func <T, InfusioOp <B> > nextOp, InfusioState state, InfusioClient client) =>
 from right in LogOperation(show, workflow, state, client).ToAsync()
 from next in RunAsync(nextOp(right.Value), right.State, client)
 select next;
コード例 #6
0
 static Task <Either <InfusioError, T> > RunAsync <T>(InfusioOp <T> op, InfusioClient client) =>
 op is InfusioOp <T> .Return r?Right <InfusioError, T>(r.Value).AsTask() :
コード例 #7
0
 public static Task <Either <InfusioError, T> > RunWith <T>(this InfusioOp <T> op, InfusioClient client) =>
 RunAsync(op, client);
コード例 #8
0
 public static Task <Either <InfusioError, T> > interpret <T>(InfusioOp <T> op, InfusioClient client) =>
 RunAsync(op, client);
コード例 #9
0
 static Task <Either <InfusioError, B> > Exe <T, B>(Func <Task <Either <InfusioError, T> > > fn, Func <T, InfusioOp <B> > nextOp, InfusioClient client) =>
 from profile in fn()
 from next in RunAsync(nextOp(profile), client)
 select next;