Düzenle

Aracılığıyla paylaş


NSHttpCookie.CookieFromProperties(NSDictionary) Method

Definition

Factory method to create cookies.

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

Parameters

properties
NSDictionary

Dictionary with the cookie values.

Returns

Attributes

Remarks

To instantiate instances of NSHTTPCookie you need to pass an NSDictionary

The actual keys have to be one the public Key static fields from this class (KeyName, KeyValue, KeyOriginUrl, KeyVersion, KeyDomain, KeyPath, KeySecure, KeyExpires, KeyComment, KeyCommentUrl, KeyDiscard, KeyMaximumAge and KeyPort).


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

Applies to