4#include <system/array.h>
5#include <system/collections/icomparer.h>
6#include <system/date_time.h>
7#include <system/object.h>
8#include <system/shared_ptr.h>
9#include <system/string.h>
10#include <system/uri.h>
12namespace System {
namespace Net {
41 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
43 ASPOSECPP_SHARED_RTTI_INFO_DECL();
230 bool setDefault,
bool shouldThrow);
255 bool _domainImplicit;
285 String get__Domain()
const;
294 String get__Version()
const;
300 static bool IsDomainEqualToHost(
String domain,
String host);
304 static bool DomainCharsTest(
String name);
307 static struct __StaticConstructor__
309 __StaticConstructor__();
325 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
327 ASPOSECPP_SHARED_RTTI_INFO_DECL();
347 MEMBER_FUNCTION_MAKE_OBJECT(
CookieComparer, CODEPORTING_ARGS(), CODEPORTING_ARGS());
350class CookieTokenizer;
364 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
366 ASPOSECPP_SHARED_RTTI_INFO_DECL();
Interface that compares two objects in greater-equal-less sense. Objects of this class should only be...
Definition: icomparer.h:20
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Used to compare the Cookie class instances. Objects of this class should only be allocated using Syst...
Definition: cookie.h:318
static System::SharedPtr< CookieComparer > get_Instance()
A 'singleton' implementation. Always returns the same instance of this class.
int Compare(args_type left, args_type right) const override
Compares the specified objects.
Represents an HTTP cookie. Objects of this class should only be allocated using System::MakeObject() ...
Definition: cookie.h:34
void set_Secure(bool value)
Sets the 'Secure' attribute's value.
static const String SecureAttributeName
The 'Secure' attribute's name.
Definition: cookie.h:67
bool get_Plain() const
Returns a value that indicates if the cookie specification is 'Plain'.
static const String MaxSupportedVersionString
The string representation of the maximum supported version.
Definition: cookie.h:49
DateTime get_TimeStamp() const
Returns the time when the cookie was created.
bool IsQuotedVersion
A value that indicates if the version is wrapped in the quotes.
Definition: cookie.h:87
void set_Variant(CookieVariant value)
Sets the cookie's specification.
void set_Port(String value)
Sets the 'Port' attribute's value.
static const String EqualsLiteral
The separator that is used to separates the name and value of an attribute.
Definition: cookie.h:75
System::ArrayPtr< int32_t > get_PortList() const
Returns the collection of the 'Port' attribute's values.
static const int32_t MaxSupportedVersion
The maximum supported version.
Definition: cookie.h:47
static const String DiscardAttributeName
The 'Discard' attribute's name.
Definition: cookie.h:55
static System::ArrayPtr< char16_t > ReservedToValue
A value that is reserved for the cookie value.
Definition: cookie.h:85
void set_CommentUri(System::SharedPtr< Uri > value)
Sets the 'CommentURL' attribute's value.
bool InternalSetName(String value)
This method is called by other methods to set a method name.
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
DateTime get_Expires()
Gets the 'Expires' attribute's value.
bool get_HttpOnly() const
Gets the 'HttpOnly' attribute's value.
String get_DomainKey() const
Returns the domain key.
void set_DomainImplicit(bool value)
Sets a value that indicates if the domain is implicit.
void set_Discard(bool value)
Sets the 'Discard' attribute's value.
static const String ExpiresAttributeName
The 'Expires' attribute's name.
Definition: cookie.h:59
static const String MaxAgeAttributeName
The 'Max-Age' attribute's name.
Definition: cookie.h:61
bool IsQuotedDomain
A value that indicates if the domain is wrapped in the quotes.
Definition: cookie.h:89
void set_Comment(String value)
Sets the 'Comment' attribute's value.
static const String VersionAttributeName
The 'Version' attribute's name.
Definition: cookie.h:69
String get_Port() const
Gets the 'Port' attribute's value.
String get_Path() const
Gets the 'Path' attribute's value.
static const String CommentUrlAttributeName
The 'CommentURL' attribute's name.
Definition: cookie.h:53
void set_Domain(String value)
Sets the 'Domain' attribute's value.
bool Equals(System::SharedPtr< Object > comparand) override
Compares objects using C# Object.Equals semantics.
CookieVariant get_Variant() const
Gets the cookie's specification.
static const String PortAttributeName
The 'Port' attribute's name.
Definition: cookie.h:65
Cookie(String name, String value)
Constructs a new instance.
bool get_Expired()
Gets a value that indicates if the cookie expired.
void set_Expires(DateTime value)
Sets the 'Expires' attribute's value.
static const String DomainAttributeName
The 'Domain' attribute's name.
Definition: cookie.h:57
void set_Name(String value)
Sets the cookie's name.
Cookie(String name, String value, String path)
Constructs a new instance.
String get_Comment() const
Gets the 'Comment' attribute's value.
void set_Path(String value)
Sets the 'Path' attribute's value.
int32_t get_Version() const
Gets the 'Version' attribute's value.
String get_Domain() const
Gets the 'Domain' attribute's value.
static const String QuotesLiteral
The symbol used to wrap the attribute's parts.
Definition: cookie.h:77
String get_Name() const
Gets the cookie's name.
void set_HttpOnly(bool value)
Sets the 'HttpOnly' attribute's value.
System::SharedPtr< Cookie > Clone()
Creates a copy of the current instance.
bool get_DomainImplicit()
Gets a value that indicates if the domain is implicit.
Cookie(String name, String value, String path, String domain)
Constructs a new instance.
static const String HttpOnlyAttributeName
The 'HttpOnly' attribute's name.
Definition: cookie.h:71
static System::ArrayPtr< char16_t > PortSplitDelimiters
The array that contains delimiters for the 'Port' attribute's values.
Definition: cookie.h:81
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
bool get_Discard() const
Gets the 'Discard' attribute's value.
static const String PathAttributeName
The 'Path' attribute's name.
Definition: cookie.h:63
static const String SeparatorLiteral
The attribute separator.
Definition: cookie.h:73
static const String SpecialAttributeLiteral
The prefix of the special attributes' names.
Definition: cookie.h:79
Cookie()
Constructs a new instance.
void set_Expired(bool value)
Sets a value that indicates if the cookie expired.
void set_Version(int32_t value)
Sets the 'Version' attribute's value.
static System::ArrayPtr< char16_t > ReservedToName
A value that is reserved for the cookie name.
Definition: cookie.h:83
static const String CommentAttributeName
The 'Comment' attribute's name.
Definition: cookie.h:51
void set_Value(String value)
Sets the cookie's value.
String ToServerString()
Serializes the current instance to the string representation.
System::SharedPtr< Uri > get_CommentUri() const
Gets the 'CommentURL' attribute's value.
bool get_Secure() const
Gets the 'Secure' attribute's value.
bool VerifySetDefaults(CookieVariant variant, System::SharedPtr< Uri > uri, bool isLocalDomain, String localDomain, bool setDefault, bool shouldThrow)
Verifies and sets the default attribute's values.
String get_Value() const
Gets the cookie's'value.
Used to parse a cookie header and create an instance of the Cookie class. Objects of this class shoul...
Definition: cookie.h:357
System::SharedPtr< Cookie > Get()
Returns an instance based on the specified string.
CookieParser(String cookieString)
Constructs a new instance.
static String CheckQuoted(String value)
Checks if the specified string is wrapped in the quotes.
String GetString()
Returns the string representation of a cookie header.
System::SharedPtr< Cookie > GetServer()
Gets the server cookie.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
CookieVariant
Enumerates the cookie specifications.
Definition: cookie.h:16
@ Plain
The plain cookie specification.
@ Rfc2109
The 'RFC 2109' cookie specification.
@ Rfc2965
The 'RFC 2965' cookie specification.
Definition: db_command.h:9
std::enable_if< IsExceptionWrapper< T >::value, constT & >::type Default()
Returns the default-constructed instance of the specified type.
Definition: default.h:16