@@ -20,7 +20,7 @@ public TypeReifier() {
20
20
RegisteredFromDocs [ typeof ( TimeSpan ) ] = BuiltInTypeReifiers . FromTimeSpan ;
21
21
}
22
22
23
- internal class ReificationResult {
23
+ class ReificationResult {
24
24
internal bool ShouldVerifyMemberHashes ;
25
25
internal readonly List < int > SetMemberHashes = new List < int > ( ) ;
26
26
@@ -122,7 +122,7 @@ public void SetStaticMembers(Type type, DocNode doc, ReificationOptions options)
122
122
}
123
123
124
124
// Check whether any required members in the type were not set.
125
- if ( missingRequiredMemberNames != null && missingRequiredMemberNames . Count > 0 ) {
125
+ if ( missingRequiredMemberNames is { Count : > 0 } ) {
126
126
throw new MissingFieldsException ( type , doc , $ "Missing doc fields: { JoinList ( missingRequiredMemberNames , ", " ) } ") ;
127
127
}
128
128
@@ -280,7 +280,7 @@ public bool SetFieldOnStruct<T>(ref T obj, string fieldName, DocNode doc, Reific
280
280
}
281
281
282
282
// Figure out the size of each dimension the array.
283
- var lengths = new int [ rank ] ;
283
+ int [ ] lengths = new int [ rank ] ;
284
284
var currentArray = doc ;
285
285
for ( int dimensionIndex = 0 ; dimensionIndex < rank ; ++ dimensionIndex ) {
286
286
lengths [ dimensionIndex ] = currentArray . Count ;
@@ -327,8 +327,8 @@ void ReadArray(DocNode current, int currentRank) {
327
327
for ( int i = 0 ; i < current . Count ; ++ i ) {
328
328
currentIndex [ currentRank ] = i ;
329
329
if ( currentRank == rank - 1 ) {
330
- var existingElement = arrayValue . GetValue ( currentIndex ) ;
331
- var updatedElement = ReadValueOfType ( elementType , existingElement , current [ i ] , options ) ;
330
+ object ? existingElement = arrayValue . GetValue ( currentIndex ) ;
331
+ object ? updatedElement = ReadValueOfType ( elementType , existingElement , current [ i ] , options ) ;
332
332
arrayValue . SetValue ( updatedElement , currentIndex ) ;
333
333
} else {
334
334
ReadArray ( current [ i ] , currentRank + 1 ) ;
0 commit comments