Skip to content

GeneralUpdate.Drivelution Refactoring #146

@JusterZhu

Description

@JusterZhu
  1. Remove content that affects AOT (Ahead-of-Time compilation).
  2. Remove all Serilog-related components and associated code logic; for the relevant content, simply throw exceptions or send event notifications to the caller.
  3. GeneralUpdate.Core should not reference the GeneralUpdate.Drivelution project directly. Instead, reference all files of GeneralUpdate.Drivelution via linking (as shown below). GeneralUpdate.Core/DrivelutionMiddleware and its associated upstream and downstream logic need to be re-adapted according to the above changes.
<Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Configuration\DriverUpdateOptions.cs" Link="Common\DriverUpdateOptions.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Exceptions\DriverUpdateExceptions.cs" Link="Common\DriverUpdateExceptions.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\IDriverBackup.cs" Link="Common\IDriverBackup.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\IDriverValidator.cs" Link="Common\IDriverValidator.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\IGeneralDrivelution.cs" Link="Common\IGeneralDrivelution.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\INetworkDownloader.cs" Link="Common\INetworkDownloader.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Models\DriverInfo.cs" Link="Common\DriverInfo.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Models\ErrorInfo.cs" Link="Common\ErrorInfo.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Models\UpdateResult.cs" Link="Common\UpdateResult.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Abstractions\Models\UpdateStrategy.cs" Link="Common\UpdateStrategy.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\DriverUpdaterFactory.cs" Link="Common\DriverUpdaterFactory.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\Logging\LoggerConfigurator.cs" Link="Common\LoggerConfigurator.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\Utilities\CompatibilityChecker.cs" Link="Common\CompatibilityChecker.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\Utilities\HashValidator.cs" Link="Common\HashValidator.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\Utilities\RestartHelper.cs" Link="Common\RestartHelper.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Core\Utilities\VersionComparer.cs" Link="Common\VersionComparer.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\GeneralDrivelution.cs" Link="Common\GeneralDrivelution.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Linux\Helpers\LinuxPermissionHelper.cs" Link="Common\LinuxPermissionHelper.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Linux\Helpers\LinuxSignatureHelper.cs" Link="Common\LinuxSignatureHelper.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Linux\Implementation\LinuxDriverBackup.cs" Link="Common\LinuxDriverBackup.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Linux\Implementation\LinuxDriverValidator.cs" Link="Common\LinuxDriverValidator.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Linux\Implementation\LinuxGeneralDrivelution.cs" Link="Common\LinuxGeneralDrivelution.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\MacOS\Implementation\MacOsGeneralDrivelution.cs" Link="Common\MacOsGeneralDrivelution.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Windows\Helpers\WindowsPermissionHelper.cs" Link="Common\WindowsPermissionHelper.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Windows\Helpers\WindowsSignatureHelper.cs" Link="Common\WindowsSignatureHelper.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Windows\Implementation\WindowsDriverBackup.cs" Link="Common\WindowsDriverBackup.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Windows\Implementation\WindowsDriverValidator.cs" Link="Common\WindowsDriverValidator.cs" />
    <Compile Include="..\GeneralUpdate.Drivelution\Windows\Implementation\WindowsGeneralDrivelution.cs" Link="Common\WindowsGeneralDrivelution.cs" />
  1. After completing the above modifications, please verify that all code in GeneralUpdate.ClientCore, GeneralUpdate.Core, and GeneralUpdate.Drivelution is functional and meets the requirements for enterprise-level production deployment.

Metadata

Metadata

Labels

refactorRefactor some existing code.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions