Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions dotnet/src/webdriver/BiDi/Browser/GetClientWindowsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
using System.Collections;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.BiDi.Browser;

Expand All @@ -30,21 +27,4 @@ internal sealed class GetClientWindowsCommand()

public sealed class GetClientWindowsOptions : CommandOptions;

[JsonConverter(typeof(GetClientWindowsResultConverter))]
public sealed record GetClientWindowsResult : EmptyResult, IReadOnlyList<ClientWindowInfo>
{
internal GetClientWindowsResult(IReadOnlyList<ClientWindowInfo> clientWindows)
{
ClientWindows = clientWindows;
}

public IReadOnlyList<ClientWindowInfo> ClientWindows { get; }

public ClientWindowInfo this[int index] => ClientWindows[index];

public int Count => ClientWindows.Count;

public IEnumerator<ClientWindowInfo> GetEnumerator() => ClientWindows.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (ClientWindows as IEnumerable).GetEnumerator();
}
public sealed record GetClientWindowsResult(IReadOnlyList<ClientWindowInfo> ClientWindows) : EmptyResult;
22 changes: 1 addition & 21 deletions dotnet/src/webdriver/BiDi/Browser/GetUserContextsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
using System.Collections;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.BiDi.Browser;

Expand All @@ -30,21 +27,4 @@ internal sealed class GetUserContextsCommand()

public class GetUserContextsOptions : CommandOptions;

[JsonConverter(typeof(GetUserContextsResultConverter))]
public sealed record GetUserContextsResult : EmptyResult, IReadOnlyList<UserContextInfo>
{
internal GetUserContextsResult(IReadOnlyList<UserContextInfo> userContexts)
{
UserContexts = userContexts;
}

public IReadOnlyList<UserContextInfo> UserContexts { get; }

public UserContextInfo this[int index] => UserContexts[index];

public int Count => UserContexts.Count;

public IEnumerator<UserContextInfo> GetEnumerator() => UserContexts.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (UserContexts as IEnumerable).GetEnumerator();
}
public sealed record GetUserContextsResult(IReadOnlyList<UserContextInfo> UserContexts) : EmptyResult;
22 changes: 1 addition & 21 deletions dotnet/src/webdriver/BiDi/BrowsingContext/GetTreeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
using System.Collections;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.BiDi.BrowsingContext;

Expand Down Expand Up @@ -49,21 +46,4 @@ public sealed record BrowsingContextGetTreeOptions
public long? MaxDepth { get; set; }
}

[JsonConverter(typeof(GetTreeResultConverter))]
public sealed record GetTreeResult : EmptyResult, IReadOnlyList<BrowsingContextInfo>
{
internal GetTreeResult(IReadOnlyList<BrowsingContextInfo> contexts)
{
Contexts = contexts;
}

public IReadOnlyList<BrowsingContextInfo> Contexts { get; }

public BrowsingContextInfo this[int index] => Contexts[index];

public int Count => Contexts.Count;

public IEnumerator<BrowsingContextInfo> GetEnumerator() => Contexts.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (Contexts as IEnumerable).GetEnumerator();
}
public sealed record GetTreeResult(IReadOnlyList<BrowsingContextInfo> Contexts) : EmptyResult;
22 changes: 1 addition & 21 deletions dotnet/src/webdriver/BiDi/BrowsingContext/LocateNodesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
// </copyright>

using OpenQA.Selenium.BiDi.Communication;
using OpenQA.Selenium.BiDi.Communication.Json.Converters.Enumerable;
using System.Collections;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.BiDi.BrowsingContext;

Expand All @@ -39,21 +36,4 @@ public sealed class LocateNodesOptions : CommandOptions
public IEnumerable<Script.ISharedReference>? StartNodes { get; set; }
}

[JsonConverter(typeof(LocateNodesResultConverter))]
public sealed record LocateNodesResult : EmptyResult, IReadOnlyList<Script.NodeRemoteValue>
{
internal LocateNodesResult(IReadOnlyList<Script.NodeRemoteValue> nodes)
{
Nodes = nodes;
}

public IReadOnlyList<Script.NodeRemoteValue> Nodes { get; }

public Script.NodeRemoteValue this[int index] => Nodes[index];

public int Count => Nodes.Count;

public IEnumerator<Script.NodeRemoteValue> GetEnumerator() => Nodes.GetEnumerator();

IEnumerator IEnumerable.GetEnumerator() => (Nodes as IEnumerable).GetEnumerator();
}
public sealed record LocateNodesResult(IReadOnlyList<Script.NodeRemoteValue> Nodes) : EmptyResult;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading