Поділитися через


SendFileResponseExtensions.SendFileAsync Method

 

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

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static SendFileAsync(IOwinResponse, String)

Sends the given file using the SendFile extension.

System_CAPS_pubmethodSystem_CAPS_static SendFileAsync(IOwinResponse, String, Int64, Nullable<Int64>, CancellationToken)

Sends the given file using the SendFile extension.

See Also

SendFileResponseExtensions Class
Microsoft.Owin Namespace

Return to top

SendFileResponseExtensions.SendFileAsync Method (IOwinResponse, String)

Sends the given file using the SendFile extension.

Syntax

public static Task SendFileAsync(
    this IOwinResponse response,
    string fileName
)
public:
[ExtensionAttribute]
static Task^ SendFileAsync(
    IOwinResponse^ response,
    String^ fileName
)
static member SendFileAsync : 
        response:IOwinResponse *
        fileName:string -> Task
<ExtensionAttribute>
Public Shared Function SendFileAsync (
    response As IOwinResponse,
    fileName As String
) As Task

Parameters

Return Value

Type: System.Threading.Tasks.Task

Returns Task.

Return to top

SendFileResponseExtensions.SendFileAsync Method (IOwinResponse, String, Int64, Nullable<Int64>, CancellationToken)

Sends the given file using the SendFile extension.

Syntax

public static Task SendFileAsync(
    this IOwinResponse response,
    string fileName,
    long offset,
    Nullable<long> count,
    CancellationToken cancellationToken
)
public:
[ExtensionAttribute]
static Task^ SendFileAsync(
    IOwinResponse^ response,
    String^ fileName,
    long long offset,
    Nullable<long long> count,
    CancellationToken cancellationToken
)
static member SendFileAsync : 
        response:IOwinResponse *
        fileName:string *
        offset:int64 *
        count:Nullable<int64> *
        cancellationToken:CancellationToken -> Task
<ExtensionAttribute>
Public Shared Function SendFileAsync (
    response As IOwinResponse,
    fileName As String,
    offset As Long,
    count As Nullable(Of Long),
    cancellationToken As CancellationToken
) As Task

Parameters

  • fileName
    Type: System.String

    The full or relative path to the file.

  • count
    Type: System.Nullable<Int64>

    The number of types to send, or null to send the remainder of the file.

Return Value

Type: System.Threading.Tasks.Task

Returns Task.

Return to top