IResponseCookies.Append 方法

定义

重载

Append(ReadOnlySpan<KeyValuePair<String,String>>, CookieOptions)

将指定集合的元素添加为 Cookie。

Append(String, String)

添加新的 Cookie 和值。

Append(String, String, CookieOptions)

添加新 Cookie。

Append(ReadOnlySpan<KeyValuePair<String,String>>, CookieOptions)

Source:
IResponseCookies.cs

将指定集合的元素添加为 Cookie。

public virtual void Append (ReadOnlySpan<System.Collections.Generic.KeyValuePair<string,string>> keyValuePairs, Microsoft.AspNetCore.Http.CookieOptions options);
abstract member Append : ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, string>> * Microsoft.AspNetCore.Http.CookieOptions -> unit
override this.Append : ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, string>> * Microsoft.AspNetCore.Http.CookieOptions -> unit
Public Overridable Sub Append (keyValuePairs As ReadOnlySpan(Of KeyValuePair(Of String, String)), options As CookieOptions)

参数

keyValuePairs
ReadOnlySpan<KeyValuePair<String,String>>

其元素将添加为 Cookie 的键值对集合。

options
CookieOptions

CookieOptions 包含在新的 Cookie 设置中。

适用于

Append(String, String)

Source:
IResponseCookies.cs

添加新的 Cookie 和值。

public:
 void Append(System::String ^ key, System::String ^ value);
public void Append (string key, string value);
abstract member Append : string * string -> unit
Public Sub Append (key As String, value As String)

参数

key
String

新 Cookie 的名称。

value
String

新 Cookie 的值。

适用于

Append(String, String, CookieOptions)

Source:
IResponseCookies.cs

添加新 Cookie。

public:
 void Append(System::String ^ key, System::String ^ value, Microsoft::AspNetCore::Http::CookieOptions ^ options);
public void Append (string key, string value, Microsoft.AspNetCore.Http.CookieOptions options);
abstract member Append : string * string * Microsoft.AspNetCore.Http.CookieOptions -> unit
Public Sub Append (key As String, value As String, options As CookieOptions)

参数

key
String

新 Cookie 的名称。

value
String

新 Cookie 的值。

options
CookieOptions

CookieOptions 包含在新的 Cookie 设置中。

适用于