コード例 #1
0
 public static Middleware <R> SelectMany <T, R>
     (this Middleware <T> mw, Func <T, Middleware <R> > f)
 => cont => mw(t => f(t)(cont));
コード例 #2
0
 public static Middleware <RR> SelectMany <T, R, RR>
     (this Middleware <T> @this, Func <T, Middleware <R> > f, Func <T, R, RR> project)
 => cont => @this(t => f(t)(r => cont(project(t, r))));
コード例 #3
0
 public static Middleware <R> Select <T, R>
     (this Middleware <T> mw, Func <T, R> f)
 => cont => mw(t => cont(f(t)));
コード例 #4
0
 public static Middleware <R> Bind <T, R>
     (this Middleware <T> mw, Func <T, Middleware <R> > f)
 => SelectMany(mw, f);
コード例 #5
0
 public static Middleware <R> Map <T, R>
     (this Middleware <T> mw, Func <T, R> f)
 => Select(mw, f);
コード例 #6
0
 public static T Run <T>(this Middleware <T> mw) => mw(t => t);
コード例 #7
0
 public DbLogger(ConnectionString connString, ILogger log)
 {
     Connect = f => ConnectionHelper.Connect(connString, f);
     Time    = op => f => Instrumentation.Time(log, op, f.ToNullary());
     Trace   = op => f => Instrumentation.Trace(log, op, f.ToNullary());
 }