共用方式為


NSHttpCookie.CookieFromProperties(NSDictionary) 方法

定義

用來建立 Cookie 的 Factory 方法。

[Foundation.Export("cookieWithProperties:")]
public static Foundation.NSHttpCookie CookieFromProperties (Foundation.NSDictionary properties);
static member CookieFromProperties : Foundation.NSDictionary -> Foundation.NSHttpCookie

參數

properties
NSDictionary

具有 Cookie 值的字典。

傳回

屬性

備註

若要具現化 NSHTTPCookie 的實例,您需要傳遞 NSDictionary

實際的索引鍵必須是這個類別的公開金鑰靜態欄位之一, (、、、 KeyDomainKeyPathKeyCommentKeyExpiresKeyCommentUrlKeyVersionKeySecureKeyOriginUrlKeyMaximumAgeKeyDiscardKeyPort) 。 KeyValueKeyName


var properties = NSDictionary.FromObjectsAndKeys (new object [] { "MyCookieValue" }, new object [] { NSHttpCookie.KeyValue });
var cookie = new NSHttpCookie (properties);

適用於