Results.Stream 메서드

정의

오버로드

Stream(Func<Stream,Task>, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

응답 본문에 직접 쓸 수 있습니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

Stream(PipeReader, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

지정된 PipeReader 의 내용을 응답에 씁니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

Stream(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

지정된 Stream 를 응답에 씁니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

이 API는 의 별칭 File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)입니다.

Stream(Func<Stream,Task>, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

응답 본문에 직접 쓸 수 있습니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

public static Microsoft.AspNetCore.Http.IResult Stream (Func<System.IO.Stream,System.Threading.Tasks.Task> streamWriterCallback, string? contentType = default, string? fileDownloadName = default, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default);
static member Stream : Func<System.IO.Stream, System.Threading.Tasks.Task> * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Stream (streamWriterCallback As Func(Of Stream, Task), Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing) As IResult

매개 변수

streamWriterCallback
Func<Stream,Task>

사용자가 응답 본문에 직접 쓸 수 있는 콜백입니다.

contentType
String

응답의 Content-Type입니다. 기본값은 application/octet-stream입니다.

fileDownloadName
String

헤더에 사용할 파일 이름입니다 Content-Disposition .

lastModified
Nullable<DateTimeOffset>

DateTimeOffset 파일이 마지막으로 수정된 시기의 입니다. 응답 헤더를 Last-Modified 구성하고 조건부 범위 요청을 수행하는 데 사용됩니다.

entityTag
EntityTagHeaderValue

EntityTagHeaderValue 응답 헤더를 ETag 구성하고 조건부 요청을 수행할 입니다.

반환

응답에 대해 만들어진 IResult 입니다.

적용 대상

Stream(PipeReader, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

지정된 PipeReader 의 내용을 응답에 씁니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

public static Microsoft.AspNetCore.Http.IResult Stream (System.IO.Pipelines.PipeReader pipeReader, string? contentType = default, string? fileDownloadName = default, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default, bool enableRangeProcessing = false);
static member Stream : System.IO.Pipelines.PipeReader * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Stream (pipeReader As PipeReader, Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing, Optional enableRangeProcessing As Boolean = false) As IResult

매개 변수

pipeReader
PipeReader

PipeReader 응답에 쓸 입니다.

contentType
String

응답의 Content-Type입니다. 기본값은 application/octet-stream입니다.

fileDownloadName
String

헤더에 사용할 파일 이름입니다 Content-Disposition .

lastModified
Nullable<DateTimeOffset>

DateTimeOffset 파일이 마지막으로 수정된 시기의 입니다. 응답 헤더를 Last-Modified 구성하고 조건부 범위 요청을 수행하는 데 사용됩니다.

entityTag
EntityTagHeaderValue

EntityTagHeaderValue 응답 헤더를 ETag 구성하고 조건부 요청을 수행할 입니다.

enableRangeProcessing
Boolean

범위 요청 처리를 사용하도록 설정하려면 로 true 설정합니다.

반환

응답에 대해 만들어진 IResult 입니다.

설명

pipeReader 응답이 전송된 후 매개 변수가 완료됩니다.

적용 대상

Stream(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

지정된 Stream 를 응답에 씁니다.

범위 요청(Status206PartialContent 또는 Status416RangeNotSatisfiable 범위가 만족스럽지 않은 경우)을 지원합니다.

이 API는 의 별칭 File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)입니다.

public static Microsoft.AspNetCore.Http.IResult Stream (System.IO.Stream stream, string? contentType = default, string? fileDownloadName = default, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default, bool enableRangeProcessing = false);
static member Stream : System.IO.Stream * string * string * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue * bool -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Stream (stream As Stream, Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing, Optional enableRangeProcessing As Boolean = false) As IResult

매개 변수

stream
Stream

Stream 응답에 쓸 입니다.

contentType
String

응답의 Content-Type입니다. 기본값은 application/octet-stream입니다.

fileDownloadName
String

헤더에 사용할 파일 이름입니다 Content-Disposition .

lastModified
Nullable<DateTimeOffset>

DateTimeOffset 파일이 마지막으로 수정된 시기의 입니다. 응답 헤더를 Last-Modified 구성하고 조건부 범위 요청을 수행하는 데 사용됩니다.

entityTag
EntityTagHeaderValue

EntityTagHeaderValue 응답 헤더를 ETag 구성하고 조건부 요청을 수행할 입니다.

enableRangeProcessing
Boolean

범위 요청 처리를 사용하도록 설정하려면 로 true 설정합니다.

반환

응답에 대해 만들어진 IResult 입니다.

설명

stream 응답이 전송된 후 매개 변수가 삭제됩니다.

적용 대상