Esempio n. 1
0
        public ICollection <TValue> Values()
        {
            var request = MapValuesCodec.EncodeRequest(GetName());
            var list    = Invoke(request, m => MapValuesCodec.DecodeResponse(m).response);

            return(new ReadOnlyLazyList <TValue, IData>(list, GetContext().GetSerializationService()));
        }
Esempio n. 2
0
        public ICollection <TValue> Values()
        {
            var request = MapValuesCodec.EncodeRequest(Name);
            var list    = Invoke(request, m => MapValuesCodec.DecodeResponse(m).Response);

            return(new ReadOnlyLazyList <TValue, IData>(list, Client.SerializationService));
        }
Esempio n. 3
0
        private async Task <IReadOnlyList <TValue> > GetValuesAsync(CancellationToken cancellationToken)
        {
            var requestMessage  = MapValuesCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendAsync(requestMessage, cancellationToken).CAF();

            var response = MapValuesCodec.DecodeResponse(responseMessage).Response;

            return(new ReadOnlyLazyList <TValue>(response, SerializationService));
        }
        public ICollection <V> Values()
        {
            var             request    = MapValuesCodec.EncodeRequest(GetName());
            var             list       = Invoke(request, m => MapValuesCodec.DecodeResponse(m).list);
            ICollection <V> collection = new List <V>(list.Count);

            foreach (var data in list)
            {
                var value = ToObject <V>(data);
                collection.Add(value);
            }
            return(collection);
        }