@@ -170,9 +170,13 @@ public static void Upgrade(Version fromVersion, Version toVersion)
170170 {
171171 _log . Info ( $ "Start settings upgrade from { fromVersion } to { toVersion } ...") ;
172172
173- // 2022.12.22.0
174- if ( fromVersion < new Version ( 2022 , 12 , 22 , 0 ) )
175- UpgradeTo202212220 ( ) ;
173+ // 2022.12.20.0
174+ if ( fromVersion < new Version ( 2022 , 12 , 20 , 0 ) )
175+ UpgradeTo_2022_12_20_0 ( ) ;
176+
177+ // 2023.3.7.0
178+ if ( fromVersion < new Version ( 2023 , 3 , 7 , 0 ) )
179+ UpgradeTo_2023_3_7_0 ( ) ;
176180
177181 // Latest
178182 if ( fromVersion < toVersion )
@@ -186,11 +190,11 @@ public static void Upgrade(Version fromVersion, Version toVersion)
186190 }
187191
188192 /// <summary>
189- /// Method to apply changes for version 2022.12.22 .0.
193+ /// Method to apply changes for version 2022.12.20 .0.
190194 /// </summary>
191- private static void UpgradeTo202212220 ( )
195+ private static void UpgradeTo_2022_12_20_0 ( )
192196 {
193- _log . Info ( "Apply update to 2022.12.22 .0..." ) ;
197+ _log . Info ( "Apply update to 2022.12.20 .0..." ) ;
194198
195199 // Add AWS Session Manager application
196200 _log . Info ( "Add new app \" AWSSessionManager\" ..." ) ;
@@ -215,43 +219,23 @@ private static void UpgradeTo202212220()
215219 }
216220
217221 /// <summary>
218- /// Method to apply changes for the latest version.
222+ /// Method to apply changes for version 2023.3.7.0 .
219223 /// </summary>
220- /// <param name="version">Latest version.</param>
221- private static void UpgradeToLatest ( Version version )
224+ private static void UpgradeTo_2023_3_7_0 ( )
222225 {
223- _log . Info ( $ "Apply upgrade to { version } ...") ;
224-
226+ _log . Info ( "Apply update to 2023.3.7.0 ..." ) ;
227+
225228 // Add NTP Lookup application
226229 _log . Info ( $ "Add new app \" SNTPLookup\" ...") ;
227230 Current . General_ApplicationList . Add ( ApplicationManager . GetList ( ) . First ( x => x . Name == ApplicationName . SNTPLookup ) ) ;
228231 Current . SNTPLookup_SNTPServers = new ObservableCollection < ServerConnectionInfoProfile > ( SNTPServer . GetDefaultList ( ) ) ;
229-
230- // Update some default settings values, if necessary
231- if ( Current . IPScanner_MaxHostThreads > 1024 )
232- {
233- _log . Info ( "Change \" IPScanner_Threads\" to \" 1024\" ..." ) ;
234- Current . IPScanner_MaxHostThreads = 1024 ;
235- }
236-
237- if ( Current . PortScanner_MaxHostThreads > 256 )
238- {
239- _log . Info ( "Change \" PortScanner_HostThreads\" to \" 256\" ..." ) ;
240- Current . PortScanner_MaxHostThreads = 256 ;
241- }
242-
243- if ( Current . PortScanner_MaxPortThreads > 1024 )
244- {
245- _log . Info ( "Change \" PortScanner_PortThreads\" to \" 1024\" ..." ) ;
246- Current . PortScanner_MaxPortThreads = 1024 ;
247- }
248-
232+
249233 // Add IP Scanner custom commands
250- foreach ( var customCommand in IPScannerCustomCommand . GetDefaultList ( ) )
234+ foreach ( var customCommand in IPScannerCustomCommand . GetDefaultList ( ) )
251235 {
252236 var customCommandFound = Current . IPScanner_CustomCommands . FirstOrDefault ( x => x . Name == customCommand . Name ) ;
253237
254- if ( customCommandFound == null )
238+ if ( customCommandFound == null )
255239 {
256240 _log . Info ( $ "Add \" { customCommand . Name } \" to \" IPScanner_CustomCommands\" ...") ;
257241 Current . IPScanner_CustomCommands . Add ( customCommand ) ;
@@ -280,6 +264,14 @@ private static void UpgradeToLatest(Version version)
280264 _log . Info ( "Init \" DNSLookup_DNSServers_v2\" with default DNS servers..." ) ;
281265 Current . DNSLookup_DNSServers_v2 = new ObservableCollection < DNSServerConnectionInfoProfile > ( DNSServer . GetDefaultList ( ) ) ;
282266 }
283- #endregion
284267
268+ /// <summary>
269+ /// Method to apply changes for the latest version.
270+ /// </summary>
271+ /// <param name="version">Latest version.</param>
272+ private static void UpgradeToLatest ( Version version )
273+ {
274+ _log . Info ( $ "Apply upgrade to { version } ...") ;
275+ }
276+ #endregion
285277}
0 commit comments