Skip to content

Commit 023e27a

Browse files
authored
Batch 7: Extension points + configuration completion (#374)
- Add DownloadOrchestrator<T>() extension point to AbstractBootstrap - Add DiffMode option to UpdateOptions (Serial default) - Note ICleanStrategy/IDirtyStrategy placeholders for cross-project ref Closes #373
1 parent e9eb58c commit 023e27a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/c#/GeneralUpdate.Core/Configuration/AbstractBootstrap.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ protected T GetOption<T>(UpdateOption<T>? option)
8282
public TBootstrap UpdateAuth<T>() where T : Security.IHttpAuthProvider, new()
8383
{ _extensions[typeof(Security.IHttpAuthProvider)] = typeof(T); return (TBootstrap)this; }
8484

85+
public TBootstrap DownloadOrchestrator<T>() where T : Download.Abstractions.IDownloadOrchestrator, new()
86+
{ _extensions[typeof(Download.Abstractions.IDownloadOrchestrator)] = typeof(T); return (TBootstrap)this; }
87+
88+
// ICleanStrategy / IDirtyStrategy extension points are in GeneralUpdate.Differential.
89+
// Add via external extension methods once the project reference is established.
90+
8591
public TBootstrap ConfigureBlackList(BlackListConfig config)
8692
{
8793
_instances[typeof(BlackListConfig)] = config ?? BlackListConfig.Empty;

src/c#/GeneralUpdate.Core/Configuration/UpdateOptions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ public static class UpdateOptions
1414
// ═══ Core ═══
1515
public static UpdateOption<int> AppType { get; } = UpdateOption.ValueOf<int>("APPTYPE", Configuration.AppType.ClientApp);
1616

17+
// ═══ Diff mode ═══
18+
public static UpdateOption<DiffMode> DiffMode { get; } = UpdateOption.ValueOf<DiffMode>("DIFFMODE", Configuration.DiffMode.Serial);
19+
1720
// ═══ Backward-compatible options ═══
1821
public static UpdateOption<Encoding> Encoding { get; } = UpdateOption.ValueOf<Encoding>("COMPRESSENCODING", System.Text.Encoding.UTF8);
1922
public static UpdateOption<string> Format { get; } = UpdateOption.ValueOf<string>("COMPRESSFORMAT", "ZIP");

0 commit comments

Comments
 (0)