System::Net::Cookie class

Represents an HTTP cookie. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class Cookie : public System::Object

Methods

MethodDescription
Clone()Creates a copy of the current instance.
Cookie()Constructs a new instance.
Cookie(String, String)Constructs a new instance.
Cookie(String, String, String)Constructs a new instance.
Cookie(String, String, String, String)Constructs a new instance.
Equals(System::SharedPtr<Object>) overrideCompares objects using C# Object.Equals semantics.
get_Comment() constGets the ‘Comment’ attribute’s value.
get_CommentUri() constGets the ‘CommentURL’ attribute’s value.
get_Discard() constGets the ‘Discard’ attribute’s value.
get_Domain() constGets the ‘Domain’ attribute’s value.
get_DomainImplicit()Gets a value that indicates if the domain is implicit.
get_DomainKey() constReturns the domain key.
get_Expired()Gets a value that indicates if the cookie expired.
get_Expires()Gets the ‘Expires’ attribute’s value.
get_HttpOnly() constGets the ‘HttpOnly’ attribute’s value.
get_Name() constGets the cookie’s name.
get_Path() constGets the ‘Path’ attribute’s value.
get_Plain() constReturns a value that indicates if the cookie specification is ‘Plain’.
get_Port() constGets the ‘Port’ attribute’s value.
get_PortList() constReturns the collection of the ‘Port’ attribute’s values.
get_Secure() constGets the ‘Secure’ attribute’s value.
get_TimeStamp() constReturns the time when the cookie was created.
get_Value() constGets the cookie’s’value.
get_Variant() constGets the cookie’s specification.
get_Version() constGets the ‘Version’ attribute’s value.
GetHashCode() const overrideAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
InternalSetName(String)This method is called by other methods to set a method name.
set_Comment(String)Sets the ‘Comment’ attribute’s value.
set_CommentUri(System::SharedPtr<Uri>)Sets the ‘CommentURL’ attribute’s value.
set_Discard(bool)Sets the ‘Discard’ attribute’s value.
set_Domain(String)Sets the ‘Domain’ attribute’s value.
set_DomainImplicit(bool)Sets a value that indicates if the domain is implicit.
set_Expired(bool)Sets a value that indicates if the cookie expired.
set_Expires(DateTime)Sets the ‘Expires’ attribute’s value.
set_HttpOnly(bool)Sets the ‘HttpOnly’ attribute’s value.
set_Name(String)Sets the cookie’s name.
set_Path(String)Sets the ‘Path’ attribute’s value.
set_Port(String)Sets the ‘Port’ attribute’s value.
set_Secure(bool)Sets the ‘Secure’ attribute’s value.
set_Value(String)Sets the cookie’s value.
set_Variant(CookieVariant)Sets the cookie’s specification.
set_Version(int32_t)Sets the ‘Version’ attribute’s value.
ToServerString()Serializes the current instance to the string representation.
ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.
VerifySetDefaults(CookieVariant, System::SharedPtr<Uri>, bool, String, bool, bool)Verifies and sets the default attribute’s values.

Fields

FieldDescription
static CommentAttributeNameThe ‘Comment’ attribute’s name.
static CommentUrlAttributeNameThe ‘CommentURL’ attribute’s name.
static DiscardAttributeNameThe ‘Discard’ attribute’s name.
static DomainAttributeNameThe ‘Domain’ attribute’s name.
static EqualsLiteralThe separator that is used to separates the name and value of an attribute.
static ExpiresAttributeNameThe ‘Expires’ attribute’s name.
static HttpOnlyAttributeNameThe ‘HttpOnly’ attribute’s name.
IsQuotedDomainA value that indicates if the domain is wrapped in the quotes.
IsQuotedVersionA value that indicates if the version is wrapped in the quotes.
static MaxAgeAttributeNameThe ‘Max-Age’ attribute’s name.
static MaxSupportedVersionRTTI information.
static MaxSupportedVersionStringThe string representation of the maximum supported version.
static PathAttributeNameThe ‘Path’ attribute’s name.
static PortAttributeNameThe ‘Port’ attribute’s name.
static PortSplitDelimitersThe array that contains delimiters for the ‘Port’ attribute’s values.
static QuotesLiteralThe symbol used to wrap the attribute’s parts.
static ReservedToNameA value that is reserved for the cookie name.
static ReservedToValueA value that is reserved for the cookie value.
static SecureAttributeNameThe ‘Secure’ attribute’s name.
static SeparatorLiteralThe attribute separator.
static SpecialAttributeLiteralThe prefix of the special attributes’ names.
static VersionAttributeNameThe ‘Version’ attribute’s name.

See Also