StaticFileOptions.OnPrepareResponse 屬性

定義

在設定狀態碼和標頭之後和寫入主體之前呼叫。 這可用來新增或變更回應標頭。

public:
 property Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ OnPrepareResponse { Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ get(); void set(Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ value); };
public Action<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext> OnPrepareResponse { get; set; }
member this.OnPrepareResponse : Action<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext> with get, set
Public Property OnPrepareResponse As Action(Of StaticFileResponseContext)

屬性值

備註

OnPrepareResponse 在 之前 OnPrepareResponseAsync 呼叫 。

適用於