System::Net::Cookie 类
内容
[
隐藏
]Cookie class
表示一个 HTTP cookie。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。
class Cookie : public System::Object
方法
| 方法 | 描述 |
|---|---|
| Clone() | 创建当前实例的副本。 |
| Cookie() | 构造一个新实例。 |
| Cookie(String, String) | 构造一个新实例。 |
| Cookie(String, String, String) | 构造一个新实例。 |
| Cookie(String, String, String, String) | 构造一个新实例。 |
| Equals(System::SharedPtr<Object>) override | 使用 C# Object.Equals 语义比较对象。 |
| get_Comment() const | 获取 ‘Comment’ 属性的值。 |
| get_CommentUri() const | 获取 ‘CommentURL’ 属性的值。 |
| get_Discard() const | 获取 ‘Discard’ 属性的值。 |
| get_Domain() const | 获取 ‘Domain’ 属性的值。 |
| get_DomainImplicit() | 获取一个值,指示域是否为隐式。 |
| get_DomainKey() const | 返回域键。 |
| get_Expired() | 获取一个值,指示 cookie 是否已过期。 |
| get_Expires() | 获取 ‘Expires’ 属性的值。 |
| get_HttpOnly() const | 获取 ‘HttpOnly’ 属性的值。 |
| get_Name() const | 获取 cookie 的名称。 |
| get_Path() const | 获取 ‘Path’ 属性的值。 |
| get_Plain() const | 返回一个值,指示 cookie 规范是否为 ‘Plain’。 |
| get_Port() const | 获取 ‘Port’ 属性的值。 |
| get_PortList() const | 返回 ‘Port’ 属性的值集合。 |
| get_Secure() const | 获取 ‘Secure’ 属性的值。 |
| get_TimeStamp() const | 返回 cookie 创建的时间。 |
| get_Value() const | 获取 cookie 的值。 |
| get_Variant() const | 获取 cookie 的规范。 |
| get_Version() const | 获取 ‘Version’ 属性的值。 |
| GetHashCode() const override | 相当于 C# Object.GetHashCode() 方法。启用自定义对象的哈希计算。 |
| InternalSetName(String) | 此方法被其他方法调用以设置方法名。 |
| set_Comment(String) | 设置 ‘Comment’ 属性的值。 |
| set_CommentUri(System::SharedPtr<Uri>) | 设置 ‘CommentURL’ 属性的值。 |
| set_Discard(bool) | 设置 ‘Discard’ 属性的值。 |
| set_Domain(String) | 设置 ‘Domain’ 属性的值。 |
| set_DomainImplicit(bool) | 设置指示域是否隐式的值。 |
| set_Expired(bool) | 设置指示 cookie 是否已过期的值。 |
| set_Expires(DateTime) | 设置 ‘Expires’ 属性的值。 |
| set_HttpOnly(bool) | 设置 ‘HttpOnly’ 属性的值。 |
| set_Name(String) | 设置 cookie 的名称。 |
| set_Path(String) | 设置 ‘Path’ 属性的值。 |
| set_Port(String) | 设置 ‘Port’ 属性的值。 |
| set_Secure(bool) | 设置 ‘Secure’ 属性的值。 |
| set_Value(String) | 设置 cookie 的值。 |
| set_Variant(CookieVariant) | 设置 cookie 的规范。 |
| set_Version(int32_t) | 设置 ‘Version’ 属性的值。 |
| ToServerString() | 将当前实例序列化为字符串表示形式。 |
| ToString() const override | 相当于 C# 的 Object.ToString() 方法。用于将自定义对象转换为字符串。 |
| VerifySetDefaults(CookieVariant, System::SharedPtr<Uri>, bool, String, bool, bool) | 验证并设置默认属性的值。 |
字段
| 字段 | 描述 |
|---|---|
| static CommentAttributeName | ‘Comment’ 属性的名称。 |
| static CommentUrlAttributeName | ‘CommentURL’ 属性的名称。 |
| static DiscardAttributeName | ‘Discard’ 属性的名称。 |
| static DomainAttributeName | ‘Domain’ 属性的名称。 |
| static EqualsLiteral | 用于分隔属性名称和值的分隔符。 |
| static ExpiresAttributeName | ‘Expires’ 属性的名称。 |
| static HttpOnlyAttributeName | ‘HttpOnly’ 属性的名称。 |
| static MaxAgeAttributeName | ‘Max-Age’ 属性的名称。 |
| static MaxSupportedVersion | RTTI 信息。 |
| static MaxSupportedVersionString | 最大支持版本的字符串表示形式。 |
| static PathAttributeName | ‘Path’ 属性的名称。 |
| static PortAttributeName | ‘Port’ 属性的名称。 |
| static PortSplitDelimiters | 包含 ‘Port’ 属性值分隔符的数组。 |
| static QuotesLiteral | 用于包装属性各部分的符号。 |
| static ReservedToName | 为 cookie 名称保留的值。 |
| static ReservedToValue | 为 cookie 值保留的值。 |
| static SecureAttributeName | ‘Secure’ 属性的名称。 |
| static SeparatorLiteral | 属性分隔符。 |
| static SpecialAttributeLiteral | 特殊属性名称的前缀。 |
| static VersionAttributeName | ‘Version’ 属性的名称。 |
另见
- Class Object
- Namespace System::Net
- Library Aspose.Font for C++