共用方式為


CookieBuilder.Build 方法

定義

多載

Build(HttpContext)

從指定的 context 建立 Cookie 選項。

Build(HttpContext, DateTimeOffset)

根據 和 Expiration ,從指定的 context 建立 Cookie 選項,並具有到期日 expiresFrom

Build(HttpContext)

來源:
CookieBuilder.cs
來源:
CookieBuilder.cs
來源:
CookieBuilder.cs

從指定的 context 建立 Cookie 選項。

public:
 Microsoft::AspNetCore::Http::CookieOptions ^ Build(Microsoft::AspNetCore::Http::HttpContext ^ context);
public Microsoft.AspNetCore.Http.CookieOptions Build (Microsoft.AspNetCore.Http.HttpContext context);
member this.Build : Microsoft.AspNetCore.Http.HttpContext -> Microsoft.AspNetCore.Http.CookieOptions
Public Function Build (context As HttpContext) As CookieOptions

參數

傳回

Cookie 選項。

適用於

Build(HttpContext, DateTimeOffset)

來源:
CookieBuilder.cs
來源:
CookieBuilder.cs
來源:
CookieBuilder.cs

根據 和 Expiration ,從指定的 context 建立 Cookie 選項,並具有到期日 expiresFrom

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

參數

expiresFrom
DateTimeOffset

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

傳回

Cookie 選項。

適用於