OwinResponse.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
OwinResponse Class
Microsoft.Owin Namespace
Return to top
OwinResponse.WriteAsync Method (Byte[])
Asynchronously writes the given bytes to the response body stream.
Syntax
public virtual Task WriteAsync(
byte[] data
)
public:
virtual Task^ WriteAsync(
array<unsigned char>^ data
)
abstract WriteAsync :
data:byte[] -> Task
override WriteAsync :
data:byte[] -> Task
Public Overridable 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.
Implements
IOwinResponse.WriteAsync(Byte[])
Return to top
OwinResponse.WriteAsync Method (Byte[], CancellationToken)
Asynchronously writes the given bytes to the response body stream.
Syntax
public virtual Task WriteAsync(
byte[] data,
CancellationToken token
)
public:
virtual Task^ WriteAsync(
array<unsigned char>^ data,
CancellationToken token
)
abstract WriteAsync :
data:byte[] *
token:CancellationToken -> Task
override WriteAsync :
data:byte[] *
token:CancellationToken -> Task
Public Overridable 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.
Implements
IOwinResponse.WriteAsync(Byte[], CancellationToken)
Return to top
OwinResponse.WriteAsync Method (Byte[], Int32, Int32, CancellationToken)
Asynchronously writes the given bytes to the response body stream.
Syntax
public virtual Task WriteAsync(
byte[] data,
int offset,
int count,
CancellationToken token
)
public:
virtual Task^ WriteAsync(
array<unsigned char>^ data,
int offset,
int count,
CancellationToken token
)
abstract WriteAsync :
data:byte[] *
offset:int *
count:int *
token:CancellationToken -> Task
override WriteAsync :
data:byte[] *
offset:int *
count:int *
token:CancellationToken -> Task
Public Overridable 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.
Implements
IOwinResponse.WriteAsync(Byte[], Int32, Int32, CancellationToken)
Return to top
OwinResponse.WriteAsync Method (String)
Asynchronously writes the given text to the response body stream using UTF-8.
Syntax
public virtual Task WriteAsync(
string text
)
public:
virtual Task^ WriteAsync(
String^ text
)
abstract WriteAsync :
text:string -> Task
override WriteAsync :
text:string -> Task
Public Overridable 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.
Implements
IOwinResponse.WriteAsync(String)
Return to top
OwinResponse.WriteAsync Method (String, CancellationToken)
Asynchronously writes the given text to the response body stream using UTF-8.
Syntax
public virtual Task WriteAsync(
string text,
CancellationToken token
)
public:
virtual Task^ WriteAsync(
String^ text,
CancellationToken token
)
abstract WriteAsync :
text:string *
token:CancellationToken -> Task
override WriteAsync :
text:string *
token:CancellationToken -> Task
Public Overridable 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.
Implements
IOwinResponse.WriteAsync(String, CancellationToken)
Return to top