@@ -33,10 +33,8 @@ internal sealed class MainFeature : Feature
3333 private const string _jsonName = "json" ;
3434 internal readonly FlagInput JsonInput = new ( _jsonName , [ "-j" , "--json" ] , "Output to json file" ) ;
3535
36- #if NET6_0_OR_GREATER
3736 private const string _nestedName = "nested" ;
3837 internal readonly FlagInput NestedInput = new ( _nestedName , [ "-n" , "--nested" ] , "Output to nested json file" ) ;
39- #endif
4038#endif
4139
4240 private const string _noArchivesName = "no-archives" ;
@@ -84,9 +82,7 @@ public MainFeature()
8482 Add ( FileOnlyInput ) ;
8583#if NETCOREAPP
8684 Add ( JsonInput ) ;
87- #if NET6_0_OR_GREATER
8885 Add ( NestedInput ) ;
89- #endif
9086#endif
9187 Add ( NoContentsInput ) ;
9288 Add ( NoArchivesInput ) ;
@@ -106,9 +102,7 @@ public override bool Execute()
106102 FileOnly = GetBoolean ( _fileOnlyName ) ;
107103#if NETCOREAPP
108104 Json = GetBoolean ( _jsonName ) ;
109- #if NET6_0_OR_GREATER
110105 Nested = GetBoolean ( _nestedName ) ;
111- #endif
112106#endif
113107
114108 // Create scanner for all paths
@@ -172,10 +166,8 @@ private void GetAndWriteProtections(Scanner scanner, string path)
172166#if NETCOREAPP
173167 if ( Json )
174168 WriteProtectionResultJson ( path , protections ) ;
175- #if NET6_0_OR_GREATER
176169 if ( Nested )
177170 WriteProtectionResultNestedJson ( path , protections ) ;
178- #endif
179171#endif
180172 }
181173 catch ( Exception ex )
@@ -284,7 +276,6 @@ private void WriteProtectionResultJson(string path, Dictionary<string, List<stri
284276 }
285277 }
286278
287- #if NET6_0_OR_GREATER
288279 /// <summary>
289280 /// Write the protection results from a single path to a nested json file, if possible
290281 /// </summary>
@@ -384,7 +375,6 @@ public static void DeepInsert(ref Dictionary<string, dynamic> obj, string path,
384375 }
385376 }
386377 }
387- #endif
388378#endif
389379 }
390380}
0 commit comments