/// <summary>
        /// Extends BeginRead so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// pipestream.BeginRead(buffer, offset, count, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginRead(this AnonymousPipeServerStream pipestream, Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback)
        {
            if (pipestream == null)
            {
                throw new ArgumentNullException("pipestream");
            }

            return(pipestream.BeginRead(buffer, offset, count, callback, null));
        }
        /// <summary>
        /// Extends BeginRead so that buffer offset of 0 and call to Array.Length are not needed.
        /// <example>
        /// pipestream.BeginRead(buffer, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginRead(this AnonymousPipeServerStream pipestream, Byte[] buffer, AsyncCallback callback)
        {
            if (pipestream == null)
            {
                throw new ArgumentNullException("pipestream");
            }

            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }

            return(pipestream.BeginRead(buffer, 0, buffer.Length, callback));
        }