diff --git a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
index cfa90215..6e158609 100644
Binary files a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs and b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs differ
diff --git a/src/c#/GeneralUpdate.Common/Shared/Object/ProcessInfo.cs b/src/c#/GeneralUpdate.Common/Shared/Object/ProcessInfo.cs
index 68710749..49e76d28 100644
--- a/src/c#/GeneralUpdate.Common/Shared/Object/ProcessInfo.cs
+++ b/src/c#/GeneralUpdate.Common/Shared/Object/ProcessInfo.cs
@@ -149,5 +149,47 @@ public ProcessInfo(string appName
///
[JsonPropertyName("Script")]
public string Script { get; set; }
+
+ ///
+ /// Creates a ProcessInfo instance from GlobalConfigInfo and version information.
+ /// This factory method centralizes parameter extraction to avoid manual parameter passing errors.
+ ///
+ /// Global configuration information
+ /// List of version information for updates
+ /// List of blacklisted file formats
+ /// List of blacklisted files
+ /// List of directories to skip
+ /// A new ProcessInfo instance
+ public static ProcessInfo CreateFromConfig(
+ GlobalConfigInfo configInfo,
+ List updateVersions,
+ List blackFileFormats,
+ List blackFiles,
+ List skipDirectories)
+ {
+ if (configInfo == null)
+ throw new ArgumentNullException(nameof(configInfo));
+
+ return new ProcessInfo(
+ configInfo.MainAppName,
+ configInfo.InstallPath,
+ configInfo.ClientVersion,
+ configInfo.LastVersion,
+ configInfo.UpdateLogUrl,
+ configInfo.Encoding,
+ configInfo.Format,
+ configInfo.DownloadTimeOut,
+ configInfo.AppSecretKey,
+ updateVersions,
+ configInfo.ReportUrl,
+ configInfo.BackupDirectory,
+ configInfo.Bowl,
+ configInfo.Scheme,
+ configInfo.Token,
+ configInfo.Script,
+ blackFileFormats,
+ blackFiles,
+ skipDirectories);
+ }
}
}
\ No newline at end of file