@@ -85,12 +85,12 @@ IList<Action<Packer, TObject>> operations
8585 {
8686 if ( packer == null )
8787 {
88- SerializationExceptions . ThrowArgumentNullException ( nameof ( packer ) ) ;
88+ SerializationExceptions . ThrowArgumentNullException ( " packer" ) ;
8989 }
9090
9191 if ( operations == null )
9292 {
93- SerializationExceptions . ThrowArgumentNullException ( nameof ( operations ) ) ;
93+ SerializationExceptions . ThrowArgumentNullException ( " operations" ) ;
9494 }
9595
9696 var parameter =
@@ -125,12 +125,12 @@ ref PackToArrayParameters<TObject> parameter
125125 {
126126 if ( parameter . Packer == null )
127127 {
128- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Packer ) ) ;
128+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Packer" ) ;
129129 }
130130
131131 if ( parameter . Operations == null )
132132 {
133- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Operations ) ) ;
133+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Operations" ) ;
134134 }
135135
136136#if ASSERT
@@ -181,12 +181,12 @@ CancellationToken cancellationToken
181181 {
182182 if ( packer == null )
183183 {
184- SerializationExceptions . ThrowArgumentNullException ( nameof ( packer ) ) ;
184+ SerializationExceptions . ThrowArgumentNullException ( " packer" ) ;
185185 }
186186
187187 if ( operations == null )
188188 {
189- SerializationExceptions . ThrowArgumentNullException ( nameof ( operations ) ) ;
189+ SerializationExceptions . ThrowArgumentNullException ( " operations" ) ;
190190 }
191191
192192 var parameter =
@@ -219,12 +219,12 @@ ref PackToArrayAsyncParameters<TObject> parameter
219219 {
220220 if ( parameter . Packer == null )
221221 {
222- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Packer ) ) ;
222+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Packer" ) ;
223223 }
224224
225225 if ( parameter . Operations == null )
226226 {
227- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Operations ) ) ;
227+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Operations" ) ;
228228 }
229229
230230 return PackToArrayAsyncCore ( parameter . Packer , parameter . Target , parameter . Operations , parameter . CancellationToken ) ;
@@ -281,12 +281,12 @@ IDictionary<string, Action<Packer, TObject>> operations
281281 {
282282 if ( packer == null )
283283 {
284- SerializationExceptions . ThrowArgumentNullException ( nameof ( packer ) ) ;
284+ SerializationExceptions . ThrowArgumentNullException ( " packer" ) ;
285285 }
286286
287287 if ( operations == null )
288288 {
289- SerializationExceptions . ThrowArgumentNullException ( nameof ( operations ) ) ;
289+ SerializationExceptions . ThrowArgumentNullException ( " operations" ) ;
290290 }
291291
292292 var parameter =
@@ -320,20 +320,21 @@ ref PackToMapParameters<TObject> parameter
320320 {
321321 if ( parameter . Packer == null )
322322 {
323- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Packer ) ) ;
323+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Packer" ) ;
324324 }
325325
326326 if ( parameter . Operations == null )
327327 {
328- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Operations ) ) ;
328+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Operations" ) ;
329329 }
330330
331331#if ASSERT
332332 Contract . Assert ( parameter . Packer != null ) ;
333333 Contract . Assert ( parameter . Operations != null ) ;
334334#endif // ASSERT
335335
336- if ( parameter . NullCheckers != null && ( parameter . SerializationContext ? . DictionarySerlaizationOptions . OmitNullEntry ) . GetValueOrDefault ( ) )
336+ if ( parameter . NullCheckers != null
337+ && parameter . SerializationContext != null && parameter . SerializationContext . DictionarySerlaizationOptions . OmitNullEntry )
337338 {
338339#if ASSERT
339340 Contract . Assert ( ! SerializerDebugging . UseLegacyNullMapEntryHandling ) ;
@@ -412,12 +413,12 @@ CancellationToken cancellationToken
412413 {
413414 if ( packer == null )
414415 {
415- SerializationExceptions . ThrowArgumentNullException ( nameof ( packer ) ) ;
416+ SerializationExceptions . ThrowArgumentNullException ( " packer" ) ;
416417 }
417418
418419 if ( operations == null )
419420 {
420- SerializationExceptions . ThrowArgumentNullException ( nameof ( operations ) ) ;
421+ SerializationExceptions . ThrowArgumentNullException ( " operations" ) ;
421422 }
422423
423424 var parameter =
@@ -452,12 +453,12 @@ ref PackToMapAsyncParameters<TObject> parameter
452453 {
453454 if ( parameter . Packer == null )
454455 {
455- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Packer ) ) ;
456+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Packer" ) ;
456457 }
457458
458459 if ( parameter . Operations == null )
459460 {
460- SerializationExceptions . ThrowArgumentNullException ( nameof ( parameter ) , nameof ( parameter . Operations ) ) ;
461+ SerializationExceptions . ThrowArgumentNullException ( " parameter" , " Operations" ) ;
461462 }
462463
463464 return PackToMapAsyncCore ( parameter . SerializationContext , parameter . Packer , parameter . Target , parameter . Operations , parameter . NullCheckers , parameter . CancellationToken ) ;
@@ -478,7 +479,8 @@ CancellationToken cancellationToken
478479 Contract . Assert ( operations != null ) ;
479480#endif // ASSERT
480481
481- if ( nullCheckers != null && ( serializationContext ? . DictionarySerlaizationOptions . OmitNullEntry ) . GetValueOrDefault ( ) )
482+ if ( nullCheckers != null
483+ && serializationContext != null && serializationContext . DictionarySerlaizationOptions . OmitNullEntry )
482484 {
483485#if ASSERT
484486 Contract . Assert ( ! SerializerDebugging . UseLegacyNullMapEntryHandling ) ;
0 commit comments