Mac Guides | Samples

MonoMac.Foundation.NSHttpCookie Class

HTTP Cookie

See Also: NSHttpCookie

Syntax

[MonoMac.Foundation.Register("NSHTTPCookie", true)]
public class NSHttpCookie : NSObject

Remarks

To instantiate instances of NSHTTPCookie you need to pass an NSDictionary to either the NSHttpCookie constructor or the NSHttpCookie.CookieFromProperties method.

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

The members of MonoMac.Foundation.NSHttpCookie are listed below.

See Also: NSObject

Public Constructors

A constructor that initializes the object from the data stored in the unarchiver object.
Creates a new NSHttpCookie
Constructor to call on derived classes when the derived class has an [Export] constructor.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Create a new cookie from the supplied System.Net.Cookie instance properties
Create a new cookie with the supplied name and value.
Create a new cookie with the supplied name, value and path.
Create a new cookie with the supplied name, value, path and domain.

Public Fields

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
CommentString.
[read-only]
CommentUrlNSUrl.
[read-only]
DomainString.
[read-only]
ExpiresDateNSDate.
[read-only]
IsHttpOnlyBoolean.
[read-only]
IsSecureBoolean.
[read-only]
IsSessionOnlyBoolean.
[read-only]
NameString.
[read-only]
PathString.
[read-only]
PortListNSNumber[].
[read-only]
PropertiesNSDictionary.
[read-only]
ValueString.
[read-only]
VersionUInt32.

Public Methods

Protected Methods

override
Dispose(Boolean)
Releases the resourced used by the NSHttpCookie object.