CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
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. More...
#include <cookie.h>
Inherits System::Object.
Public Member Functions | |
String | get_Comment () const |
Gets the 'Comment' attribute's value. More... | |
void | set_Comment (String value) |
Sets the 'Comment' attribute's value. More... | |
System::SharedPtr< Uri > | get_CommentUri () const |
Gets the 'CommentURL' attribute's value. More... | |
void | set_CommentUri (System::SharedPtr< Uri > value) |
Sets the 'CommentURL' attribute's value. More... | |
bool | get_HttpOnly () const |
Gets the 'HttpOnly' attribute's value. More... | |
void | set_HttpOnly (bool value) |
Sets the 'HttpOnly' attribute's value. More... | |
bool | get_Discard () const |
Gets the 'Discard' attribute's value. More... | |
void | set_Discard (bool value) |
Sets the 'Discard' attribute's value. More... | |
String | get_Domain () const |
Gets the 'Domain' attribute's value. More... | |
void | set_Domain (String value) |
Sets the 'Domain' attribute's value. More... | |
bool | get_DomainImplicit () |
Gets a value that indicates if the domain is implicit. More... | |
void | set_DomainImplicit (bool value) |
Sets a value that indicates if the domain is implicit. More... | |
bool | get_Expired () |
Gets a value that indicates if the cookie expired. More... | |
void | set_Expired (bool value) |
Sets a value that indicates if the cookie expired. More... | |
DateTime | get_Expires () |
Gets the 'Expires' attribute's value. More... | |
void | set_Expires (DateTime value) |
Sets the 'Expires' attribute's value. More... | |
String | get_Name () const |
Gets the cookie's name. More... | |
void | set_Name (String value) |
Sets the cookie's name. More... | |
String | get_Path () const |
Gets the 'Path' attribute's value. More... | |
void | set_Path (String value) |
Sets the 'Path' attribute's value. More... | |
bool | get_Plain () const |
Returns a value that indicates if the cookie specification is 'Plain'. More... | |
String | get_Port () const |
Gets the 'Port' attribute's value. More... | |
void | set_Port (String value) |
Sets the 'Port' attribute's value. More... | |
System::ArrayPtr< int32_t > | get_PortList () const |
Returns the collection of the 'Port' attribute's values. More... | |
bool | get_Secure () const |
Gets the 'Secure' attribute's value. More... | |
void | set_Secure (bool value) |
Sets the 'Secure' attribute's value. More... | |
DateTime | get_TimeStamp () const |
Returns the time when the cookie was created. More... | |
String | get_Value () const |
Gets the cookie's'value. More... | |
void | set_Value (String value) |
Sets the cookie's value. More... | |
CookieVariant | get_Variant () const |
Gets the cookie's specification. More... | |
void | set_Variant (CookieVariant value) |
Sets the cookie's specification. More... | |
String | get_DomainKey () const |
Returns the domain key. More... | |
int32_t | get_Version () const |
Gets the 'Version' attribute's value. More... | |
void | set_Version (int32_t value) |
Sets the 'Version' attribute's value. More... | |
Cookie () | |
Constructs a new instance. More... | |
Cookie (String name, String value) | |
Constructs a new instance. More... | |
Cookie (String name, String value, String path) | |
Constructs a new instance. More... | |
Cookie (String name, String value, String path, String domain) | |
Constructs a new instance. More... | |
bool | InternalSetName (String value) |
This method is called by other methods to set a method name. More... | |
System::SharedPtr< Cookie > | Clone () |
Creates a copy of the current instance. More... | |
bool | VerifySetDefaults (CookieVariant variant, System::SharedPtr< Uri > uri, bool isLocalDomain, String localDomain, bool setDefault, bool shouldThrow) |
Verifies and sets the default attribute's values. More... | |
bool | Equals (System::SharedPtr< Object > comparand) override |
Compares objects using C# Object.Equals semantics. More... | |
int32_t | GetHashCode () const override |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
String | ToString () const override |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
String | ToServerString () |
Serializes the current instance to the string representation. More... | |
![]() | |
Object () | |
Creates object. Initializes all internal data structures. More... | |
virtual | ~Object () |
Destroys object. Frees all internal data structures. More... | |
Object (Object const &x) | |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual String | ToString () const |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
virtual ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
Specialization of Object::ReferenceEquals for case of string and nullptr. More... | |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Specialization of Object::ReferenceEquals for case of strings. More... | |
Public Attributes | |
bool | IsQuotedVersion |
A value that indicates if the version is wrapped in the quotes. More... | |
bool | IsQuotedDomain |
A value that indicates if the domain is wrapped in the quotes. More... | |
Static Public Attributes | |
static const int32_t | MaxSupportedVersion |
The maximum supported version. More... | |
static const String | MaxSupportedVersionString |
The string representation of the maximum supported version. More... | |
static const String | CommentAttributeName |
The 'Comment' attribute's name. More... | |
static const String | CommentUrlAttributeName |
The 'CommentURL' attribute's name. More... | |
static const String | DiscardAttributeName |
The 'Discard' attribute's name. More... | |
static const String | DomainAttributeName |
The 'Domain' attribute's name. More... | |
static const String | ExpiresAttributeName |
The 'Expires' attribute's name. More... | |
static const String | MaxAgeAttributeName |
The 'Max-Age' attribute's name. More... | |
static const String | PathAttributeName |
The 'Path' attribute's name. More... | |
static const String | PortAttributeName |
The 'Port' attribute's name. More... | |
static const String | SecureAttributeName |
The 'Secure' attribute's name. More... | |
static const String | VersionAttributeName |
The 'Version' attribute's name. More... | |
static const String | HttpOnlyAttributeName |
The 'HttpOnly' attribute's name. More... | |
static const String | SeparatorLiteral |
The attribute separator. More... | |
static const String | EqualsLiteral |
The separator that is used to separates the name and value of an attribute. More... | |
static const String | QuotesLiteral |
The symbol used to wrap the attribute's parts. More... | |
static const String | SpecialAttributeLiteral |
The prefix of the special attributes' names. More... | |
static System::ArrayPtr< char16_t > | PortSplitDelimiters |
The array that contains delimiters for the 'Port' attribute's values. More... | |
static System::ArrayPtr< char16_t > | ReservedToName |
A value that is reserved for the cookie name. More... | |
static System::ArrayPtr< char16_t > | ReservedToValue |
A value that is reserved for the cookie value. More... | |
Additional Inherited Members | |
![]() | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
![]() | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More... | |
template<> | |
bool | Equals (double const &objA, double const &objB) |
Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More... | |
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.
System::Net::Cookie::Cookie | ( | ) |
Constructs a new instance.
Constructs a new instance.
name | The cookie's name. |
value | The cookie's value. |
Constructs a new instance.
name | The cookie name. |
value | The cookie value. |
path | The 'Path' attribute's value. |
Constructs a new instance.
name | The cookie's name. |
value | The cookie's value. |
path | The 'Path' attribute's value. |
domain | The 'Domain' attribute's value. |
System::SharedPtr< Cookie > System::Net::Cookie::Clone | ( | ) |
Creates a copy of the current instance.
|
override |
Compares objects using C# Object.Equals semantics.
comparand | Object to compare current one to. |
String System::Net::Cookie::get_Comment | ( | ) | const |
Gets the 'Comment' attribute's value.
System::SharedPtr< Uri > System::Net::Cookie::get_CommentUri | ( | ) | const |
Gets the 'CommentURL' attribute's value.
bool System::Net::Cookie::get_Discard | ( | ) | const |
Gets the 'Discard' attribute's value.
String System::Net::Cookie::get_Domain | ( | ) | const |
Gets the 'Domain' attribute's value.
bool System::Net::Cookie::get_DomainImplicit | ( | ) |
Gets a value that indicates if the domain is implicit.
String System::Net::Cookie::get_DomainKey | ( | ) | const |
Returns the domain key.
bool System::Net::Cookie::get_Expired | ( | ) |
Gets a value that indicates if the cookie expired.
DateTime System::Net::Cookie::get_Expires | ( | ) |
Gets the 'Expires' attribute's value.
bool System::Net::Cookie::get_HttpOnly | ( | ) | const |
Gets the 'HttpOnly' attribute's value.
String System::Net::Cookie::get_Name | ( | ) | const |
Gets the cookie's name.
String System::Net::Cookie::get_Path | ( | ) | const |
Gets the 'Path' attribute's value.
bool System::Net::Cookie::get_Plain | ( | ) | const |
Returns a value that indicates if the cookie specification is 'Plain'.
String System::Net::Cookie::get_Port | ( | ) | const |
Gets the 'Port' attribute's value.
System::ArrayPtr< int32_t > System::Net::Cookie::get_PortList | ( | ) | const |
Returns the collection of the 'Port' attribute's values.
bool System::Net::Cookie::get_Secure | ( | ) | const |
Gets the 'Secure' attribute's value.
DateTime System::Net::Cookie::get_TimeStamp | ( | ) | const |
Returns the time when the cookie was created.
String System::Net::Cookie::get_Value | ( | ) | const |
Gets the cookie's'value.
CookieVariant System::Net::Cookie::get_Variant | ( | ) | const |
Gets the cookie's specification.
int32_t System::Net::Cookie::get_Version | ( | ) | const |
|
overridevirtual |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
Reimplemented from System::Object.
bool System::Net::Cookie::InternalSetName | ( | String | value | ) |
This method is called by other methods to set a method name.
value | The value that must be set. |
void System::Net::Cookie::set_Comment | ( | String | value | ) |
Sets the 'Comment' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_CommentUri | ( | System::SharedPtr< Uri > | value | ) |
Sets the 'CommentURL' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Discard | ( | bool | value | ) |
Sets the 'Discard' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Domain | ( | String | value | ) |
Sets the 'Domain' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_DomainImplicit | ( | bool | value | ) |
Sets a value that indicates if the domain is implicit.
value | The value that must be set. |
void System::Net::Cookie::set_Expired | ( | bool | value | ) |
Sets a value that indicates if the cookie expired.
value | The value that must be set. |
void System::Net::Cookie::set_Expires | ( | DateTime | value | ) |
Sets the 'Expires' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_HttpOnly | ( | bool | value | ) |
Sets the 'HttpOnly' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Name | ( | String | value | ) |
Sets the cookie's name.
value | The value that must be set. |
void System::Net::Cookie::set_Path | ( | String | value | ) |
Sets the 'Path' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Port | ( | String | value | ) |
Sets the 'Port' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Secure | ( | bool | value | ) |
Sets the 'Secure' attribute's value.
value | The value that must be set. |
void System::Net::Cookie::set_Value | ( | String | value | ) |
Sets the cookie's value.
value | The value that must be set. |
void System::Net::Cookie::set_Variant | ( | CookieVariant | value | ) |
Sets the cookie's specification.
value | The value that must be set. |
void System::Net::Cookie::set_Version | ( | int32_t | value | ) |
Sets the 'Version' attribute's value.
value | The value that must be set. |
String System::Net::Cookie::ToServerString | ( | ) |
Serializes the current instance to the string representation.
|
overridevirtual |
Analog of C# Object.ToString() method. Enables converting custom objects to string.
Reimplemented from System::Object.
bool System::Net::Cookie::VerifySetDefaults | ( | CookieVariant | variant, |
System::SharedPtr< Uri > | uri, | ||
bool | isLocalDomain, | ||
String | localDomain, | ||
bool | setDefault, | ||
bool | shouldThrow | ||
) |
Verifies and sets the default attribute's values.
variant | The cookie's specification. |
uri | The Uri-class instance that is used to initialize the internal fields. |
isLocalDomain | A value that indicates if the cookie is pushed into the the local domain. |
localDomain | A local domain name. |
setDefault | A value that indicates if the cookie's attributes must be initialized using their default values. |
shouldThrow | A value that indicates if an exception should be thrown when the specified values are invalid. |
|
static |
The 'Comment' attribute's name.
|
static |
The 'CommentURL' attribute's name.
|
static |
The 'Discard' attribute's name.
|
static |
The 'Domain' attribute's name.
|
static |
The separator that is used to separates the name and value of an attribute.
|
static |
The 'Expires' attribute's name.
|
static |
The 'HttpOnly' attribute's name.
bool System::Net::Cookie::IsQuotedDomain |
A value that indicates if the domain is wrapped in the quotes.
bool System::Net::Cookie::IsQuotedVersion |
A value that indicates if the version is wrapped in the quotes.
|
static |
The 'Max-Age' attribute's name.
|
static |
The maximum supported version.
|
static |
The string representation of the maximum supported version.
|
static |
The 'Path' attribute's name.
|
static |
The 'Port' attribute's name.
|
static |
The array that contains delimiters for the 'Port' attribute's values.
|
static |
The symbol used to wrap the attribute's parts.
|
static |
A value that is reserved for the cookie name.
|
static |
A value that is reserved for the cookie value.
|
static |
The 'Secure' attribute's name.
|
static |
The attribute separator.
|
static |
The prefix of the special attributes' names.