public virtual bool Add(T e) { ThrowExceptionIfNull(e); var value = ToData(e); var request = TransactionalSetAddCodec.EncodeRequest(GetName(), GetTransactionId(), GetThreadId(), value); return(Invoke(request, m => TransactionalSetAddCodec.DecodeResponse(m).response)); }
public async Task <bool> AddAsync(TItem item) { var itemData = ToSafeData(item); var requestMessage = TransactionalSetAddCodec.EncodeRequest(Name, TransactionId, ContextId, itemData); var responseMessage = await Cluster.Messaging.SendToMemberAsync(requestMessage, TransactionClientConnection).CAF(); return(TransactionalSetAddCodec.DecodeResponse(responseMessage).Response); }