@@ -50,7 +50,7 @@ public MapQuestGeocoder(string key)
5050
5151 private IEnumerable < Address > HandleSingleResponse ( MapQuestResponse res )
5252 {
53- return res is not null && ! CollectionExtensions . IsNullOrEmpty ( res . Results )
53+ return res is not null && ! res . Results . IsNullOrEmpty ( )
5454 ? HandleSingleResponse ( from r in res . Results . OfType < MapQuestResult > ( )
5555 from l in r . Locations ? . OfType < MapQuestLocation > ( ) ?? Enumerable . Empty < MapQuestLocation > ( )
5656 select l )
@@ -139,7 +139,7 @@ where l.Quality < Quality.COUNTRY
139139 using var client = BuildClient ( ) ;
140140 using var request = CreateRequest ( f ) ;
141141 MapQuestResponse r = await Parse ( client , request , cancellationToken ) . ConfigureAwait ( false ) ;
142- if ( r is not null && ! CollectionExtensions . IsNullOrEmpty ( r . Results ) )
142+ if ( r is not null && ! r . Results . IsNullOrEmpty ( ) )
143143 {
144144 foreach ( MapQuestResult o in r . Results )
145145 {
@@ -226,7 +226,7 @@ private async Task<MapQuestResponse> Parse(HttpClient client, HttpRequestMessage
226226 if ( String . IsNullOrWhiteSpace ( json ) )
227227 throw new Exception ( "Remote system response with blank: " + requestInfo ) ;
228228
229- MapQuestResponse ? o = JsonExtensions . FromJson < MapQuestResponse > ( json ) ;
229+ MapQuestResponse ? o = json . FromJson < MapQuestResponse > ( ) ;
230230 if ( o is null )
231231 throw new Exception ( "Unable to deserialize remote response: " + requestInfo ) ;
232232
@@ -260,7 +260,7 @@ private static string BuildResponsePreview(string? body)
260260 where ! String . IsNullOrWhiteSpace ( a )
261261 group a by a into ag
262262 select ag . Key ) . ToArray ( ) ;
263- if ( CollectionExtensions . IsNullOrEmpty ( adr ) )
263+ if ( adr . IsNullOrEmpty ( ) )
264264 throw new ArgumentException ( "Atleast one none blank item is required in addresses" ) ;
265265
266266 var f = new BatchGeocodeRequest ( _key , adr ) { UseOSM = UseOSM } ;
@@ -270,7 +270,7 @@ group a by a into ag
270270
271271 private ICollection < ResultItem > HandleBatchResponse ( MapQuestResponse res )
272272 {
273- if ( res is not null && ! CollectionExtensions . IsNullOrEmpty ( res . Results ) )
273+ if ( res is not null && ! res . Results . IsNullOrEmpty ( ) )
274274 {
275275 return ( from r in res . Results . OfType < MapQuestResult > ( )
276276 let locations = r . Locations ? . OfType < MapQuestLocation > ( ) . ToArray ( ) ?? Array . Empty < MapQuestLocation > ( )
0 commit comments