/// <summary>Initializes a new instance of <see cref="MockWebRequest"/>
 /// with the response to return.</summary>
 public MockWebRequest(Uri uri, string response)
 {
     m_requestUri = uri;
     m_requestStream = new MemoryStream();
     Stream m_responseStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(response));
     m_mockResponse = new MockWebResponse(m_responseStream);
 }
Exemple #2
0
        internal void SetCompleted(bool completedSynchronously, MockWebResponse result)
        {
            lock (m_locker)
            {
                m_completed = true;
                m_completedSynchronously = completedSynchronously;
                m_result = result;
            }

            SignalCompletion();
        }
        internal void SetCompleted(bool completedSynchronously, MockWebResponse result)
        {
            lock (m_locker)
            {
                m_completed = true;
                m_completedSynchronously = completedSynchronously;
                m_result = result;
            }

            SignalCompletion();
        }