Skip to content

Commit ce59d87

Browse files
committed
Storage
1 parent 801df96 commit ce59d87

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

dotnet/src/webdriver/BiDi/Storage/DeleteCookiesCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
namespace OpenQA.Selenium.BiDi.Storage;
2323

24-
internal class DeleteCookiesCommand(DeleteCookiesCommandParameters @params)
24+
internal sealed class DeleteCookiesCommand(DeleteCookiesCommandParameters @params)
2525
: Command<DeleteCookiesCommandParameters, DeleteCookiesResult>(@params, "storage.deleteCookies");
2626

27-
internal record DeleteCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters;
27+
internal sealed record DeleteCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters;
2828

29-
public record DeleteCookiesOptions : GetCookiesOptions;
29+
public sealed record DeleteCookiesOptions : GetCookiesOptions;
3030

31-
public record DeleteCookiesResult(PartitionKey PartitionKey) : EmptyResult;
31+
public sealed record DeleteCookiesResult(PartitionKey PartitionKey) : EmptyResult;

dotnet/src/webdriver/BiDi/Storage/GetCookiesCommand.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525

2626
namespace OpenQA.Selenium.BiDi.Storage;
2727

28-
internal class GetCookiesCommand(GetCookiesCommandParameters @params)
28+
internal sealed class GetCookiesCommand(GetCookiesCommandParameters @params)
2929
: Command<GetCookiesCommandParameters, GetCookiesResult>(@params, "storage.getCookies");
3030

31-
internal record GetCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters;
31+
internal sealed record GetCookiesCommandParameters(CookieFilter? Filter, PartitionDescriptor? Partition) : CommandParameters;
3232

33-
public record GetCookiesOptions : CommandOptions
33+
public sealed record GetCookiesOptions : CommandOptions
3434
{
3535
public CookieFilter? Filter { get; set; }
3636

3737
public PartitionDescriptor? Partition { get; set; }
3838
}
3939

40-
public record GetCookiesResult : EmptyResult, IReadOnlyList<Network.Cookie>
40+
public sealed record GetCookiesResult : EmptyResult, IReadOnlyList<Network.Cookie>
4141
{
4242
private readonly IReadOnlyList<Network.Cookie> _cookies;
4343

@@ -58,7 +58,7 @@ internal GetCookiesResult(IReadOnlyList<Network.Cookie> cookies, PartitionKey pa
5858
IEnumerator IEnumerable.GetEnumerator() => (_cookies as IEnumerable).GetEnumerator();
5959
}
6060

61-
public class CookieFilter
61+
public sealed record CookieFilter
6262
{
6363
public string? Name { get; set; }
6464

@@ -84,9 +84,9 @@ public class CookieFilter
8484
[JsonDerivedType(typeof(StorageKeyPartitionDescriptor), "storageKey")]
8585
public abstract record PartitionDescriptor;
8686

87-
public record ContextPartitionDescriptor(BrowsingContext.BrowsingContext Context) : PartitionDescriptor;
87+
public sealed record ContextPartitionDescriptor(BrowsingContext.BrowsingContext Context) : PartitionDescriptor;
8888

89-
public record StorageKeyPartitionDescriptor : PartitionDescriptor
89+
public sealed record StorageKeyPartitionDescriptor : PartitionDescriptor
9090
{
9191
public string? UserContext { get; set; }
9292

dotnet/src/webdriver/BiDi/Storage/PartitionKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace OpenQA.Selenium.BiDi.Storage;
2121

22-
public class PartitionKey
22+
public sealed record PartitionKey
2323
{
2424
public Browser.UserContext? UserContext { get; set; }
2525

dotnet/src/webdriver/BiDi/Storage/SetCookieCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222

2323
namespace OpenQA.Selenium.BiDi.Storage;
2424

25-
internal class SetCookieCommand(SetCookieCommandParameters @params)
25+
internal sealed class SetCookieCommand(SetCookieCommandParameters @params)
2626
: Command<SetCookieCommandParameters, SetCookieResult>(@params, "storage.setCookie");
2727

28-
internal record SetCookieCommandParameters(PartialCookie Cookie, PartitionDescriptor? Partition) : CommandParameters;
28+
internal sealed record SetCookieCommandParameters(PartialCookie Cookie, PartitionDescriptor? Partition) : CommandParameters;
2929

30-
public record PartialCookie(string Name, Network.BytesValue Value, string Domain)
30+
public sealed record PartialCookie(string Name, Network.BytesValue Value, string Domain)
3131
{
3232
public string? Path { get; set; }
3333

@@ -40,9 +40,9 @@ public record PartialCookie(string Name, Network.BytesValue Value, string Domain
4040
public DateTimeOffset? Expiry { get; set; }
4141
}
4242

43-
public record SetCookieOptions : CommandOptions
43+
public sealed record SetCookieOptions : CommandOptions
4444
{
4545
public PartitionDescriptor? Partition { get; set; }
4646
}
4747

48-
public record SetCookieResult(PartitionKey PartitionKey) : EmptyResult;
48+
public sealed record SetCookieResult(PartitionKey PartitionKey) : EmptyResult;

dotnet/src/webdriver/BiDi/Storage/StorageModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
namespace OpenQA.Selenium.BiDi.Storage;
2424

25-
public class StorageModule(Broker broker) : Module(broker)
25+
public sealed class StorageModule(Broker broker) : Module(broker)
2626
{
2727
public async Task<GetCookiesResult> GetCookiesAsync(GetCookiesOptions? options = null)
2828
{

0 commit comments

Comments
 (0)