public virtual bool Add(T e)
        {
            ThrowExceptionIfNull(e);
            var value   = ToData(e);
            var request = TransactionalListAddCodec.EncodeRequest(GetName(), GetTransactionId(), GetThreadId(), value);

            return(Invoke(request, m => TransactionalListAddCodec.DecodeResponse(m).response));
        }
Exemplo n.º 2
0
        /// <inheritoc />
        public async Task <bool> AddAsync(TItem item)
        {
            var itemData        = ToData(item);
            var requestMessage  = TransactionalListAddCodec.EncodeRequest(Name, TransactionId, ContextId, itemData);
            var responseMessage = await Cluster.Messaging.SendToMemberAsync(requestMessage, TransactionClientConnection).CAF();

            return(TransactionalListAddCodec.DecodeResponse(responseMessage).Response);
        }