|
1 |
| -// <copyright file="ReturnedCookie.cs" company="WebDriver Committers"> |
| 1 | +// <copyright file="ReturnedCookie.cs" company="WebDriver Committers"> |
2 | 2 | // Licensed to the Software Freedom Conservancy (SFC) under one
|
3 | 3 | // or more contributor license agreements. See the NOTICE file
|
4 | 4 | // distributed with this work for additional information
|
@@ -44,10 +44,31 @@ public class ReturnedCookie : Cookie
|
44 | 44 | /// or if it contains a semi-colon.</exception>
|
45 | 45 | /// <exception cref="ArgumentNullException">If the value or currentUrl is <see langword="null"/>.</exception>
|
46 | 46 | public ReturnedCookie(string name, string value, string domain, string path, DateTime? expiry, bool isSecure, bool isHttpOnly)
|
| 47 | + : this(name, value, domain, path, expiry, isSecure, isHttpOnly, null) |
| 48 | + { |
| 49 | + } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Initializes a new instance of the <see cref="ReturnedCookie"/> class with a specific name, |
| 53 | + /// value, domain, path and expiration date. |
| 54 | + /// </summary> |
| 55 | + /// <param name="name">The name of the cookie.</param> |
| 56 | + /// <param name="value">The value of the cookie.</param> |
| 57 | + /// <param name="domain">The domain of the cookie.</param> |
| 58 | + /// <param name="path">The path of the cookie.</param> |
| 59 | + /// <param name="expiry">The expiration date of the cookie.</param> |
| 60 | + /// <param name="isSecure"><see langword="true"/> if the cookie is secure; otherwise <see langword="false"/></param> |
| 61 | + /// <param name="isHttpOnly"><see langword="true"/> if the cookie is an HTTP-only cookie; otherwise <see langword="false"/></param> |
| 62 | + /// <param name="sameSite">The SameSite value of cookie.</param> |
| 63 | + /// <exception cref="ArgumentException">If the name is <see langword="null"/> or an empty string, |
| 64 | + /// or if it contains a semi-colon.</exception> |
| 65 | + /// <exception cref="ArgumentNullException">If the value or currentUrl is <see langword="null"/>.</exception> |
| 66 | + public ReturnedCookie(string name, string value, string domain, string path, DateTime? expiry, bool isSecure, bool isHttpOnly, string sameSite) |
47 | 67 | : base(name, value, domain, path, expiry)
|
48 | 68 | {
|
49 | 69 | this.isSecure = isSecure;
|
50 | 70 | this.isHttpOnly = isHttpOnly;
|
| 71 | + this.SameSite = sameSite; |
51 | 72 | }
|
52 | 73 |
|
53 | 74 | /// <summary>
|
|
0 commit comments