π§ GeneralUpdate Advanced Customization Reference
Covers extension point architecture, Pipeline, differential engine, Bowl crash daemon, event system, and filesystem tools.
β οΈ API Version Note: This guide is based on NuGet v10.4.6 stable.
The following features do NOT exist in the stable release (but are available in dev branch v10.5.0-beta.2):
IUpdateHookslifecycle hooksIProcessInfoProviderIPC replacement interfaceSilentPollOrchestratorsilent pollerOptionprogrammable config system (v10.4.6 usesConfiginfoproperties only)ISslValidationPolicySSL policy interfaceFeature availability is noted in each section.
1. Pipeline System (v10.4.6 available)β
GeneralUpdate uses the Pipeline pattern for update package verification, extraction, and patch application.
PipelineBuilder APIβ
using GeneralUpdate.Common.Internal.Pipeline;
using GeneralUpdate.Common.Internal.Strategy;
var context = new PipelineContext();
context.Add("ZipFilePath", @"C:\temp\update.zip");
context.Add("Hash", "sha256-hex-value");
context.Add("Format", 0); // 0=Zip
context.Add("Encoding", System.Text.Encoding.UTF8);
context.Add("SourcePath", @"C:\Program Files\MyApp");
context.Add("PatchEnabled", true);
await new PipelineBuilder(context)
.UseMiddleware<HashMiddleware>() // Hash verification
.UseMiddleware<CompressMiddleware>() // Extraction
.UseMiddleware<PatchMiddleware>() // Differential patch
.Build();
2. Strategy System (v10.4.6 available)β
| Strategy | Class | Platform |
|---|---|---|
| Windows | WindowsStrategy | Windows |
| Linux | LinuxStrategy | Linux |
| OSS | OSSStrategy | Cross-platform |
β οΈ Stable release does not support custom strategy injection via
bootstrap.Strategy<T>().
3. Bowl Crash Daemon (v10.4.6 limited)β
β οΈ v10.4.6 Bowl only provides basic type definitions.
Bowlclass has no publicLaunchAsyncmethod. Full functionality is in dev branch.
MonitorParameter Configurationβ
using GeneralUpdate.Bowl;
using GeneralUpdate.Bowl.Strategys;
var param = new MonitorParameter
{
ProcessNameOrId = "MyApp.exe",
DumpFileName = "v1.0.0.0_fail.dmp",
FailFileName = "v1.0.0.0_fail.json",
TargetPath = @"C:\Program Files\MyApp",
FailDirectory = @"C:\Program Files\MyApp\fail",
BackupDirectory = @"C:\Program Files\MyApp\backup",
WorkModel = "Upgrade",
};
var bowl = new Bowl();
4. EventManager (v10.4.6 available)β
using GeneralUpdate.Common.Internal.Event;
// Add listener
EventManager.Instance.AddListener((object? sender, UpdateInfoEventArgs e) => { });
// Dispatch event manually
EventManager.Instance.Dispatch(this, new ExceptionEventArgs(ex, "Custom error"));
// Clear all listeners
EventManager.Instance.Clear();
// Dispose
EventManager.Instance.Dispose();
β οΈ EventManager is a global singleton. After
Dispose(),Instanceis still accessible (found by code audit).
Feature Availability Indexβ
| Feature | Availability | Reference |
|---|---|---|
| Pipeline | β v10.4.6 | GeneralUpdate.Common.Internal.Pipeline |
| Strategy System | β v10.4.6 | GeneralUpdate.Common.Internal.Strategy |
| FileTree | β v10.4.6 | GeneralUpdate.Common.FileBasic |
| BlackList | β v10.4.6 | Configinfo.BlackFiles etc. |
| Differential Engine | β
needs GeneralUpdate.Differential | DifferentialCore |
| AOT | β v10.4.6 | JsonSerializerContext subclasses |
| EventManager | β v10.4.6 | GeneralUpdate.Common.Internal.Event |
| Bowl Crash Daemon | β οΈ Basic types only | GeneralUpdate.Bowl.Bowl |
| IUpdateHooks | β v10.4.6 unsupported | Dev branch v10.5.0-beta.2 |
| Custom Strategy Injection | β v10.4.6 unsupported | Dev branch v10.5.0-beta.2 |
| IPC Replacement Interface | β v10.4.6 unsupported | Dev branch v10.5.0-beta.2 |
| SilentPollOrchestrator | β v10.4.6 unsupported | Dev branch v10.5.0-beta.2 |
| Option System | β v10.4.6 unsupported | Configinfo properties only |