public void Write(byte[] buffer, uint offset = 0, uint count = uint.MaxValue, ByteTargetCallback callback = null, object state = null) { if (count == uint.MaxValue) count = (uint)buffer.Length - offset; if (callback != null) _stream.BeginWrite(buffer, (int)offset, (int)count, OnEndWrite, new Tuple<ByteTargetCallback, object>(callback, state)); else _stream.Write(buffer, (int)offset, (int)count); }
public void Write(byte[] buffer, uint offset = 0, uint count = uint.MaxValue, ByteTargetCallback callback = null, object state = null) { if (count == uint.MaxValue) { count = (uint)buffer.Length - offset; } if (callback != null) { _stream.BeginWrite(buffer, (int)offset, (int)count, OnEndWrite, new Tuple <ByteTargetCallback, object>(callback, state)); } else { _stream.Write(buffer, (int)offset, (int)count); } }