コード例 #1
1
 /// <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);
 }
コード例 #2
0
        internal void SetCompleted(bool completedSynchronously, MockWebResponse result)
        {
            lock (m_locker)
            {
                m_completed = true;
                m_completedSynchronously = completedSynchronously;
                m_result = result;
            }

            SignalCompletion();
        }
コード例 #3
0
        internal void SetCompleted(bool completedSynchronously, MockWebResponse result)
        {
            lock (m_locker)
            {
                m_completed = true;
                m_completedSynchronously = completedSynchronously;
                m_result = result;
            }

            SignalCompletion();
        }