Mac Guides | Samples

MonoMac.Foundation.NSHttpCookie Constructor

Creates a new NSHttpCookie

Syntax

[MonoMac.Foundation.Export("initWithProperties:")]
public NSHttpCookie (NSDictionary properties)

Parameters

properties
Dictionary with the cookie values.

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 (NSHttpCookie.KeyName, NSHttpCookie.KeyValue, NSHttpCookie.KeyOriginURL, NSHttpCookie.KeyVersion, NSHttpCookie.KeyDomain, NSHttpCookie.KeyPath, NSHttpCookie.KeySecure, NSHttpCookie.KeyExpires, NSHttpCookie.KeyComment, NSHttpCookie.KeyCommentURL, NSHttpCookie.KeyDiscard, NSHttpCookie.KeyMaximumAge and NSHttpCookie.KeyPort).

c# Example

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

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0