/** * <summary> * Wraps cache request into a protocol message.</summary> * * <param name="req">Cache request that need to be wrapped.</param> * <returns>Wrapped message.</returns> */ private static GridClientCacheRequest WrapCacheRequest(ProtoRequest req) { ProtoCacheRequest data = ProtoCacheRequest.ParseFrom(req.Body); GridClientCacheRequest bean = new GridClientCacheRequest((GridClientCacheRequestOperation)data.Operation, Guid.Empty); if (data.HasCacheName) { bean.CacheName = data.CacheName; } if (data.HasKey) { bean.Key = WrapObject(data.Key); } if (data.HasValue) { bean.Value = WrapObject(data.Value); } if (data.HasValue2) { bean.Value2 = WrapObject(data.Value2); } if (data.HasValues) { bean.Values = WrapMap(data.Values); } return(WrapRequest(bean, req)); }