BeginRead() public méthode

public BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
Résultat IAsyncResult
Exemple #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));
 }
Exemple #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));
        }
Exemple #3
0
 public override IAsyncResult BeginRead(byte [] buffer, int offset, int count,
                                        AsyncCallback cback, object state)
 {
     return(deflateStream.BeginRead(buffer, offset, count, cback, state));
 }
Exemple #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 ();
		}