public Func <ControllerContext, string, TResult> ConvertProcToFunc <TResult>(Proc proc)
 {
     return((context, name) => (TResult)proc.Call(context, name));
 }
示例#2
0
 public static Action <object> WrapProc(Proc proc)
 {
     return(obj => proc.Call(obj));
 }
示例#3
0
 public static Action <T> WrapProc <T>(Proc proc)
 {
     return(obj => proc.Call(obj));
 }
示例#4
0
 public static Func <IRequest, bool> ToRequestPredicate(Proc proc)
 {
     return(r => (bool)proc.Call(r));
 }