IOwinResponse.WriteAsync Method
Writes information to a response asynchronously.
Namespace: Microsoft.Owin
Assembly: Microsoft.Owin (in Microsoft.Owin.dll)
Overload List
Name | Description | |
---|---|---|
WriteAsync(Byte[]) | Asynchronously writes the given bytes to the response body stream. |
|
WriteAsync(Byte[], CancellationToken) | Asynchronously writes the given bytes to the response body stream. |
|
WriteAsync(Byte[], Int32, Int32, CancellationToken) | Asynchronously writes the given bytes to the response body stream. |
|
WriteAsync(String) | Asynchronously writes the given text to the response body stream using UTF-8. |
|
WriteAsync(String, CancellationToken) | Asynchronously writes the given text to the response body stream using UTF-8. |
See Also
IOwinResponse Interface
Microsoft.Owin Namespace
Return to top
IOwinResponse.WriteAsync Method (Byte[])
Asynchronously writes the given bytes to the response body stream.
Syntax
Task WriteAsync(
byte[] data
)
Task^ WriteAsync(
array<unsigned char>^ data
)
abstract WriteAsync :
data:byte[] -> Task
Function WriteAsync (
data As Byte()
) As Task
Parameters
data
Type: System.Byte[]The response data.
Return Value
Type: System.Threading.Tasks.Task
A Task tracking the state of the write operation.
Return to top
IOwinResponse.WriteAsync Method (Byte[], CancellationToken)
Asynchronously writes the given bytes to the response body stream.
Syntax
Task WriteAsync(
byte[] data,
CancellationToken token
)
Task^ WriteAsync(
array<unsigned char>^ data,
CancellationToken token
)
abstract WriteAsync :
data:byte[] *
token:CancellationToken -> Task
Function WriteAsync (
data As Byte(),
token As CancellationToken
) As Task
Parameters
data
Type: System.Byte[]The response data.
token
Type: System.Threading.CancellationTokenA token used to indicate cancellation.
Return Value
Type: System.Threading.Tasks.Task
A Task tracking the state of the write operation.
Return to top
IOwinResponse.WriteAsync Method (Byte[], Int32, Int32, CancellationToken)
Asynchronously writes the given bytes to the response body stream.
Syntax
Task WriteAsync(
byte[] data,
int offset,
int count,
CancellationToken token
)
Task^ WriteAsync(
array<unsigned char>^ data,
int offset,
int count,
CancellationToken token
)
abstract WriteAsync :
data:byte[] *
offset:int *
count:int *
token:CancellationToken -> Task
Function WriteAsync (
data As Byte(),
offset As Integer,
count As Integer,
token As CancellationToken
) As Task
Parameters
data
Type: System.Byte[]The response data.
offset
Type: System.Int32The zero-based byte offset in the data parameter at which to begin copying bytes.
count
Type: System.Int32The number of bytes to write.
token
Type: System.Threading.CancellationTokenA token used to indicate cancellation.
Return Value
Type: System.Threading.Tasks.Task
A Task tracking the state of the write operation.
Return to top
IOwinResponse.WriteAsync Method (String)
Asynchronously writes the given text to the response body stream using UTF-8.
Syntax
Task WriteAsync(
string text
)
Task^ WriteAsync(
String^ text
)
abstract WriteAsync :
text:string -> Task
Function WriteAsync (
text As String
) As Task
Parameters
text
Type: System.StringThe response data.
Return Value
Type: System.Threading.Tasks.Task
A Task tracking the state of the write operation.
Return to top
IOwinResponse.WriteAsync Method (String, CancellationToken)
Asynchronously writes the given text to the response body stream using UTF-8.
Syntax
Task WriteAsync(
string text,
CancellationToken token
)
Task^ WriteAsync(
String^ text,
CancellationToken token
)
abstract WriteAsync :
text:string *
token:CancellationToken -> Task
Function WriteAsync (
text As String,
token As CancellationToken
) As Task
Parameters
text
Type: System.StringThe response data.
token
Type: System.Threading.CancellationTokenA token used to indicate cancellation.
Return Value
Type: System.Threading.Tasks.Task
A Task tracking the state of the write operation.
Return to top