Skip to content

Commit 341338f

Browse files
committed
Rename Initialize to CreateJsonContext
1 parent 43dd406 commit 341338f

File tree

12 files changed

+13
-13
lines changed

12 files changed

+13
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public async Task<SetDownloadBehaviorResult> SetDownloadBehaviorDeniedAsync(SetD
7979

8080
return await Broker.ExecuteCommandAsync(new SetDownloadBehaviorCommand(@params), options, JsonContext.SetDownloadBehaviorCommand, JsonContext.SetDownloadBehaviorResult).ConfigureAwait(false);
8181
}
82-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
82+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
8383
{
8484
return new BiDiJsonSerializerContext(options);
8585
}

dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public async Task<Subscription> OnUserPromptClosedAsync(Action<UserPromptClosedE
253253
{
254254
return await Broker.SubscribeAsync("browsingContext.userPromptClosed", handler, options, JsonContext.UserPromptClosedEventArgs).ConfigureAwait(false);
255255
}
256-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
256+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
257257
{
258258
return new BiDiJsonSerializerContext(options);
259259
}

dotnet/src/webdriver/BiDi/Emulation/EmulationModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public async Task<SetGeolocationOverrideResult> SetGeolocationPositionErrorOverr
9393

9494
return await Broker.ExecuteCommandAsync(new SetGeolocationOverrideCommand(@params), options, JsonContext.SetGeolocationOverrideCommand, JsonContext.SetGeolocationOverrideResult).ConfigureAwait(false);
9595
}
96-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
96+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
9797
{
9898
return new BiDiJsonSerializerContext(options);
9999
}

dotnet/src/webdriver/BiDi/Input/InputModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public async Task<SetFilesResult> SetFilesAsync(BrowsingContext.BrowsingContext
5050

5151
return await Broker.ExecuteCommandAsync(new SetFilesCommand(@params), options, JsonContext.SetFilesCommand, JsonContext.SetFilesResult).ConfigureAwait(false);
5252
}
53-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
53+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
5454
{
5555
return new BiDiJsonSerializerContext(options);
5656
}

dotnet/src/webdriver/BiDi/Log/LogModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task<Subscription> OnEntryAddedAsync(Action<LogEntry> handler, Subs
3939
{
4040
return await Broker.SubscribeAsync("log.entryAdded", handler, options, JsonContext.LogEntry).ConfigureAwait(false);
4141
}
42-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
42+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
4343
{
4444
return new BiDiJsonSerializerContext(options);
4545
}

dotnet/src/webdriver/BiDi/Module.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public abstract class Module
2929

3030
internal JsonSerializerContext JsonContext { get; private set; }
3131

32-
protected abstract JsonSerializerContext Initialize(JsonSerializerOptions options);
32+
protected abstract JsonSerializerContext CreateJsonContext(JsonSerializerOptions options);
3333

3434
public static TModule Create<TModule>(BiDi bidi, JsonSerializerOptions jsonOptions, JsonSerializerContext? cachedContext = null)
3535
where TModule : Module, new()
@@ -39,7 +39,7 @@ public static TModule Create<TModule>(BiDi bidi, JsonSerializerOptions jsonOptio
3939
Broker = bidi.Broker,
4040
};
4141

42-
module.JsonContext = cachedContext ?? module.Initialize(jsonOptions);
42+
module.JsonContext = cachedContext ?? module.CreateJsonContext(jsonOptions);
4343

4444
return module;
4545
}

dotnet/src/webdriver/BiDi/Network/NetworkModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public async Task<Subscription> OnAuthRequiredAsync(Action<AuthRequiredEventArgs
178178
{
179179
return await Broker.SubscribeAsync("network.authRequired", handler, options, JsonContext.AuthRequiredEventArgs).ConfigureAwait(false);
180180
}
181-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
181+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
182182
{
183183
return new BiDiJsonSerializerContext(options);
184184
}

dotnet/src/webdriver/BiDi/Permissions/PermissionsModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public async Task SetPermissionAsync(string permissionName, PermissionState stat
1818
await Broker.ExecuteCommandAsync(new SetPermissionCommand(@params), options, JsonContext.Permissions_SetPermissionCommand, JsonContext.Permissions_SetPermissionResult).ConfigureAwait(false);
1919
}
2020

21-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
21+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
2222
{
2323
return new PermissionsJsonSerializerContext(options);
2424
}

dotnet/src/webdriver/BiDi/Script/ScriptModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public async Task<Subscription> OnRealmDestroyedAsync(Action<RealmDestroyedEvent
116116
{
117117
return await Broker.SubscribeAsync("script.realmDestroyed", handler, options, JsonContext.RealmDestroyedEventArgs).ConfigureAwait(false);
118118
}
119-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
119+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
120120
{
121121
return new BiDiJsonSerializerContext(options);
122122
}

dotnet/src/webdriver/BiDi/Session/SessionModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public async Task<EndResult> EndAsync(EndOptions? options = null)
6060
{
6161
return await Broker.ExecuteCommandAsync(new EndCommand(), options, JsonContext.EndCommand, JsonContext.EndResult).ConfigureAwait(false);
6262
}
63-
protected override JsonSerializerContext Initialize(JsonSerializerOptions options)
63+
protected override JsonSerializerContext CreateJsonContext(JsonSerializerOptions options)
6464
{
6565
return new BiDiJsonSerializerContext(options);
6666
}

0 commit comments

Comments
 (0)