@@ -78,11 +78,27 @@ public GeneralUpdateBootstrap SetConfig(Configinfo configInfo)
7878 UpdateUrl = configInfo . UpdateUrl ,
7979 Scheme = configInfo . Scheme ,
8080 Token = configInfo . Token ,
81+ ProductId = configInfo . ProductId ,
8182 DriveEnabled = GetOption ( UpdateOption . Drive ) ?? false ,
8283 PatchEnabled = GetOption ( UpdateOption . Patch ) ?? true ,
8384 Script = configInfo . Script
8485 } ;
8586
87+ // Copy blacklist-related configuration if explicitly provided.
88+ if ( configInfo . BlackFiles != null )
89+ {
90+ _configInfo . BlackFiles = configInfo . BlackFiles ;
91+ }
92+
93+ if ( configInfo . BlackFormats != null )
94+ {
95+ _configInfo . BlackFormats = configInfo . BlackFormats ;
96+ }
97+
98+ if ( configInfo . SkipDirectorys != null )
99+ {
100+ _configInfo . SkipDirectorys = configInfo . SkipDirectorys ;
101+ }
86102 InitBlackList ( ) ;
87103 return this ;
88104 }
@@ -93,9 +109,8 @@ public GeneralUpdateBootstrap SetFieldMappings(Dictionary<string, string> fieldM
93109 return this ;
94110 }
95111
96- public GeneralUpdateBootstrap SetCustomSkipOption ( Func < bool > func )
112+ public GeneralUpdateBootstrap SetCustomSkipOption ( Func < bool > ? func )
97113 {
98- Debug . Assert ( func != null ) ;
99114 _customSkipOption = func ;
100115 return this ;
101116 }
@@ -246,8 +261,20 @@ private void InitBlackList()
246261 }
247262
248263 private bool CanSkip ( bool isForcibly )
249- => ! isForcibly && _customSkipOption ? . Invoke ( ) == true ;
264+ {
265+ if ( isForcibly )
266+ {
267+ return false ;
268+ }
250269
270+ // Treat a null custom skip option as "do not skip".
271+ if ( _customSkipOption is null )
272+ {
273+ return false ;
274+ }
275+
276+ return _customSkipOption ( ) ;
277+ }
251278 private static bool CheckUpgrade ( VersionRespDTO ? response )
252279 => response ? . Code == 200 && response . Body ? . Count > 0 ;
253280
0 commit comments