@@ -363,14 +363,14 @@ private void GivenThereIsAFakeConsulServiceDiscoveryProvider(string url, string
363
363
{
364
364
if ( context . Request . Method . ToLower ( ) == "get" && context . Request . Path . Value == "/v1/kv/InternalConfiguration" )
365
365
{
366
- var json = JsonSerializer . Serialize ( _config , JsonSerializerOptionsExtensions . Web ) ;
366
+ var json = JsonSerializer . Serialize ( _config , JsonSerializerOptionsFactory . Web ) ;
367
367
368
368
var bytes = Encoding . UTF8 . GetBytes ( json ) ;
369
369
370
370
var base64 = Convert . ToBase64String ( bytes ) ;
371
371
372
372
var kvp = new FakeConsulGetResponse ( base64 ) ;
373
- json = JsonSerializer . Serialize ( new [ ] { kvp } , JsonSerializerOptionsExtensions . Web ) ;
373
+ json = JsonSerializer . Serialize ( new [ ] { kvp } , JsonSerializerOptionsFactory . Web ) ;
374
374
context . Response . Headers . Append ( "Content-Type" , "application/json" ) ;
375
375
await context . Response . WriteAsync ( json ) ;
376
376
}
@@ -384,9 +384,9 @@ private void GivenThereIsAFakeConsulServiceDiscoveryProvider(string url, string
384
384
// var json = reader.ReadToEnd();
385
385
var json = await reader . ReadToEndAsync ( ) ;
386
386
387
- _config = JsonSerializer . Deserialize < FileConfiguration > ( json , JsonSerializerOptionsExtensions . Web ) ;
387
+ _config = JsonSerializer . Deserialize < FileConfiguration > ( json , JsonSerializerOptionsFactory . Web ) ;
388
388
389
- var response = JsonSerializer . Serialize ( true , JsonSerializerOptionsExtensions . Web ) ;
389
+ var response = JsonSerializer . Serialize ( true , JsonSerializerOptionsFactory . Web ) ;
390
390
391
391
await context . Response . WriteAsync ( response ) ;
392
392
}
@@ -398,7 +398,7 @@ private void GivenThereIsAFakeConsulServiceDiscoveryProvider(string url, string
398
398
}
399
399
else if ( context . Request . Path . Value == $ "/v1/health/service/{ serviceName } ")
400
400
{
401
- var json = JsonSerializer . Serialize ( _consulServices , JsonSerializerOptionsExtensions . Web ) ;
401
+ var json = JsonSerializer . Serialize ( _consulServices , JsonSerializerOptionsFactory . Web ) ;
402
402
context . Response . Headers . Append ( "Content-Type" , "application/json" ) ;
403
403
await context . Response . WriteAsync ( json ) ;
404
404
}
0 commit comments