Skip to content

Commit e535ce2

Browse files
authored
[dotnet] [bidi] Simplify namespace for communications (#16602)
1 parent 2b958e7 commit e535ce2

File tree

126 files changed

+90
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+90
-188
lines changed

dotnet/src/webdriver/BiDi/BiDi.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using OpenQA.Selenium.BiDi.Json;
21+
using OpenQA.Selenium.BiDi.Json.Converters;
2022
using System;
2123
using System.Text.Json;
2224
using System.Text.Json.Serialization;
2325
using System.Threading;
2426
using System.Threading.Tasks;
25-
using OpenQA.Selenium.BiDi.Communication;
26-
using OpenQA.Selenium.BiDi.Communication.Json;
27-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
2827

2928
namespace OpenQA.Selenium.BiDi;
3029

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Transport;
2120
using OpenQA.Selenium.Internal.Logging;
2221
using System;
2322
using System.Collections.Concurrent;
@@ -28,7 +27,7 @@
2827
using System.Threading;
2928
using System.Threading.Tasks;
3029

31-
namespace OpenQA.Selenium.BiDi.Communication;
30+
namespace OpenQA.Selenium.BiDi;
3231

3332
public sealed class Broker : IAsyncDisposable
3433
{
@@ -214,13 +213,13 @@ public async Task<Subscription> SubscribeAsync<TEventArgs>(string eventName, Fun
214213
}
215214
}
216215

217-
public async Task UnsubscribeAsync(Session.Subscription subscription, EventHandler eventHandler)
216+
public async Task UnsubscribeAsync(Subscription subscription)
218217
{
219-
var eventHandlers = _eventHandlers[eventHandler.EventName];
218+
var eventHandlers = _eventHandlers[subscription.EventHandler.EventName];
220219

221-
eventHandlers.Remove(eventHandler);
220+
eventHandlers.Remove(subscription.EventHandler);
222221

223-
await _bidi.SessionModule.UnsubscribeAsync([subscription]).ConfigureAwait(false);
222+
await _bidi.SessionModule.UnsubscribeAsync([subscription.SubscriptionId]).ConfigureAwait(false);
224223
}
225224

226225
public async ValueTask DisposeAsync()

dotnet/src/webdriver/BiDi/Browser/BrowserModule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
2120
using System.Threading.Tasks;
2221

2322
namespace OpenQA.Selenium.BiDi.Browser;

dotnet/src/webdriver/BiDi/Browser/ClientWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
20+
using OpenQA.Selenium.BiDi.Json.Converters;
2121
using System.Text.Json.Serialization;
2222

2323
namespace OpenQA.Selenium.BiDi.Browser;

dotnet/src/webdriver/BiDi/Browser/ClientWindowInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication.Json.Converters;
20+
using OpenQA.Selenium.BiDi.Json.Converters;
2121
using System.Text.Json.Serialization;
2222

2323
namespace OpenQA.Selenium.BiDi.Browser;

dotnet/src/webdriver/BiDi/Browser/CloseCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
21-
2220
namespace OpenQA.Selenium.BiDi.Browser;
2321

2422
internal sealed class CloseCommand()

dotnet/src/webdriver/BiDi/Browser/CreateUserContextCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
21-
2220
namespace OpenQA.Selenium.BiDi.Browser;
2321

2422
internal sealed class CreateUserContextCommand(CreateUserContextParameters @params)

dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
2120
using System.Collections.Generic;
2221

2322
namespace OpenQA.Selenium.BiDi.Browser;

dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
2120
using System.Collections.Generic;
2221

2322
namespace OpenQA.Selenium.BiDi.Browser;

dotnet/src/webdriver/BiDi/Browser/RemoveUserContextCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
// under the License.
1818
// </copyright>
1919

20-
using OpenQA.Selenium.BiDi.Communication;
21-
2220
namespace OpenQA.Selenium.BiDi.Browser;
2321

2422
internal sealed class RemoveUserContextCommand(RemoveUserContextParameters @params)

0 commit comments

Comments
 (0)