diff --git a/src/c#/GeneralUpdate.Core/Configuration/AbstractBootstrap.cs b/src/c#/GeneralUpdate.Core/Configuration/AbstractBootstrap.cs index 0d872b72..c64d9c22 100644 --- a/src/c#/GeneralUpdate.Core/Configuration/AbstractBootstrap.cs +++ b/src/c#/GeneralUpdate.Core/Configuration/AbstractBootstrap.cs @@ -85,8 +85,13 @@ protected T GetOption(UpdateOption? option) public TBootstrap DownloadOrchestrator() where T : Download.Abstractions.IDownloadOrchestrator, new() { _extensions[typeof(Download.Abstractions.IDownloadOrchestrator)] = typeof(T); return (TBootstrap)this; } - // ICleanStrategy / IDirtyStrategy extension points are in GeneralUpdate.Differential. - // Add via external extension methods once the project reference is established. + /// Register a custom clean strategy by type name (interface lives in GeneralUpdate.Differential). + public TBootstrap CleanStrategy() where T : class, new() + { _extensions[typeof(T)] = typeof(T); return (TBootstrap)this; } + + /// Register a custom dirty strategy by type name (interface lives in GeneralUpdate.Differential). + public TBootstrap DirtyStrategy() where T : class, new() + { _extensions[typeof(T)] = typeof(T); return (TBootstrap)this; } public TBootstrap ConfigureBlackList(BlackListConfig config) { diff --git a/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj b/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj index b2985972..61fa96bc 100644 --- a/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj +++ b/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj @@ -34,7 +34,8 @@ - + diff --git a/src/c#/GeneralUpdate.Core/Strategy/LinuxStrategy.cs b/src/c#/GeneralUpdate.Core/Strategy/LinuxStrategy.cs index 19fbec74..e9791a96 100644 --- a/src/c#/GeneralUpdate.Core/Strategy/LinuxStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategy/LinuxStrategy.cs @@ -36,8 +36,7 @@ protected override PipelineBuilder BuildPipeline(PipelineContext context) .UseMiddlewareIf(_configinfo.PatchEnabled) .UseMiddleware() .UseMiddleware(); - // DrivelutionMiddleware requires GeneralUpdate.Drivelution project reference; - // uncomment when the reference is added for net10.0 target. + // DrivelutionMiddleware: add GeneralUpdate.Drivelution project reference to enable return builder; } diff --git a/src/c#/GeneralUpdate.Core/Strategy/WindowsStrategy.cs b/src/c#/GeneralUpdate.Core/Strategy/WindowsStrategy.cs index 49f3b823..ac3b4f9f 100644 --- a/src/c#/GeneralUpdate.Core/Strategy/WindowsStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategy/WindowsStrategy.cs @@ -38,8 +38,7 @@ protected override PipelineBuilder BuildPipeline(PipelineContext context) .UseMiddlewareIf(_configinfo.PatchEnabled) .UseMiddleware() .UseMiddleware(); - // DrivelutionMiddleware requires GeneralUpdate.Drivelution project reference; - // uncomment when the reference is added for net10.0 target. + // DrivelutionMiddleware: add GeneralUpdate.Drivelution project reference to enable return builder; }