Ejemplo n.º 1
0
 internal void Call(RespConnection connection, Lifetime <Memory <RespValue> > args, Action <RespValue>?inspector = null)
 {
     using (args)
     {
         Interlocked.Increment(ref _opCount);
         connection.Send(RespValue.CreateAggregate(RespType.Array, args.Value));
     }
     using var response = connection.Receive();
     response.Value.ThrowIfError();
     inspector?.Invoke(response.Value);
 }
Ejemplo n.º 2
0
 internal T Call <T>(RespConnection connection, Lifetime <Memory <RespValue> > args, Func <RespValue, T> selector)
 {
     using (args)
     {
         Interlocked.Increment(ref _opCount);
         connection.Send(RespValue.CreateAggregate(RespType.Array, args.Value));
     }
     using var response = connection.Receive();
     response.Value.ThrowIfError();
     return(selector(response.Value));
 }
Ejemplo n.º 3
0
 static void Send(PooledMultiplexer @this, RespConnection connection, IBatchedOperation op, bool flush)
 {
     Interlocked.Increment(ref @this._opCount);
     using var args = op.ConsumeArgs();
     connection.Send(RespValue.CreateAggregate(RespType.Array, args.Value), flush);
 }