Condividi tramite


FileResultExecutorBase.SetHeadersAndLog Metodo

Definizione

Imposta etag e ultime intestazioni modificate.

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)

Parametri

context
ActionContext

Oggetto ActionContext.

result
FileResult

Oggetto FileResult.

fileLength
Nullable<Int64>

Lunghezza del file nullable.

enableRangeProcessing
Boolean

Indica se l'elaborazione dell'intervallo è abilitata.

lastModified
Nullable<DateTimeOffset>

Data dell'ultima modifica nullable.

Restituisce

Tupla con l'intervallo, la RangeItemHeaderValue lunghezza e se il corpo è stato servito.

Si applica a