public static TestWebRequest CreateTestRequest(Regex requestUriRegex, string response, TimeSpan latency, Exception requestStreamException, Exception responseStreamException, Exception endGetResponseException) { var request = new TestWebRequest(response, latency, requestStreamException, responseStreamException, endGetResponseException); request.RequestUriRegex = requestUriRegex; #if !SILVERLIGHT request.Timeout = Convert.ToInt32(TimeSpan.FromSeconds(30).TotalMilliseconds); #else //FIXME: Need a way to timeout requests in Silverlight #endif return request; }
public TestWebRequest CreateTestRequest(string response, TimeSpan latency, Exception requestStreamException, Exception responseStreamException, Exception endGetResponseException) { var request = new TestWebRequest(response, latency, requestStreamException, responseStreamException, endGetResponseException); #if !SILVERLIGHT request.Timeout = Convert.ToInt32(RequestTimeout.TotalMilliseconds); #else //FIXME: Need a way to timeout requests in Silverlight #endif NextRequest = request; return request; }
public static TestWebRequest CreateTestRequest(Regex requestUriRegex, string response, TimeSpan latency, Exception requestStreamException, Exception responseStreamException, Exception endGetResponseException) { var request = new TestWebRequest(response, latency, requestStreamException, responseStreamException, endGetResponseException); request.RequestUriRegex = requestUriRegex; #if !SILVERLIGHT request.Timeout = Convert.ToInt32(TimeSpan.FromSeconds(30).TotalMilliseconds); #else //FIXME: Need a way to timeout requests in Silverlight #endif return(request); }
public TestWebRequest CreateTestRequest(string response, TimeSpan latency, Exception requestStreamException, Exception responseStreamException, Exception endGetResponseException) { var request = new TestWebRequest(response, latency, requestStreamException, responseStreamException, endGetResponseException); #if !SILVERLIGHT request.Timeout = Convert.ToInt32(RequestTimeout.TotalMilliseconds); #else //FIXME: Need a way to timeout requests in Silverlight #endif NextRequest = request; return(request); }
public void AddTestRequest(TestWebRequest testRequest) { TestWebRequests.Add(testRequest); }
public MockClient AddResponse(TestWebRequest testWebRequest) { _requestFactory.AddTestRequest(testWebRequest); return this; }