Skip to content

Commit fd61919

Browse files
committed
[dotnet] [bidi] Maintain JSON converters with their respective types
1 parent 18f424b commit fd61919

23 files changed

+53
-28
lines changed

dotnet/src/webdriver/BiDi/Communication/Broker.cs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,14 @@ internal Broker(BiDi bidi, Uri url)
6767
Converters =
6868
{
6969
new BrowsingContextConverter(_bidi),
70-
new BrowserUserContextConverter(bidi),
71-
new BrowserClientWindowConverter(),
72-
new NavigationConverter(),
70+
new BrowserUserContextConverter(_bidi),
7371
new InterceptConverter(_bidi),
7472
new RequestConverter(_bidi),
75-
new ChannelConverter(),
7673
new HandleConverter(_bidi),
7774
new InternalIdConverter(_bidi),
7875
new PreloadScriptConverter(_bidi),
7976
new RealmConverter(_bidi),
80-
new RealmTypeConverter(),
81-
new DateTimeOffsetConverter(),
82-
new PrintPageRangeConverter(),
83-
new InputOriginConverter(),
84-
new SubscriptionConverter(),
77+
new BiDiDateTimeOffsetConverter(),
8578
new JsonStringEnumConverter(JsonNamingPolicy.CamelCase),
8679

8780
// https://github.com/dotnet/runtime/issues/72604
@@ -90,15 +83,6 @@ internal Broker(BiDi bidi, Uri url)
9083
new Json.Converters.Polymorphic.RemoteValueConverter(),
9184
new Json.Converters.Polymorphic.RealmInfoConverter(),
9285
new Json.Converters.Polymorphic.LogEntryConverter(),
93-
//
94-
95-
// Enumerable
96-
new Json.Converters.Enumerable.GetCookiesResultConverter(),
97-
new Json.Converters.Enumerable.LocateNodesResultConverter(),
98-
new Json.Converters.Enumerable.InputSourceActionsConverter(),
99-
new Json.Converters.Enumerable.GetUserContextsResultConverter(),
100-
new Json.Converters.Enumerable.GetClientWindowsResultConverter(),
101-
new Json.Converters.Enumerable.GetRealmsResultConverter(),
10286
}
10387
};
10488

dotnet/src/webdriver/BiDi/Communication/Json/Converters/DateTimeOffsetConverter.cs renamed to dotnet/src/webdriver/BiDi/Communication/Json/Converters/BiDiDateTimeOffsetConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="DateTimeOffsetConverter.cs" company="Selenium Committers">
1+
// <copyright file="BiDiDateTimeOffsetConverter.cs" company="Selenium Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -23,7 +23,7 @@
2323

2424
namespace OpenQA.Selenium.BiDi.Communication.Json.Converters;
2525

26-
internal class DateTimeOffsetConverter : JsonConverter<DateTimeOffset>
26+
internal class BiDiDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
2727
{
2828
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
2929
{

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/GetClientWindowsResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public override GetClientWindowsResult Read(ref Utf8JsonReader reader, Type type
3737

3838
public override void Write(Utf8JsonWriter writer, GetClientWindowsResult value, JsonSerializerOptions options)
3939
{
40-
throw new NotImplementedException();
40+
throw new NotSupportedException();
4141
}
4242
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/GetCookiesResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public override GetCookiesResult Read(ref Utf8JsonReader reader, Type typeToConv
3838

3939
public override void Write(Utf8JsonWriter writer, GetCookiesResult value, JsonSerializerOptions options)
4040
{
41-
throw new NotImplementedException();
41+
throw new NotSupportedException();
4242
}
4343
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/GetRealmsResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public override GetRealmsResult Read(ref Utf8JsonReader reader, Type typeToConve
3737

3838
public override void Write(Utf8JsonWriter writer, GetRealmsResult value, JsonSerializerOptions options)
3939
{
40-
throw new NotImplementedException();
40+
throw new NotSupportedException();
4141
}
4242
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/GetUserContextsResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public override GetUserContextsResult Read(ref Utf8JsonReader reader, Type typeT
3737

3838
public override void Write(Utf8JsonWriter writer, GetUserContextsResult value, JsonSerializerOptions options)
3939
{
40-
throw new NotImplementedException();
40+
throw new NotSupportedException();
4141
}
4242
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/InputSourceActionsConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal class InputSourceActionsConverter : JsonConverter<SourceActions>
2929
{
3030
public override SourceActions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
3131
{
32-
throw new NotImplementedException();
32+
throw new NotSupportedException();
3333
}
3434

3535
public override void Write(Utf8JsonWriter writer, SourceActions value, JsonSerializerOptions options)

dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/LocateNodesResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public override LocateNodesResult Read(ref Utf8JsonReader reader, Type typeToCon
3838

3939
public override void Write(Utf8JsonWriter writer, LocateNodesResult value, JsonSerializerOptions options)
4040
{
41-
throw new NotImplementedException();
41+
throw new NotSupportedException();
4242
}
4343
}

dotnet/src/webdriver/BiDi/Communication/Json/Converters/InputOriginConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal class InputOriginConverter : JsonConverter<Origin>
2828
{
2929
public override Origin Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
3030
{
31-
throw new NotImplementedException();
31+
throw new NotSupportedException();
3232
}
3333

3434
public override void Write(Utf8JsonWriter writer, Origin value, JsonSerializerOptions options)

dotnet/src/webdriver/BiDi/Communication/Json/Converters/PrintPageRangeConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal class PrintPageRangeConverter : JsonConverter<PrintPageRange>
2828
{
2929
public override PrintPageRange Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
3030
{
31-
throw new NotImplementedException();
31+
throw new NotSupportedException();
3232
}
3333

3434
public override void Write(Utf8JsonWriter writer, PrintPageRange value, JsonSerializerOptions options)

0 commit comments

Comments
 (0)