NSHttpCookie.CookieFromProperties(NSDictionary) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);