/// <summary>
        /// This implementation should not leak into the core Queryable code.  It is dependent on the specific protocol
        /// used to communicate with the other partitions (HTTP over ReverseProxy), and should be hidden behind an interface.
        /// </summary>
        private static async Task <IEnumerable <JToken> > QueryPartitionAsync(Partition partition,
                                                                              StatefulServiceContext context, string collection, IEnumerable <KeyValuePair <string, string> > query, CancellationToken cancellationToken)
        {
            string endpoint = await StatefulServiceUtils.GetPartitionEndpointAsync(context, partition).ConfigureAwait(false);

            string content = await StatefulServiceUtils.QueryPartitionAsync(endpoint, partition.PartitionInformation.Id, collection, query).ConfigureAwait(false);

            var result = JsonConvert.DeserializeObject <ODataResult>(content);

            return(result.Value);
        }