Creates and returns a string representation of the cookie. A string representation of the cookie.
()
| 305 | /// </summary> |
| 306 | /// <returns>A string representation of the cookie.</returns> |
| 307 | public override string ToString() |
| 308 | { |
| 309 | return this.cookieName + "=" + this.cookieValue |
| 310 | + (this.cookieExpiry == null ? string.Empty : "; expires=" + this.cookieExpiry.Value.ToUniversalTime().ToString("ddd MM dd yyyy hh:mm:ss UTC", CultureInfo.InvariantCulture)) |
| 311 | + (string.IsNullOrEmpty(this.cookiePath) ? string.Empty : "; path=" + this.cookiePath) |
| 312 | + (string.IsNullOrEmpty(this.cookieDomain) ? string.Empty : "; domain=" + this.cookieDomain) |
| 313 | + "; isHttpOnly= " + this.isHttpOnly + "; secure= " + this.secure + (string.IsNullOrEmpty(this.sameSite) ? string.Empty : "; sameSite=" + this.sameSite); |
| 314 | } |
| 315 | |
| 316 | /// <summary> |
| 317 | /// Determines whether the specified <see cref="object">Object</see> is equal |