CloudFile.DownloadToStreamAsync Method (Stream, CancellationToken) (Microsoft.WindowsAzure.Storage.File)
From Microsoft Windows Azure Storage Blob
C#
C++
F#
VB
CloudFile.::..DownloadToStreamAsync Method (Stream, CancellationToken)(Stream^, CancellationToken)(Stream, CancellationToken)(Stream, CancellationToken)
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
Namespace:
Microsoft.WindowsAzure.Storage.File
Assembly:
Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Syntax
[DoesServiceRequestAttribute]
public virtual Task DownloadToStreamAsync(
Stream target,
CancellationToken cancellationToken
)
C++
public:
[DoesServiceRequestAttribute]
virtual Task^ DownloadToStreamAsync(
Stream^ target,
CancellationToken cancellationToken
)
[<DoesServiceRequestAttribute>]
abstract DownloadToStreamAsync :
target:Stream *
cancellationToken:CancellationToken -> Task
[<DoesServiceRequestAttribute>]
override DownloadToStreamAsync :
target:Stream *
cancellationToken:CancellationToken -> Task
<DoesServiceRequestAttribute>
Public Overridable Function DownloadToStreamAsync (
target As Stream,
cancellationToken As CancellationToken
) As Task
Parameters
- target
-
Type:
System.IO.StreamSystem.IO::Stream^System.IO.StreamSystem.IO.Stream
The target stream.
- cancellationToken
-
Type:
System.Threading.CancellationTokenSystem.Threading::CancellationTokenSystem.Threading.CancellationTokenSystem.Threading.CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Return Value
Type:
System.Threading.Tasks.TaskSystem.Threading.Tasks::Task^System.Threading.Tasks.TaskSystem.Threading.Tasks.TaskA Task object that represents the current operation.
Return to top
Returns a task that performs an asynchronous operation to download the contents of a file to a stream.
Syntax
[DoesServiceRequestAttribute] public virtual Task DownloadToStreamAsync( Stream target, CancellationToken cancellationToken )
C++
public: [DoesServiceRequestAttribute] virtual Task^ DownloadToStreamAsync( Stream^ target, CancellationToken cancellationToken )
[<DoesServiceRequestAttribute>] abstract DownloadToStreamAsync : target:Stream * cancellationToken:CancellationToken -> Task [<DoesServiceRequestAttribute>] override DownloadToStreamAsync : target:Stream * cancellationToken:CancellationToken -> Task
<DoesServiceRequestAttribute> Public Overridable Function DownloadToStreamAsync ( target As Stream, cancellationToken As CancellationToken ) As Task
Parameters
- target
-
Type:
System.IO.StreamSystem.IO::Stream^System.IO.StreamSystem.IO.Stream
The target stream.
- cancellationToken
-
Type:
System.Threading.CancellationTokenSystem.Threading::CancellationTokenSystem.Threading.CancellationTokenSystem.Threading.CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Return Value
Type: System.Threading.Tasks.TaskSystem.Threading.Tasks::Task^System.Threading.Tasks.TaskSystem.Threading.Tasks.TaskA Task object that represents the current operation.