@@ -125,6 +125,7 @@ public static MethodInfo GetCurrentMethod
125
125
if ( s_ienumeratorGetCurrentMethod == null )
126
126
{
127
127
s_ienumeratorGetCurrentMethod = typeof ( IEnumerator ) . GetProperty ( "Current" ) . GetGetMethod ( ) ;
128
+ Debug . Assert ( s_ienumeratorGetCurrentMethod != null ) ;
128
129
}
129
130
return s_ienumeratorGetCurrentMethod ;
130
131
}
@@ -137,6 +138,7 @@ public static MethodInfo GetItemContractMethod
137
138
if ( s_getItemContractMethod == null )
138
139
{
139
140
s_getItemContractMethod = typeof ( CollectionDataContract ) . GetProperty ( "ItemContract" , Globals . ScanAllMembers ) . GetGetMethod ( true ) ; // nonPublic
141
+ Debug . Assert ( s_getItemContractMethod != null ) ;
140
142
}
141
143
return s_getItemContractMethod ;
142
144
}
@@ -149,6 +151,7 @@ public static MethodInfo GetJsonDataContractMethod
149
151
if ( s_getJsonDataContractMethod == null )
150
152
{
151
153
s_getJsonDataContractMethod = typeof ( JsonDataContract ) . GetMethod ( "GetJsonDataContract" , Globals . ScanAllMembers ) ;
154
+ Debug . Assert ( s_getJsonDataContractMethod != null ) ;
152
155
}
153
156
return s_getJsonDataContractMethod ;
154
157
}
@@ -161,6 +164,7 @@ public static MethodInfo GetJsonMemberIndexMethod
161
164
if ( s_getJsonMemberIndexMethod == null )
162
165
{
163
166
s_getJsonMemberIndexMethod = typeof ( XmlObjectSerializerReadContextComplexJson ) . GetMethod ( "GetJsonMemberIndex" , Globals . ScanAllMembers ) ;
167
+ Debug . Assert ( s_getJsonMemberIndexMethod != null ) ;
164
168
}
165
169
return s_getJsonMemberIndexMethod ;
166
170
}
@@ -173,6 +177,7 @@ public static MethodInfo GetRevisedItemContractMethod
173
177
if ( s_getRevisedItemContractMethod == null )
174
178
{
175
179
s_getRevisedItemContractMethod = typeof ( XmlObjectSerializerWriteContextComplexJson ) . GetMethod ( "GetRevisedItemContract" , Globals . ScanAllMembers ) ;
180
+ Debug . Assert ( s_getRevisedItemContractMethod != null ) ;
176
181
}
177
182
return s_getRevisedItemContractMethod ;
178
183
}
@@ -185,6 +190,7 @@ public static MethodInfo GetUninitializedObjectMethod
185
190
if ( s_getUninitializedObjectMethod == null )
186
191
{
187
192
s_getUninitializedObjectMethod = typeof ( XmlFormatReaderGenerator ) . GetMethod ( "UnsafeGetUninitializedObject" , Globals . ScanAllMembers , new Type [ ] { typeof ( Type ) } ) ;
193
+ Debug . Assert ( s_getUninitializedObjectMethod != null ) ;
188
194
}
189
195
return s_getUninitializedObjectMethod ;
190
196
}
@@ -197,7 +203,8 @@ public static MethodInfo IsStartElementMethod0
197
203
{
198
204
if ( s_isStartElementMethod0 == null )
199
205
{
200
- s_isStartElementMethod0 = typeof ( XmlReaderDelegator ) . GetMethod ( "IsStartElement" , Globals . ScanAllMembers , Array . Empty < Type > ( ) ) ;
206
+ s_isStartElementMethod0 = typeof ( XmlReaderDelegator ) . GetMethod ( "IsStartElement" , Globals . ScanAllMembers , Array . Empty < Type > ( ) ) ;
207
+ Debug . Assert ( s_isStartElementMethod0 != null ) ;
201
208
}
202
209
return s_isStartElementMethod0 ;
203
210
}
@@ -210,6 +217,7 @@ public static MethodInfo IsStartElementMethod2
210
217
if ( s_isStartElementMethod2 == null )
211
218
{
212
219
s_isStartElementMethod2 = typeof ( XmlReaderDelegator ) . GetMethod ( "IsStartElement" , Globals . ScanAllMembers , new Type [ ] { typeof ( XmlDictionaryString ) , typeof ( XmlDictionaryString ) } ) ;
220
+ Debug . Assert ( s_isStartElementMethod2 != null ) ;
213
221
}
214
222
return s_isStartElementMethod2 ;
215
223
}
@@ -222,6 +230,7 @@ public static PropertyInfo LocalNameProperty
222
230
if ( s_localNameProperty == null )
223
231
{
224
232
s_localNameProperty = typeof ( XmlReaderDelegator ) . GetProperty ( "LocalName" , Globals . ScanAllMembers ) ;
233
+ Debug . Assert ( s_localNameProperty != null ) ;
225
234
}
226
235
return s_localNameProperty ;
227
236
}
@@ -234,6 +243,7 @@ public static PropertyInfo NamespaceProperty
234
243
if ( s_namespaceProperty == null )
235
244
{
236
245
s_namespaceProperty = typeof ( XmlReaderDelegator ) . GetProperty ( "NamespaceProperty" , Globals . ScanAllMembers ) ;
246
+ Debug . Assert ( s_namespaceProperty != null ) ;
237
247
}
238
248
return s_namespaceProperty ;
239
249
}
@@ -246,6 +256,7 @@ public static MethodInfo MoveNextMethod
246
256
if ( s_ienumeratorMoveNextMethod == null )
247
257
{
248
258
s_ienumeratorMoveNextMethod = typeof ( IEnumerator ) . GetMethod ( "MoveNext" ) ;
259
+ Debug . Assert ( s_ienumeratorMoveNextMethod != null ) ;
249
260
}
250
261
return s_ienumeratorMoveNextMethod ;
251
262
}
@@ -258,6 +269,7 @@ public static MethodInfo MoveToContentMethod
258
269
if ( s_moveToContentMethod == null )
259
270
{
260
271
s_moveToContentMethod = typeof ( XmlReaderDelegator ) . GetMethod ( "MoveToContent" , Globals . ScanAllMembers ) ;
272
+ Debug . Assert ( s_moveToContentMethod != null ) ;
261
273
}
262
274
return s_moveToContentMethod ;
263
275
}
@@ -270,6 +282,7 @@ public static PropertyInfo NodeTypeProperty
270
282
if ( s_nodeTypeProperty == null )
271
283
{
272
284
s_nodeTypeProperty = typeof ( XmlReaderDelegator ) . GetProperty ( "NodeType" , Globals . ScanAllMembers ) ;
285
+ Debug . Assert ( s_nodeTypeProperty != null ) ;
273
286
}
274
287
return s_nodeTypeProperty ;
275
288
}
@@ -282,6 +295,7 @@ public static MethodInfo ReadJsonValueMethod
282
295
if ( s_readJsonValueMethod == null )
283
296
{
284
297
s_readJsonValueMethod = typeof ( DataContractJsonSerializer ) . GetMethod ( "ReadJsonValue" , Globals . ScanAllMembers ) ;
298
+ Debug . Assert ( s_readJsonValueMethod != null ) ;
285
299
}
286
300
return s_readJsonValueMethod ;
287
301
}
@@ -306,6 +320,7 @@ public static MethodInfo ThrowDuplicateMemberExceptionMethod
306
320
if ( s_throwDuplicateMemberExceptionMethod == null )
307
321
{
308
322
s_throwDuplicateMemberExceptionMethod = typeof ( XmlObjectSerializerReadContextComplexJson ) . GetMethod ( "ThrowDuplicateMemberException" , Globals . ScanAllMembers ) ;
323
+ Debug . Assert ( s_throwDuplicateMemberExceptionMethod != null ) ;
309
324
}
310
325
return s_throwDuplicateMemberExceptionMethod ;
311
326
}
@@ -318,6 +333,7 @@ public static MethodInfo ThrowMissingRequiredMembersMethod
318
333
if ( s_throwMissingRequiredMembersMethod == null )
319
334
{
320
335
s_throwMissingRequiredMembersMethod = typeof ( XmlObjectSerializerReadContextComplexJson ) . GetMethod ( "ThrowMissingRequiredMembers" , Globals . ScanAllMembers ) ;
336
+ Debug . Assert ( s_throwMissingRequiredMembersMethod != null ) ;
321
337
}
322
338
return s_throwMissingRequiredMembersMethod ;
323
339
}
@@ -330,6 +346,7 @@ public static PropertyInfo TypeHandleProperty
330
346
if ( s_typeHandleProperty == null )
331
347
{
332
348
s_typeHandleProperty = typeof ( Type ) . GetProperty ( "TypeHandle" ) ;
349
+ Debug . Assert ( s_typeHandleProperty != null ) ;
333
350
}
334
351
return s_typeHandleProperty ;
335
352
}
@@ -342,6 +359,7 @@ public static PropertyInfo UseSimpleDictionaryFormatReadProperty
342
359
if ( s_useSimpleDictionaryFormatReadProperty == null )
343
360
{
344
361
s_useSimpleDictionaryFormatReadProperty = typeof ( XmlObjectSerializerReadContextComplexJson ) . GetProperty ( "UseSimpleDictionaryFormat" , Globals . ScanAllMembers ) ;
362
+ Debug . Assert ( s_useSimpleDictionaryFormatReadProperty != null ) ;
345
363
}
346
364
return s_useSimpleDictionaryFormatReadProperty ;
347
365
}
@@ -354,6 +372,7 @@ public static PropertyInfo UseSimpleDictionaryFormatWriteProperty
354
372
if ( s_useSimpleDictionaryFormatWriteProperty == null )
355
373
{
356
374
s_useSimpleDictionaryFormatWriteProperty = typeof ( XmlObjectSerializerWriteContextComplexJson ) . GetProperty ( "UseSimpleDictionaryFormat" , Globals . ScanAllMembers ) ;
375
+ Debug . Assert ( s_useSimpleDictionaryFormatWriteProperty != null ) ;
357
376
}
358
377
return s_useSimpleDictionaryFormatWriteProperty ;
359
378
}
@@ -366,6 +385,7 @@ public static MethodInfo WriteAttributeStringMethod
366
385
if ( s_writeAttributeStringMethod == null )
367
386
{
368
387
s_writeAttributeStringMethod = typeof ( XmlWriterDelegator ) . GetMethod ( "WriteAttributeString" , Globals . ScanAllMembers , new Type [ ] { typeof ( string ) , typeof ( string ) , typeof ( string ) , typeof ( string ) } ) ;
388
+ Debug . Assert ( s_writeAttributeStringMethod != null ) ;
369
389
}
370
390
return s_writeAttributeStringMethod ;
371
391
}
@@ -378,6 +398,7 @@ public static MethodInfo WriteEndElementMethod
378
398
if ( s_writeEndElementMethod == null )
379
399
{
380
400
s_writeEndElementMethod = typeof ( XmlWriterDelegator ) . GetMethod ( "WriteEndElement" , Globals . ScanAllMembers , Array . Empty < Type > ( ) ) ;
401
+ Debug . Assert ( s_writeEndElementMethod != null ) ;
381
402
}
382
403
return s_writeEndElementMethod ;
383
404
}
@@ -390,6 +411,7 @@ public static MethodInfo WriteJsonISerializableMethod
390
411
if ( s_writeJsonISerializableMethod == null )
391
412
{
392
413
s_writeJsonISerializableMethod = typeof ( XmlObjectSerializerWriteContextComplexJson ) . GetMethod ( "WriteJsonISerializable" , Globals . ScanAllMembers ) ;
414
+ Debug . Assert ( s_writeJsonISerializableMethod != null ) ;
393
415
}
394
416
return s_writeJsonISerializableMethod ;
395
417
}
@@ -402,6 +424,7 @@ public static MethodInfo WriteJsonNameWithMappingMethod
402
424
if ( s_writeJsonNameWithMappingMethod == null )
403
425
{
404
426
s_writeJsonNameWithMappingMethod = typeof ( XmlObjectSerializerWriteContextComplexJson ) . GetMethod ( "WriteJsonNameWithMapping" , Globals . ScanAllMembers ) ;
427
+ Debug . Assert ( s_writeJsonNameWithMappingMethod != null ) ;
405
428
}
406
429
return s_writeJsonNameWithMappingMethod ;
407
430
}
@@ -414,6 +437,7 @@ public static MethodInfo WriteJsonValueMethod
414
437
if ( s_writeJsonValueMethod == null )
415
438
{
416
439
s_writeJsonValueMethod = typeof ( DataContractJsonSerializer ) . GetMethod ( "WriteJsonValue" , Globals . ScanAllMembers ) ;
440
+ Debug . Assert ( s_writeJsonValueMethod != null ) ;
417
441
}
418
442
return s_writeJsonValueMethod ;
419
443
}
@@ -426,6 +450,7 @@ public static MethodInfo WriteStartElementMethod
426
450
if ( s_writeStartElementMethod == null )
427
451
{
428
452
s_writeStartElementMethod = typeof ( XmlWriterDelegator ) . GetMethod ( "WriteStartElement" , Globals . ScanAllMembers , new Type [ ] { typeof ( XmlDictionaryString ) , typeof ( XmlDictionaryString ) } ) ;
453
+ Debug . Assert ( s_writeStartElementMethod != null ) ;
429
454
}
430
455
return s_writeStartElementMethod ;
431
456
}
@@ -439,6 +464,7 @@ public static MethodInfo WriteStartElementStringMethod
439
464
if ( s_writeStartElementStringMethod == null )
440
465
{
441
466
s_writeStartElementStringMethod = typeof ( XmlWriterDelegator ) . GetMethod ( "WriteStartElement" , Globals . ScanAllMembers , new Type [ ] { typeof ( string ) , typeof ( string ) } ) ;
467
+ Debug . Assert ( s_writeStartElementStringMethod != null ) ;
442
468
}
443
469
return s_writeStartElementStringMethod ;
444
470
}
@@ -465,6 +491,7 @@ public static MethodInfo GetJsonMemberNameMethod
465
491
if ( s_getJsonMemberNameMethod == null )
466
492
{
467
493
s_getJsonMemberNameMethod = typeof ( XmlObjectSerializerReadContextComplexJson ) . GetMethod ( "GetJsonMemberName" , Globals . ScanAllMembers , new Type [ ] { typeof ( XmlReaderDelegator ) } ) ;
494
+ Debug . Assert ( s_getJsonMemberNameMethod != null ) ;
468
495
}
469
496
return s_getJsonMemberNameMethod ;
470
497
}
0 commit comments