OwinResponse.WriteAsync Method

 

Writes information to a response asynchronously.

Namespace:   Microsoft.Owin
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)

Overload List

Name Description
System_CAPS_pubmethod WriteAsync(Byte[])

Asynchronously writes the given bytes to the response body stream.

System_CAPS_pubmethod WriteAsync(Byte[], CancellationToken)

Asynchronously writes the given bytes to the response body stream.

System_CAPS_pubmethod WriteAsync(Byte[], Int32, Int32, CancellationToken)

Asynchronously writes the given bytes to the response body stream.

System_CAPS_pubmethod WriteAsync(String)

Asynchronously writes the given text to the response body stream using UTF-8.

System_CAPS_pubmethod 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

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

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

  • offset
    Type: System.Int32

    The zero-based byte offset in the data parameter at which to begin copying bytes.

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

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

Return Value

Type: System.Threading.Tasks.Task

A Task tracking the state of the write operation.

Implements

IOwinResponse.WriteAsync(String, CancellationToken)

Return to top