Пример #1
0
        public void StopAcceptingWritesCausesWriteToThrowObjectDisposedException()
        {
            var stream = new FrameResponseStream(Mock.Of <IHttpBodyControlFeature>(), Mock.Of <IFrameControl>());

            stream.StartAcceptingWrites();
            stream.StopAcceptingWrites();
            Assert.Throws <ObjectDisposedException>(() => { stream.WriteAsync(new byte[1], 0, 1); });
        }
Пример #2
0
 public void Stop()
 {
     _request.StopAcceptingReads();
     _emptyRequest.StopAcceptingReads();
     _response.StopAcceptingWrites();
 }