@@ -170,9 +170,13 @@ public static void Upgrade(Version fromVersion, Version toVersion)
170
170
{
171
171
_log . Info ( $ "Start settings upgrade from { fromVersion } to { toVersion } ...") ;
172
172
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 ( ) ;
176
180
177
181
// Latest
178
182
if ( fromVersion < toVersion )
@@ -186,11 +190,11 @@ public static void Upgrade(Version fromVersion, Version toVersion)
186
190
}
187
191
188
192
/// <summary>
189
- /// Method to apply changes for version 2022.12.22 .0.
193
+ /// Method to apply changes for version 2022.12.20 .0.
190
194
/// </summary>
191
- private static void UpgradeTo202212220 ( )
195
+ private static void UpgradeTo_2022_12_20_0 ( )
192
196
{
193
- _log . Info ( "Apply update to 2022.12.22 .0..." ) ;
197
+ _log . Info ( "Apply update to 2022.12.20 .0..." ) ;
194
198
195
199
// Add AWS Session Manager application
196
200
_log . Info ( "Add new app \" AWSSessionManager\" ..." ) ;
@@ -215,43 +219,23 @@ private static void UpgradeTo202212220()
215
219
}
216
220
217
221
/// <summary>
218
- /// Method to apply changes for the latest version.
222
+ /// Method to apply changes for version 2023.3.7.0 .
219
223
/// </summary>
220
- /// <param name="version">Latest version.</param>
221
- private static void UpgradeToLatest ( Version version )
224
+ private static void UpgradeTo_2023_3_7_0 ( )
222
225
{
223
- _log . Info ( $ "Apply upgrade to { version } ...") ;
224
-
226
+ _log . Info ( "Apply update to 2023.3.7.0 ..." ) ;
227
+
225
228
// Add NTP Lookup application
226
229
_log . Info ( $ "Add new app \" SNTPLookup\" ...") ;
227
230
Current . General_ApplicationList . Add ( ApplicationManager . GetList ( ) . First ( x => x . Name == ApplicationName . SNTPLookup ) ) ;
228
231
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
+
249
233
// Add IP Scanner custom commands
250
- foreach ( var customCommand in IPScannerCustomCommand . GetDefaultList ( ) )
234
+ foreach ( var customCommand in IPScannerCustomCommand . GetDefaultList ( ) )
251
235
{
252
236
var customCommandFound = Current . IPScanner_CustomCommands . FirstOrDefault ( x => x . Name == customCommand . Name ) ;
253
237
254
- if ( customCommandFound == null )
238
+ if ( customCommandFound == null )
255
239
{
256
240
_log . Info ( $ "Add \" { customCommand . Name } \" to \" IPScanner_CustomCommands\" ...") ;
257
241
Current . IPScanner_CustomCommands . Add ( customCommand ) ;
@@ -280,6 +264,14 @@ private static void UpgradeToLatest(Version version)
280
264
_log . Info ( "Init \" DNSLookup_DNSServers_v2\" with default DNS servers..." ) ;
281
265
Current . DNSLookup_DNSServers_v2 = new ObservableCollection < DNSServerConnectionInfoProfile > ( DNSServer . GetDefaultList ( ) ) ;
282
266
}
283
- #endregion
284
267
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
285
277
}
0 commit comments