public Task <RtmWriteReply> Write <T>(string channel, T message, Ack ack)
            {
                var request = new RtmWriteRequest <T>
                {
                    Channel = channel,
                    Message = message
                };

                return(Write(request, ack));
            }
            public async Task <RtmWriteReply> Write <T>(RtmWriteRequest <T> request, Ack ack)
            {
                Log.I("Write to channel, request: '{0}', ack: {1}", request, ack);

                var conn = await _client.GetConnection();

                Log.V("Write to channel executing, request: '{0}'", request);

                if (conn == null)
                {
                    Log.W("Write to channel ignored because connection is null, request: '{0}'", request);
                    return(null);
                }

                var reply = await conn.RtmWrite(request, ack).ConfigureAwait(false);

                Log.V("Write to channel completed, request: '{0}', reply: '{1}'", request, reply);
                return(reply);
            }
Beispiel #3
0
 public void Write <T>(RtmWriteRequest <T> request, Ack ack, Action <RtmWriteReply> onSuccess, Action <Exception> onFailure)
 {
     Write(request, ack).ContinueOnDispatcher(Dispatcher, onSuccess, onFailure);
 }
Beispiel #4
0
 public Task <RtmWriteReply> Write <T>(RtmWriteRequest <T> request, Ack ack)
 {
     return(_rtmModule.Write(request, ack));
 }