CloudFile.WriteRangeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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
- Stream
A stream providing the data.
- startOffset
- Int64
The offset at which to begin writing, in bytes.
- contentMD5
- 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
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
A 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
- Stream
A stream providing the data.
- startOffset
- Int64
The offset at which to begin writing, in bytes.
- contentMD5
- 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
A 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
- Stream
A stream providing the data.
- startOffset
- Int64
The offset at which to begin writing, in bytes.
- contentMD5
- 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
- IProgress<StorageProgress>
A IProgress<T> object to handle StorageProgress messages.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
A 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
- Stream
A stream providing the data.
- startOffset
- Int64
The offset at which to begin writing, in bytes.
- contentMD5
- 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
A 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
- Stream
A stream providing the data.
- startOffset
- Int64
The offset at which to begin writing, in bytes.
- contentMD5
- 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
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
A 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
- sourceOffset
- Int64
The offset at which to begin reading the source, in bytes.
- count
- Int64
The number of bytes to write
- destOffset
- 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
- Nullable<CancellationToken>
A CancellationToken to observe while waiting for a task to complete.
Returns
- Attributes