Beispiel #1
0
 private TInv invoke<TInv>(
   string command, int numArgs,
   Action<ProtocolWriter> writeArgsAction,
   Func<ProtocolReader, TInv> readAction)
 {
   return invoke(Invocation.New(command, w =>
   {
     w.WriteCmdStart(command, numArgs);
     writeArgsAction(w);
   }, r => readAction(r)));
 }
Beispiel #2
0
 public TReturn Custom <TReturn>(string command,
                                 Action <ProtocolWriter> writeAction,
                                 Func <ProtocolReader, TReturn> readAction)
 {
     return(invoke(Invocation.New(command, writeAction, readAction)));
 }