Class Cookie
Cookie object
public sealed record Cookie : IEquatable<Cookie>
- Inheritance
-
Cookie
- Implements
- Inherited Members
Constructors
Cookie(string, string, string, string, double, long, bool, bool, bool, CookiePriority, CookieSourceScheme, long)
Cookie object
public Cookie(string Name, string Value, string Domain, string Path, double Expires, long Size, bool HttpOnly, bool Secure, bool Session, CookiePriority Priority, CookieSourceScheme SourceScheme, long SourcePort)
Parameters
NamestringCookie name.
ValuestringCookie value.
DomainstringCookie domain.
PathstringCookie path.
ExpiresdoubleCookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (±Inf).
SizelongCookie size.
HttpOnlyboolTrue if cookie is http-only.
SecureboolTrue if cookie is secure.
SessionboolTrue in case of session cookie.
PriorityCookiePriorityCookie Priority
SourceSchemeCookieSourceSchemeCookie source scheme type.
SourcePortlongCookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
Properties
Domain
Cookie domain.
public string Domain { get; init; }
Property Value
Expires
Cookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (±Inf).
public double Expires { get; init; }
Property Value
HttpOnly
True if cookie is http-only.
public bool HttpOnly { get; init; }
Property Value
Name
Cookie name.
public string Name { get; init; }
Property Value
PartitionKey
Cookie partition key.
public CookiePartitionKey? PartitionKey { get; init; }
Property Value
PartitionKeyOpaque
True if cookie partition key is opaque.
public bool? PartitionKeyOpaque { get; init; }
Property Value
- bool?
Path
Cookie path.
public string Path { get; init; }
Property Value
Priority
Cookie Priority
public CookiePriority Priority { get; init; }
Property Value
SameSite
Cookie SameSite type.
public CookieSameSite? SameSite { get; init; }
Property Value
Secure
True if cookie is secure.
public bool Secure { get; init; }
Property Value
Session
True in case of session cookie.
public bool Session { get; init; }
Property Value
Size
Cookie size.
public long Size { get; init; }
Property Value
SourcePort
Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
public long SourcePort { get; init; }
Property Value
SourceScheme
Cookie source scheme type.
public CookieSourceScheme SourceScheme { get; init; }
Property Value
Value
Cookie value.
public string Value { get; init; }