CookieBuilder.Build 方法

定义

重载

Build(HttpContext)

从给定 context的 创建 Cookie 选项。

Build(HttpContext, DateTimeOffset)

从给定 context 的 创建 Cookie 选项,其过期时间基于 expiresFromExpiration

Build(HttpContext)

Source:
CookieBuilder.cs
Source:
CookieBuilder.cs
Source:
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)

Source:
CookieBuilder.cs
Source:
CookieBuilder.cs
Source:
CookieBuilder.cs

从给定 context 的 创建 Cookie 选项,其过期时间基于 expiresFromExpiration

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 选项。

适用于