Skip to content

Commit fbe97c9

Browse files
nvborisenkosandeepsuryaprasad
authored andcommitted
[dotnet] [bidi] Order command properties in json to simplify logs reading
1 parent 7ca35e3 commit fbe97c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using System.Text.Json.Serialization;
21+
2022
namespace OpenQA.Selenium.BiDi.Communication;
2123

2224
public abstract class Command
@@ -26,14 +28,17 @@ protected Command(string method)
2628
Method = method;
2729
}
2830

31+
[JsonPropertyOrder(1)]
2932
public string Method { get; }
3033

34+
[JsonPropertyOrder(0)]
3135
public int Id { get; internal set; }
3236
}
3337

3438
internal abstract class Command<TCommandParameters>(TCommandParameters @params, string method) : Command(method)
3539
where TCommandParameters : CommandParameters
3640
{
41+
[JsonPropertyOrder(2)]
3742
public TCommandParameters Params { get; } = @params;
3843
}
3944

0 commit comments

Comments
 (0)