コード例 #1
0
        /// <summary>
        /// Waits for the pending asynchronous read to complete.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        /// <returns>The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached.</returns>
        public override int EndRead(IAsyncResult asyncResult)
        {
            StorageAsyncResult <int> result = (StorageAsyncResult <int>)asyncResult;

            result.End();
            return(result.Result);
        }
コード例 #2
0
        /// <summary>
        /// Waits for the pending asynchronous flush to complete.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        public override void EndFlush(IAsyncResult asyncResult)
        {
            StorageAsyncResult <NullType> storageAsyncResult = (StorageAsyncResult <NullType>)asyncResult;

            this.flushPending = false;
            storageAsyncResult.End();
        }
コード例 #3
0
        /// <summary>
        /// Waits for the pending asynchronous read to complete.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        /// <returns>The total number of bytes read into the buffer. This can be
        /// less than the number of bytes requested if that many bytes are not
        /// currently available, or zero (0) if the end of the stream has been reached.</returns>
        public override int EndRead(IAsyncResult asyncResult)
        {
            StorageAsyncResult <int> storageAsyncResult = (StorageAsyncResult <int>)asyncResult;

            this.readPending = false;
            storageAsyncResult.End();

            return(storageAsyncResult.Result);
        }
コード例 #4
0
        /// <summary>
        /// Waits for the pending asynchronous write to complete.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        public override void EndWrite(IAsyncResult asyncResult)
        {
            StorageAsyncResult <NullType> storageAsyncResult = (StorageAsyncResult <NullType>)asyncResult;

            storageAsyncResult.End();

            if (this.lastException != null)
            {
                throw this.lastException;
            }
        }
コード例 #5
0
        /// <summary>
        /// Ends an asynchronous copy operation.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        public void EndFastCopyTo(IAsyncResult asyncResult)
        {
            StorageAsyncResult <NullType> result = (StorageAsyncResult <NullType>)asyncResult;

            result.End();
        }
コード例 #6
0
        /// <summary>
        /// Ends an asynchronous write operation.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        public override void EndWrite(IAsyncResult asyncResult)
        {
            StorageAsyncResult <NullType> result = (StorageAsyncResult <NullType>)asyncResult;

            result.End();
        }
コード例 #7
0
        /// <summary>
        /// Waits for the pending asynchronous commit to complete.
        /// </summary>
        /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
        public override void EndCommit(IAsyncResult asyncResult)
        {
            StorageAsyncResult <NullType> storageAsyncResult = (StorageAsyncResult <NullType>)asyncResult;

            storageAsyncResult.End();
        }