共用方式為


RequestPathBaseCookieBuilder.Build(HttpContext, DateTimeOffset) 方法

定義

如果未明確設定,則設定 Path

public:
 override Microsoft::AspNetCore::Http::CookieOptions ^ Build(Microsoft::AspNetCore::Http::HttpContext ^ context, DateTimeOffset expiresFrom);
public override Microsoft.AspNetCore.Http.CookieOptions Build (Microsoft.AspNetCore.Http.HttpContext context, DateTimeOffset expiresFrom);
override this.Build : Microsoft.AspNetCore.Http.HttpContext * DateTimeOffset -> Microsoft.AspNetCore.Http.CookieOptions
Public Overrides Function Build (context As HttpContext, expiresFrom As DateTimeOffset) As CookieOptions

參數

expiresFrom
DateTimeOffset

做為計算 Expires 基底的使用時間。

傳回

Cookie 選項。

適用於