SetCookieHeaderValue 類別

定義

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

public ref class SetCookieHeaderValue
public class SetCookieHeaderValue
type SetCookieHeaderValue = class
Public Class SetCookieHeaderValue
繼承
SetCookieHeaderValue

建構函式

SetCookieHeaderValue(String)

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

SetCookieHeaderValue(String, String)

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

SetCookieHeaderValue(StringSegment)

初始化 SetCookieHeaderValue 的新執行個體。

SetCookieHeaderValue(StringSegment, StringSegment)

初始化 SetCookieHeaderValue 的新執行個體。

屬性

Domain

取得或設定 Cookie 屬性的值 Domain

Domain 屬性會指定要傳送 Cookie 的主機。

Expires

取得或設定 Cookie 屬性的值 Expires

Expires 屬性會指出 Cookie 的最大存留期,以 Cookie 到期的日期和時程表示。

Extensions

取得要附加至 Cookie 之其他值的集合。

HttpOnly

取得或設定 Cookie 屬性的值 HttpOnly

HttpOnly 會指示使用者代理程式在透過「非 HTTP」API 提供 Cookie 的存取權時省略 Cookie (,例如將 Cookie 公開給腳本的網頁瀏覽器 API) 。

MaxAge

取得或設定 Cookie 屬性的值 Max-Age

Max-Age 屬性工作表示 Cookie 的最大存留期,表示為 Cookie 到期之前的秒數。

Name

取得或設定 Cookie 名稱。

Path

取得或設定 Cookie 屬性的值 Path

path 屬性會指定要傳送 Cookie 的主機。

SameSite

取得或設定 Cookie 屬性的值 SameSite

「SameSite」 Cookie 在嚴格模式部署時,以及在用戶端支援時,提供強固的防禦 CSRF 攻擊。

Secure

取得或設定 Cookie 屬性的值 Secure

Secure 屬性會將 Cookie 的範圍限制為「安全」通道。

Value

取得或設定 Cookie 值。

方法

AppendToStringBuilder(StringBuilder)

將這個 SetCookieHeaderValue 的字串表示附加至指定的 builder

Equals(Object)

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

GetHashCode()

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

Parse(String)

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

Parse(StringSegment)

剖析 inputSetCookieHeaderValue 值。

ParseList(IList<String>)

將輸入序列剖析為值序列 SetCookieHeaderValue

ParseStrictList(IList<String>)

使用字串剖析規則,將輸入序列剖析為值序列 SetCookieHeaderValue

ToString()

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

TryParse(String, SetCookieHeaderValue)

表示 Set-Cookie 標頭。

請參閱 http://tools.ietf.org/html/rfc6265 Set-Cookie 標頭規格。

TryParse(StringSegment, SetCookieHeaderValue)

嘗試將指定的 input 剖析為 SetCookieHeaderValue

TryParseList(IList<String>, IList<SetCookieHeaderValue>)

嘗試將值序列剖析為 的 SetCookieHeaderValue 序列。

TryParseStrictList(IList<String>, IList<SetCookieHeaderValue>)

嘗試使用字串剖析規則將值序列剖析為 序列 SetCookieHeaderValue

適用於