BeginWrite() public method

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

            return(deflateStream.BeginWrite(buffer, offset, count, cback, state));
        }
Example #3
0
 public override IAsyncResult BeginWrite(byte [] buffer, int offset, int count,
                                         AsyncCallback cback, object state)
 {
     return(deflateStream.BeginWrite(buffer, offset, count, cback, state));
 }
Example #4
0
		public void AsyncWrite ()
		{
			DeflateStream cs = new DeflateStream (new MemoryStream (), CompressionMode.Compress);
			message = "AsyncWrite";
			reset.Reset ();
			IAsyncResult r = cs.BeginWrite (new byte[1], 0, 1, new AsyncCallback (WriteCallback), cs);
			Assert.IsNotNull (r, "IAsyncResult");
			if (!reset.WaitOne (timeout, true))
				Assert.Ignore ("Timeout");
			Assert.IsNull (message, message);
// the Close is currently buggy in Mono
//			cs.Close ();
		}