BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
return IAsyncResult
示例#1
0
 public override IAsyncResult BeginRead(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState)
 {
     if (deflateStream == null)
     {
         throw new InvalidOperationException(SR.GetString(SR.ObjectDisposed_StreamClosed));
     }
     return(deflateStream.BeginRead(array, offset, count, asyncCallback, asyncState));
 }
示例#2
0
        public override IAsyncResult BeginRead(byte [] buffer, int offset, int count,
                                               AsyncCallback cback, object state)
        {
            if (deflateStream == null)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }

            return(deflateStream.BeginRead(buffer, offset, count, cback, state));
        }
示例#3
0
 public override IAsyncResult BeginRead(byte [] buffer, int offset, int count,
                                        AsyncCallback cback, object state)
 {
     return(deflateStream.BeginRead(buffer, offset, count, cback, state));
 }
示例#4
0
		public void AsyncRead ()
		{
			DeflateStream cs = new DeflateStream (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 ();
		}