CloudFile.WriteRangeAsync Method

Definition

Overloads

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext)

Returns a task that performs an asynchronous operation to write a range to a file.

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

WriteRangeAsync(Stream, Int64, String)

Returns a task that performs an asynchronous operation to write a range to a file.

WriteRangeAsync(Stream, Int64, String, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

WriteRangeAsync(Uri, Int64, Int64, Int64, Checksum, AccessCondition, FileRequestOptions, OperationContext, Nullable<CancellationToken>)

Writes range from a source file to this file.

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(System.IO.Stream rangeData, long startOffset, string contentMD5, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (rangeData As Stream, startOffset As Long, contentMD5 As String, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task

Parameters

rangeData
System.IO.Stream

A stream providing the data.

startOffset
System.Int64

The offset at which to begin writing, in bytes.

contentMD5
System.String

An optional hash value that will be used to set the ContentMD5 property on the file. May be null or an empty string.

accessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the file. If null, no condition is used.

options
FileRequestOptions

A FileRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for a task to complete.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task object that represents the current operation.

Attributes

Applies to

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext)

Returns a task that performs an asynchronous operation to write a range to a file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(System.IO.Stream rangeData, long startOffset, string contentMD5, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task
override this.WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (rangeData As Stream, startOffset As Long, contentMD5 As String, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext) As Task

Parameters

rangeData
System.IO.Stream

A stream providing the data.

startOffset
System.Int64

The offset at which to begin writing, in bytes.

contentMD5
System.String

An optional hash value that will be used to set the ContentMD5 property on the file. May be null or an empty string.

accessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the file. If null, no condition is used.

options
FileRequestOptions

A FileRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task object that represents the current operation.

Attributes

Applies to

WriteRangeAsync(Stream, Int64, String, AccessCondition, FileRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(System.IO.Stream rangeData, long startOffset, string contentMD5, Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> progressHandler, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WriteRangeAsync : System.IO.Stream * int64 * string * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * IProgress<Microsoft.Azure.Storage.Core.Util.StorageProgress> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (rangeData As Stream, startOffset As Long, contentMD5 As String, accessCondition As AccessCondition, options As FileRequestOptions, operationContext As OperationContext, progressHandler As IProgress(Of StorageProgress), cancellationToken As CancellationToken) As Task

Parameters

rangeData
System.IO.Stream

A stream providing the data.

startOffset
System.Int64

The offset at which to begin writing, in bytes.

contentMD5
System.String

An optional hash value that will be used to set the ContentMD5 property on the file. May be null or an empty string.

accessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the file. If null, no condition is used.

options
FileRequestOptions

A FileRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler
System.IProgress<StorageProgress>

A System.IProgress`1 object to handle StorageProgress messages.

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for a task to complete.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task object that represents the current operation.

Attributes

Applies to

WriteRangeAsync(Stream, Int64, String)

Returns a task that performs an asynchronous operation to write a range to a file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(System.IO.Stream rangeData, long startOffset, string contentMD5);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : System.IO.Stream * int64 * string -> System.Threading.Tasks.Task
override this.WriteRangeAsync : System.IO.Stream * int64 * string -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (rangeData As Stream, startOffset As Long, contentMD5 As String) As Task

Parameters

rangeData
System.IO.Stream

A stream providing the data.

startOffset
System.Int64

The offset at which to begin writing, in bytes.

contentMD5
System.String

An optional hash value that will be used to set the ContentMD5 property on the file. May be null or an empty string.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task object that represents the current operation.

Attributes

Applies to

WriteRangeAsync(Stream, Int64, String, CancellationToken)

Returns a task that performs an asynchronous operation to write a range to a file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(System.IO.Stream rangeData, long startOffset, string contentMD5, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : System.IO.Stream * int64 * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WriteRangeAsync : System.IO.Stream * int64 * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (rangeData As Stream, startOffset As Long, contentMD5 As String, cancellationToken As CancellationToken) As Task

Parameters

rangeData
System.IO.Stream

A stream providing the data.

startOffset
System.Int64

The offset at which to begin writing, in bytes.

contentMD5
System.String

An optional hash value that will be used to set the ContentMD5 property on the file. May be null or an empty string.

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for a task to complete.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task object that represents the current operation.

Attributes

Applies to

WriteRangeAsync(Uri, Int64, Int64, Int64, Checksum, AccessCondition, FileRequestOptions, OperationContext, Nullable<CancellationToken>)

Writes range from a source file to this file.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task WriteRangeAsync(Uri sourceUri, long sourceOffset, long count, long destOffset, Microsoft.Azure.Storage.Shared.Protocol.Checksum sourceContentChecksum = default, Microsoft.Azure.Storage.AccessCondition sourceAccessCondition = default, Microsoft.Azure.Storage.File.FileRequestOptions options = default, Microsoft.Azure.Storage.OperationContext operationContext = default, System.Threading.CancellationToken? cancellationToken = default);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member WriteRangeAsync : Uri * int64 * int64 * int64 * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * Nullable<System.Threading.CancellationToken> -> System.Threading.Tasks.Task
override this.WriteRangeAsync : Uri * int64 * int64 * int64 * Microsoft.Azure.Storage.Shared.Protocol.Checksum * Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * Nullable<System.Threading.CancellationToken> -> System.Threading.Tasks.Task
Public Overridable Function WriteRangeAsync (sourceUri As Uri, sourceOffset As Long, count As Long, destOffset As Long, Optional sourceContentChecksum As Checksum = Nothing, Optional sourceAccessCondition As AccessCondition = Nothing, Optional options As FileRequestOptions = Nothing, Optional operationContext As OperationContext = Nothing, Optional cancellationToken As Nullable(Of CancellationToken) = Nothing) As Task

Parameters

sourceUri
System.Uri

A System.Uri specifying the absolute URI to the source file.

sourceOffset
System.Int64

The offset at which to begin reading the source, in bytes.

count
System.Int64

The number of bytes to write

destOffset
System.Int64

The offset at which to begin writing, in bytes.

sourceContentChecksum
Checksum

A hash value used to ensure transactional integrity. May be null or Checksum.None

sourceAccessCondition
AccessCondition

An AccessCondition object that represents the access conditions for the source file. If null, no condition is used.

options
FileRequestOptions

An FileRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

An object that represents the context for the current operation.

cancellationToken
System.Nullable<System.Threading.CancellationToken>

A System.Threading.CancellationToken to observe while waiting for a task to complete.

Returns

System.Threading.Tasks.Task
Attributes

Applies to