SendFileResponseExtensions.SendFileAsync Method
Namespace: Microsoft.Owin
Assembly: Microsoft.Owin.StaticFiles (in Microsoft.Owin.StaticFiles.dll)
Overload List
Name | Description | |
---|---|---|
SendFileAsync(IOwinResponse, String) | Sends the given file using the SendFile extension. |
|
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
- response
Type: Microsoft.Owin.IOwinResponse
- fileName
Type: System.String
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
- response
Type: Microsoft.Owin.IOwinResponse
fileName
Type: System.StringThe full or relative path to the file.
offset
Type: System.Int64The offset in the file.
count
Type: System.Nullable<Int64>The number of types to send, or null to send the remainder of the file.
- cancellationToken
Type: System.Threading.CancellationToken
Return Value
Type: System.Threading.Tasks.Task
Returns Task.
Return to top