File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
ServiceControl.Audit.Persistence.RavenDB
ServiceControl.Persistence.RavenDB Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ namespace ServiceControl.Audit.Persistence.RavenDB;
22
33using System ;
44using System . Net . Http ;
5+ using System . Net . Http . Json ;
56using System . Text . Json ;
67using System . Threading ;
78using System . Threading . Tasks ;
@@ -18,8 +19,7 @@ public static async Task WaitForLicenseOrThrow(DatabaseConfiguration configurati
1819 while ( ! licenseCorrectlySetup )
1920 {
2021 var httpResponse = await client . GetAsync ( "license/status" , cancellationToken ) ;
21- var responseJsonString = await httpResponse . Content . ReadAsStringAsync ( cancellationToken ) ;
22- var licenseStatus = JsonSerializer . Deserialize < LicenseStatusFragment > ( responseJsonString ) ;
22+ var licenseStatus = await httpResponse . Content . ReadFromJsonAsync < LicenseStatusFragment >
2323 if ( licenseStatus . Expired )
2424 {
2525 throw new NotSupportedException ( "The current RavenDB license is expired. Please, contact support" ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ namespace ServiceControl.Persistence.RavenDB;
22
33using System ;
44using System . Net . Http ;
5+ using System . Net . Http . Json ;
56using System . Text . Json ;
67using System . Threading ;
78using System . Threading . Tasks ;
@@ -18,8 +19,7 @@ public static async Task WaitForLicenseOrThrow(RavenPersisterSettings configurat
1819 while ( ! licenseCorrectlySetup )
1920 {
2021 var httpResponse = await client . GetAsync ( "license/status" , cancellationToken ) ;
21- var responseJsonString = await httpResponse . Content . ReadAsStringAsync ( cancellationToken ) ;
22- var licenseStatus = JsonSerializer . Deserialize < LicenseStatusFragment > ( responseJsonString ) ;
22+ var licenseStatus = await httpResponse . Content . ReadFromJsonAsync < LicenseStatusFragment >
2323 if ( licenseStatus . Expired )
2424 {
2525 throw new NotSupportedException ( "The current RavenDB license is expired. Please, contact support" ) ;
You can’t perform that action at this time.
0 commit comments