Example #1
0
        private static HttpRequestMessage CreatePartitionRequest(HttpRequestMessage original, int start)
        {
            var    partitionRequest = GraphNetworkHelpers.CloneHttpRequestMessageAsync(original).Result;
            var    builder          = new UriBuilder(partitionRequest.RequestUri);
            string queryToAppend    = $"$skip={start}&$top={pageSize}";

            if (builder.Query != null && builder.Query.Length > 1)
            {
                builder.Query = builder.Query.Substring(1) + "&" + queryToAppend;
            }
            else
            {
                builder.Query = queryToAppend;
            }
            partitionRequest.RequestUri = builder.Uri;
            return(partitionRequest);
        }
Example #2
0
 async public Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
 {
     //throw new NotImplementedException("implement type check in serialized to make sure that requestcs are for TResult on DummyGraphClient");
     this.RequestCaptured(this, await GraphNetworkHelpers.CloneHttpRequestMessageAsync(request));
     return(new HttpResponseMessage(System.Net.HttpStatusCode.OK));
 }