コード例 #1
0
        public override bool Add(T item)
        {
            var request  = ListAddCodec.EncodeRequest(GetName(), ToData(item));
            var response = Invoke(request);

            return(ListAddCodec.DecodeResponse(response).response);
        }
コード例 #2
0
        /// <inheritdoc />
        public override async Task <bool> AddAsync(T item)
        {
            var itemData        = ToSafeData(item);
            var requestMessage  = ListAddCodec.EncodeRequest(Name, itemData);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CfAwait();

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