@@ -94,7 +94,7 @@ public async Task TestRequest1()
9494 JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : new IpcConfiguration ( )
9595 {
9696 IpcLoggerProvider = name => new IpcLogger ( name ) { MinLogLevel = LogLevel . Debug , }
97- } ) ;
97+ } . UseTestFrameworkJsonSerializer ( ) ) ;
9898 // 对于 clientProvider 来说,可选调用 StartServer 方法
9999 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
100100
@@ -140,7 +140,7 @@ public async Task TestRequest2()
140140
141141 // 创建客户端
142142 // 允许无参数,如果只是做客户端使用的话
143- JsonIpcDirectRoutedProvider clientProvider = new ( clientName ) ;
143+ JsonIpcDirectRoutedProvider clientProvider = new ( clientName , TestJsonContext . CreateIpcConfiguration ( ) ) ;
144144 // 对于 clientProvider 来说,可选调用 StartServer 方法
145145 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
146146
@@ -191,7 +191,7 @@ public async Task TestRequest3()
191191
192192 // 创建客户端
193193 // 允许无参数,如果只是做客户端使用的话
194- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
194+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
195195 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
196196
197197 var result = await clientProxy . GetResponseAsync < FakeResult > ( "Foo1" , argument ) ;
@@ -220,7 +220,7 @@ public async Task TestRequest4()
220220 serverProvider1 . StartServer ( ) ;
221221
222222 // 创建客户端
223- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
223+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
224224 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
225225 var argument = new FakeArgument ( "TestName" , 1 ) ;
226226
@@ -249,7 +249,7 @@ public async Task TestException1()
249249 } ) ;
250250 jsonIpcDirectRoutedProvider . StartServer ( ) ;
251251
252- var t = new JsonIpcDirectRoutedProvider ( ) ;
252+ var t = new JsonIpcDirectRoutedProvider ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
253253 var client = await t . GetAndConnectClientAsync ( serverName ) ;
254254 try
255255 {
@@ -352,7 +352,7 @@ public async Task TestNotify1()
352352
353353 // 创建客户端
354354 // 允许无参数,如果只是做客户端使用的话
355- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
355+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
356356 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
357357 await clientProxy . NotifyAsync ( "Foo1" , argument ) ;
358358 // 预期这条消息是在第二个服务处理的
@@ -395,7 +395,7 @@ public async Task TestNotify2()
395395
396396 // 创建客户端
397397 // 允许无参数,如果只是做客户端使用的话
398- JsonIpcDirectRoutedProvider clientProvider = new ( clientName ) ;
398+ JsonIpcDirectRoutedProvider clientProvider = new ( clientName , TestJsonContext . CreateIpcConfiguration ( ) ) ;
399399 // 对于 clientProvider 来说,可选调用 StartServer 方法
400400 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
401401
@@ -437,7 +437,7 @@ public async Task TestNotify3()
437437
438438 // 创建客户端
439439 // 允许无参数,如果只是做客户端使用的话
440- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
440+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
441441 clientProvider . StartServer ( ) ;
442442 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
443443
@@ -510,7 +510,7 @@ public async Task TestParameterless()
510510 serverProvider . StartServer ( ) ;
511511
512512 // 创建客户端
513- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
513+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
514514 clientProvider . StartServer ( ) ;
515515 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
516516
@@ -571,7 +571,7 @@ public async Task TestParameterless3()
571571 serverProvider . StartServer ( ) ;
572572
573573 // 创建客户端
574- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
574+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
575575 clientProvider . StartServer ( ) ;
576576 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
577577
@@ -599,7 +599,7 @@ public async Task TestParameterless4()
599599 serverProvider . StartServer ( ) ;
600600
601601 // 创建客户端
602- JsonIpcDirectRoutedProvider clientProvider = new ( ) ;
602+ JsonIpcDirectRoutedProvider clientProvider = new ( ipcConfiguration : TestJsonContext . CreateIpcConfiguration ( ) ) ;
603603 clientProvider . StartServer ( ) ;
604604 var clientProxy = await clientProvider . GetAndConnectClientAsync ( serverName ) ;
605605
0 commit comments