Partager via


FileResultExecutorBase.SetHeadersAndLog Méthode

Définition

Définit etag et les derniers en-têtes modifiés.

protected virtual (Microsoft.Net.Http.Headers.RangeItemHeaderValue range, long rangeLength, bool serveBody) SetHeadersAndLog (Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileResult result, long? fileLength, bool enableRangeProcessing, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue etag = default);
protected virtual (Microsoft.Net.Http.Headers.RangeItemHeaderValue? range, long rangeLength, bool serveBody) SetHeadersAndLog (Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileResult result, long? fileLength, bool enableRangeProcessing, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? etag = default);
abstract member SetHeadersAndLog : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.FileResult * Nullable<int64> * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> ValueTuple<Microsoft.Net.Http.Headers.RangeItemHeaderValue, int64, bool>
override this.SetHeadersAndLog : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.FileResult * Nullable<int64> * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> ValueTuple<Microsoft.Net.Http.Headers.RangeItemHeaderValue, int64, bool>
Protected Overridable Function SetHeadersAndLog (context As ActionContext, result As FileResult, fileLength As Nullable(Of Long), enableRangeProcessing As Boolean, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional etag As EntityTagHeaderValue = Nothing) As ValueTuple(Of RangeItemHeaderValue, Long, Boolean)

Paramètres

context
ActionContext

L’ActionContextopérateur

result
FileResult

L’FileResultopérateur

fileLength
Nullable<Int64>

Longueur de fichier nullable.

enableRangeProcessing
Boolean

Indique si le traitement de plage est activé.

lastModified
Nullable<DateTimeOffset>

Date lastModified nullable.

Retours

Un tuple avec la portée, la RangeItemHeaderValue longueur, et si le corps a été servi.

S’applique à