Share via


CookieBuilder.Build Method

Definition

Overloads

Build(HttpContext)

Creates the cookie options from the given context.

Build(HttpContext, DateTimeOffset)

Creates the cookie options from the given context with an expiration based on expiresFrom and Expiration.

Build(HttpContext)

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

Creates the cookie options from the given context.

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

Parameters

context
HttpContext

The HttpContext.

Returns

The cookie options.

Applies to

Build(HttpContext, DateTimeOffset)

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

Creates the cookie options from the given context with an expiration based on expiresFrom and Expiration.

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

Parameters

context
HttpContext

The HttpContext.

expiresFrom
DateTimeOffset

The time to use as the base for computing Expires.

Returns

The cookie options.

Applies to