Share via


TypedResults.Bytes Método

Definição

Sobrecargas

Bytes(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Grava o conteúdo da matriz de bytes na resposta.

Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

Essa API é um alias para File(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue).

Bytes(ReadOnlyMemory<Byte>, String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Grava o conteúdo da matriz de bytes na resposta.

Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

Bytes(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Grava o conteúdo da matriz de bytes na resposta.

Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

Essa API é um alias para File(Byte[], String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue).

public static Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult Bytes (byte[] contents, string? contentType = default, string? fileDownloadName = default, bool enableRangeProcessing = false, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default);
static member Bytes : byte[] * string * string * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult
Public Shared Function Bytes (contents As Byte(), Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional enableRangeProcessing As Boolean = false, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing) As FileContentHttpResult

Parâmetros

contents
Byte[]

O conteúdo do arquivo.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

Retornos

O criado FileContentHttpResult para a resposta.

Aplica-se a

Bytes(ReadOnlyMemory<Byte>, String, String, Boolean, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Grava o conteúdo da matriz de bytes na resposta.

Isso dá suporte a solicitações de intervalo (Status206PartialContent ou Status416RangeNotSatisfiable se o intervalo não for satisfiável).

public static Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult Bytes (ReadOnlyMemory<byte> contents, string? contentType = default, string? fileDownloadName = default, bool enableRangeProcessing = false, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? entityTag = default);
static member Bytes : ReadOnlyMemory<byte> * string * string * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> Microsoft.AspNetCore.Http.HttpResults.FileContentHttpResult
Public Shared Function Bytes (contents As ReadOnlyMemory(Of Byte), Optional contentType As String = Nothing, Optional fileDownloadName As String = Nothing, Optional enableRangeProcessing As Boolean = false, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional entityTag As EntityTagHeaderValue = Nothing) As FileContentHttpResult

Parâmetros

contents
ReadOnlyMemory<Byte>

O conteúdo do arquivo.

contentType
String

O Tipo de Conteúdo do arquivo.

fileDownloadName
String

O nome do arquivo sugerido.

enableRangeProcessing
Boolean

Defina como true para habilitar o processamento de solicitações de intervalo.

lastModified
Nullable<DateTimeOffset>

O DateTimeOffset de quando o arquivo foi modificado pela última vez.

entityTag
EntityTagHeaderValue

O EntityTagHeaderValue associado ao arquivo.

Retornos

O criado FileContentHttpResult para a resposta.

Aplica-se a