Skip to content

Commit a5969b1

Browse files
committed
Move Log
1 parent 33682e6 commit a5969b1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

dotnet/src/webdriver/BiDi/Communication/Json/BiDiJsonSerializerContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace OpenQA.Selenium.BiDi.Communication.Json;
7474

7575

7676

77-
[JsonSerializable(typeof(Log.LogEntry))]
77+
7878

7979
[JsonSerializable(typeof(Input.PerformActionsCommand))]
8080
[JsonSerializable(typeof(Input.ReleaseActionsCommand))]

dotnet/src/webdriver/BiDi/Log/LogModule.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
using System;
2222
using OpenQA.Selenium.BiDi.Communication;
2323
using System.Text.Json;
24-
using OpenQA.Selenium.BiDi.Communication.Json;
2524
using System.Text.Json.Serialization;
2625

2726
namespace OpenQA.Selenium.BiDi.Log;
2827

2928
public sealed class LogModule : Module
3029
{
31-
private JsonSerializerContext _jsonContext = null!;
30+
private LogModuleJsonSerializerContext _jsonContext = null!;
3231

3332
public async Task<Subscription> OnEntryAddedAsync(Func<LogEntry, Task> handler, SubscriptionOptions? options = null)
3433
{
@@ -42,6 +41,12 @@ public async Task<Subscription> OnEntryAddedAsync(Action<LogEntry> handler, Subs
4241

4342
protected internal override void Initialize(JsonSerializerOptions options)
4443
{
45-
_jsonContext = new BiDiJsonSerializerContext(options);
44+
_jsonContext = new(options);
4645
}
4746
}
47+
48+
[JsonSerializable(typeof(Command))]
49+
[JsonSerializable(typeof(EmptyResult))]
50+
51+
[JsonSerializable(typeof(LogEntry))]
52+
internal partial class LogModuleJsonSerializerContext : JsonSerializerContext;

0 commit comments

Comments
 (0)