From 11b6997f0c648c2e34e9569d6850fd289a53b2a5 Mon Sep 17 00:00:00 2001
From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com>
Date: Sun, 23 Mar 2025 13:10:06 +0300
Subject: [PATCH] [dotnet] [bidi] Decouple ChannelProperties in Script module
---
.../BiDi/Modules/Script/ChannelProperties.cs | 27 +++++++++++++++++++
.../BiDi/Modules/Script/LocalValue.cs | 9 +------
2 files changed, 28 insertions(+), 8 deletions(-)
create mode 100644 dotnet/src/webdriver/BiDi/Modules/Script/ChannelProperties.cs
diff --git a/dotnet/src/webdriver/BiDi/Modules/Script/ChannelProperties.cs b/dotnet/src/webdriver/BiDi/Modules/Script/ChannelProperties.cs
new file mode 100644
index 0000000000000..7cc884254f900
--- /dev/null
+++ b/dotnet/src/webdriver/BiDi/Modules/Script/ChannelProperties.cs
@@ -0,0 +1,27 @@
+//
+// Licensed to the Software Freedom Conservancy (SFC) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The SFC licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+namespace OpenQA.Selenium.BiDi.Modules.Script;
+
+public record ChannelProperties(Channel Channel)
+{
+ public SerializationOptions? SerializationOptions { get; set; }
+
+ public ResultOwnership? Ownership { get; set; }
+}
diff --git a/dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs b/dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
index c8597a76bbbe0..cbb70c50a6b20 100644
--- a/dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
+++ b/dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs
@@ -90,18 +90,11 @@ public record BooleanLocalValue(bool Value) : PrimitiveProtocolLocalValue;
public record BigIntLocalValue(string Value) : PrimitiveProtocolLocalValue;
-public record ChannelLocalValue(ChannelLocalValue.ChannelProperties Value) : LocalValue
+public record ChannelLocalValue(ChannelProperties Value) : LocalValue
{
// TODO: Revise why we need it
[JsonInclude]
internal string type = "channel";
-
- public record ChannelProperties(Channel Channel)
- {
- public SerializationOptions? SerializationOptions { get; set; }
-
- public ResultOwnership? Ownership { get; set; }
- }
}
public record ArrayLocalValue(IEnumerable Value) : LocalValue;