public override async Task <bool> AddAsync(T item) { var itemData = ToSafeData(item); var requestMessage = SetAddCodec.EncodeRequest(Name, itemData); var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CAF(); return(SetAddCodec.DecodeResponse(responseMessage).Response); }
public override bool Add(T item) { ValidationUtil.ThrowExceptionIfNull(item); var value = ToData(item); var request = SetAddCodec.EncodeRequest(GetName(), value); return(Invoke(request, m => SetAddCodec.DecodeResponse(m).response)); }