IResumableUploadWriteStreamAsync Method 
IT Hit WebDAV Classes Reference 
            Saves files's partial content to WebDAV server.
            
 
    Namespace: 
   ITHit.WebDAV.Client
    Assembly:
   ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 6.0.4052-Beta
 Syntax
SyntaxTask WriteStreamAsync(
	Func<Stream, Task> onStreamAvailable,
	long startIndex,
	long contentLength,
	long resourceTotalSize,
	string contentType = null,
	LockUriTokenPair[] lockTokens = null,
	IDictionary<string, string> headers = null,
	CancellationToken cancellationToken = null
)
Function WriteStreamAsync ( 
	onStreamAvailable As Func(Of Stream, Task),
	startIndex As Long,
	contentLength As Long,
	resourceTotalSize As Long,
	Optional contentType As String = Nothing,
	Optional lockTokens As LockUriTokenPair() = Nothing,
	Optional headers As IDictionary(Of String, String) = Nothing,
	Optional cancellationToken As CancellationToken = Nothing
) As Task
Task^ WriteStreamAsync(
	Func<Stream^, Task^>^ onStreamAvailable, 
	long long startIndex, 
	long long contentLength, 
	long long resourceTotalSize, 
	String^ contentType = nullptr, 
	array<LockUriTokenPair^>^ lockTokens = nullptr, 
	IDictionary<String^, String^>^ headers = nullptr, 
	CancellationToken cancellationToken = nullptr
)
abstract WriteStreamAsync : 
        onStreamAvailable : Func<Stream, Task> * 
        startIndex : int64 * 
        contentLength : int64 * 
        resourceTotalSize : int64 * 
        ?contentType : string * 
        ?lockTokens : LockUriTokenPair[] * 
        ?headers : IDictionary<string, string> * 
        ?cancellationToken : CancellationToken 
(* Defaults:
        let _contentType = defaultArg contentType null
        let _lockTokens = defaultArg lockTokens null
        let _headers = defaultArg headers null
        let _cancellationToken = defaultArg cancellationToken null
*)
-> Task 
Parameters
- onStreamAvailable
- Type: SystemFuncStream, Task
 Function to write to request stream.
- startIndex
- Type: SystemInt64
 Index to the first byte in the file content to be set by the request.
- contentLength
- Type: SystemInt64
 Length of data to be written.
- resourceTotalSize
- Type: SystemInt64
 Total size of the resource content.
- contentType (Optional)
- Type: SystemString
 Media type of the file.
- lockTokens (Optional)
- Type: ITHit.WebDAV.ClientLockUriTokenPair
 Lock tokens for this file.
- headers (Optional)
- Type: System.Collections.GenericIDictionaryString, String
 Request headers.
- cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
 Propagates notification that operations should be canceled.
Return Value
Type: 
Task[Missing <returns> documentation for "M:ITHit.WebDAV.Client.IResumableUpload.WriteStreamAsync(System.Func{System.IO.Stream,System.Threading.Tasks.Task},System.Int64,System.Int64,System.Int64,System.String,ITHit.WebDAV.Client.LockUriTokenPair[],System.Collections.Generic.IDictionary{System.String,System.String},System.Threading.CancellationToken)"]
 Exceptions
Exceptions Remarks
Remarks
            This method issues a PUT request and appends Content-Range header of the form Content-Range: bytes 21010-35145/47022 if necessary.
            
            It will attach Content-Range: bytes XXX-XXX/XXX header only if partial content is submitted. You can always use this method instead of IItemContent.GetWriteStream as Content-Range header is not attached if you upload entire file.
            
            To upload partial content to IT Hit WebDAV Server Engine you must implement ITHit.WebDAV.Server.ResumableUpload.IResumableUpload interface on server items.
            
 See Also
See Also