@@ -28,23 +28,23 @@ public static IGitVersionConfiguration Read(TextReader reader)
2828
2929 public static void Write ( IGitVersionConfiguration configuration , TextWriter writer )
3030 => Serializer . Serialize ( writer , configuration ) ;
31- }
3231
33- internal sealed class JsonPropertyNameInspector ( ITypeInspector innerTypeDescriptor ) : TypeInspectorSkeleton
34- {
35- public override IEnumerable < IPropertyDescriptor > GetProperties ( Type type , object ? container ) =>
36- innerTypeDescriptor . GetProperties ( type , container )
37- . Where ( p => p . GetCustomAttribute < JsonIgnoreAttribute > ( ) == null )
38- . Select ( p =>
39- {
40- var descriptor = new PropertyDescriptor ( p ) ;
41- var member = p . GetCustomAttribute < JsonPropertyNameAttribute > ( ) ;
42- if ( member is { Name : not null } )
32+ private sealed class JsonPropertyNameInspector ( ITypeInspector innerTypeDescriptor ) : TypeInspectorSkeleton
33+ {
34+ public override IEnumerable < IPropertyDescriptor > GetProperties ( Type type , object ? container ) =>
35+ innerTypeDescriptor . GetProperties ( type , container )
36+ . Where ( p => p . GetCustomAttribute < JsonIgnoreAttribute > ( ) == null )
37+ . Select ( p =>
4338 {
44- descriptor . Name = member . Name ;
45- }
46-
47- return ( IPropertyDescriptor ) descriptor ;
48- } )
49- . OrderBy ( p => p . Order ) ;
39+ var descriptor = new PropertyDescriptor ( p ) ;
40+ var member = p . GetCustomAttribute < JsonPropertyNameAttribute > ( ) ;
41+ if ( member is { Name : not null } )
42+ {
43+ descriptor . Name = member . Name ;
44+ }
45+
46+ return ( IPropertyDescriptor ) descriptor ;
47+ } )
48+ . OrderBy ( p => p . Order ) ;
49+ }
5050}
0 commit comments