WriteAsync(char[], int, int, CancellationToken)

This method returns a Task-based asynchronous version of OracleClob.Write(), which writes a specified number of bytes from the ODP.NET LOB instance and populates the buffer.

Declaration

// C#
public Task WriteAsync(char[] buffer, int offset, int count, CancellationToken cancellationToken)

Parameters

  • buffer

    The character array buffer that provides the data.

  • offset

    The 0-based offset (in characters) from which the buffer is read.

  • count

    The amount of characters to be written into the OracleClob.

  • cancellationToken

    The input cancellation token which can be used by the application to cancel the task.

Return Value

Task object representing the asynchronous operation immediately without blocking the calling thread for the whole duration of the query execution.

Exceptions

  • ObjectDisposedException - The object is already disposed.

  • InvalidOperationException - The OracleConnection is not open or has been closed during the lifetime of the object.

  • ArgumentOutOfRangeException - This exception is thrown if any of the following conditions exist:

    • The offset or the count parameter is less than 0.

    • The offset is greater than or equal to the buffer.Length.

    • The offset and the count together are greater than the buffer.Length.

    • The offset, the count, or the Position is not even.