public override IAsyncResult BeginRead(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState) => TaskToApm.Begin(WriteAsync(array, offset, count, CancellationToken.None), asyncCallback, asyncState);
public void AsyncRead () { GZipStream cs = new GZipStream (new MemoryStream (), CompressionMode.Decompress); message = "AsyncRead"; reset.Reset (); IAsyncResult r = cs.BeginRead (new byte[0], 0, 0, new AsyncCallback (ReadCallback), cs); Assert.IsNotNull (r, "IAsyncResult"); if (!reset.WaitOne (timeout, true)) Assert.Ignore ("Timeout"); Assert.IsNull (message, message); cs.Close (); }