Skip to content

Rename DriverUpdate to Drivelution across codebase#141

Merged
JusterZhu merged 3 commits intodriverfrom
copilot/sub-pr-138
Feb 8, 2026
Merged

Rename DriverUpdate to Drivelution across codebase#141
JusterZhu merged 3 commits intodriverfrom
copilot/sub-pr-138

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Replaces all instances of "DriverUpdate" with "Drivelution" for consistent naming throughout the GeneralUpdate.Drivelution library.

Changes

  • Class names: DriverUpdateExceptionDrivelutionException, DriverUpdateOptionsDrivelutionOptions, DriverUpdaterFactoryDrivelutionFactory
  • Error codes: DU_*DR_* prefix (e.g., DU_UNKNOWNDR_UNKNOWN, DU_PERMISSION_DENIEDDR_PERMISSION_DENIED)
  • Log paths: ./Logs/driver-update-.log./Logs/drivelution-.log
  • Test classes: DriverUpdaterFactoryTestsDrivelutionFactoryTests
  • Documentation: All code examples and references updated

Example

// Before
var options = new DriverUpdateOptions { LogLevel = "Debug" };
var updater = DriverUpdaterFactory.Create(logger, options);

// After
var options = new DrivelutionOptions { LogLevel = "Debug" };
var updater = DrivelutionFactory.Create(logger, options);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 8, 2026 17:11
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GeneralUpdate.Drivelution functionality Rename DriverUpdate to Drivelution across codebase Feb 8, 2026
Copilot AI requested a review from JusterZhu February 8, 2026 17:15
@JusterZhu JusterZhu marked this pull request as ready for review February 8, 2026 17:18
Copilot AI review requested due to automatic review settings February 8, 2026 17:18
@JusterZhu JusterZhu merged commit 9573e67 into driver Feb 8, 2026
2 checks passed
@JusterZhu JusterZhu deleted the copilot/sub-pr-138 branch February 8, 2026 17:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the public-facing “DriverUpdate” naming to “Drivelution” throughout the GeneralUpdate.Drivelution C# library, aligning API types, error codes, logging defaults, tests, and documentation under the new naming.

Changes:

  • Renamed core public API types (options, exception base, factory) to Drivelution* and updated call sites.
  • Updated error code prefixes from DU_* to DR_* and adjusted default/embedded log file paths.
  • Updated tests and markdown documentation examples to use the new names.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/c#/GeneralUpdate.Drivelution/Windows/Implementation/WindowsGeneralDrivelution.cs Updates unknown error code fallback and exception type check to Drivelution naming.
src/c#/GeneralUpdate.Drivelution/GeneralDrivelution.cs Updates public Create(...) overloads and platform info to use DrivelutionOptions and DrivelutionFactory.
src/c#/GeneralUpdate.Drivelution/Core/Logging/LoggerConfigurator.cs Updates configuration API to accept DrivelutionOptions and switches default log path.
src/c#/GeneralUpdate.Drivelution/Core/DriverUpdaterFactory.cs Renames factory type to DrivelutionFactory and updates option type usage.
src/c#/GeneralUpdate.Drivelution/Abstractions/Exceptions/DriverUpdateExceptions.cs Renames base exception to DrivelutionException and updates error code strings.
src/c#/GeneralUpdate.Drivelution/Abstractions/Configuration/DriverUpdateOptions.cs Renames options type to DrivelutionOptions and updates default log path.
src/c#/DrivelutionTest/GeneralDrivelutionTests.cs Updates tests to construct DrivelutionOptions.
src/c#/DrivelutionTest/Core/DriverUpdaterFactoryTests.cs Renames the test class and updates references to DrivelutionFactory.
doc/GeneralUpdate.Drivelution.md Updates documentation snippets to use new types and log path.
Comments suppressed due to low confidence (1)

src/c#/GeneralUpdate.Drivelution/Core/Logging/LoggerConfigurator.cs:23

  • ConfigureLogger takes a non-nullable DrivelutionOptions (nullable refs are enabled), but it still performs a null-check and throws. Either make the parameter nullable (DrivelutionOptions?) if null is a supported input, or remove the dead null-check to avoid misleading API contracts.
    public static ILogger ConfigureLogger(DrivelutionOptions options)
    {
        if (options == null)
        {
            throw new ArgumentNullException(nameof(options));

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +12
public class DrivelutionException : Exception
{
public string ErrorCode { get; set; }
public bool CanRetry { get; set; }

public DriverUpdateException(string message, string errorCode = "DU_UNKNOWN", bool canRetry = false)
public DrivelutionException(string message, string errorCode = "DR_UNKNOWN", bool canRetry = false)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name (DriverUpdateExceptions.cs) still reflects the old naming even though the base type is now DrivelutionException. Consider renaming the file (e.g., DrivelutionExceptions.cs) to keep filenames aligned with the current public API and improve discoverability.

Copilot uses AI. Check for mistakes.
/// Validates platform detection, factory creation, and platform-specific implementations.
/// </summary>
public class DriverUpdaterFactoryTests
public class DrivelutionFactoryTests
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test file name (DriverUpdaterFactoryTests.cs) no longer matches the renamed test class DrivelutionFactoryTests. Renaming the file to DrivelutionFactoryTests.cs will keep test discovery/navigation consistent with the rest of the test project.

Suggested change
public class DrivelutionFactoryTests
public class DriverUpdaterFactoryTests

Copilot uses AI. Check for mistakes.
/// Driver updater factory - Automatically detects platform and creates appropriate implementation
/// </summary>
public static class DriverUpdaterFactory
public static class DrivelutionFactory
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name no longer matches the public type it contains (file is DriverUpdaterFactory.cs but the type is DrivelutionFactory). This makes navigation harder and can trip analyzers/conventions; consider renaming the file to DrivelutionFactory.cs to match the class name.

Suggested change
public static class DrivelutionFactory
public static class DriverUpdaterFactory

Copilot uses AI. Check for mistakes.
/// Driver update configuration options
/// </summary>
public class DriverUpdateOptions
public class DrivelutionOptions
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name (DriverUpdateOptions.cs) no longer matches the public type it contains (DrivelutionOptions). To stay consistent with the rest of the project’s one-type-per-file naming (e.g., Abstractions/Models/DriverInfo.cs), consider renaming the file to DrivelutionOptions.cs.

Copilot uses AI. Check for mistakes.
/// <returns>适配当前平台的驱动更新器 / Platform-adapted driver updater</returns>
/// <exception cref="PlatformNotSupportedException">当前平台不支持时抛出 / Thrown when platform is not supported</exception>
public static IGeneralDrivelution Create(DriverUpdateOptions? options = null)
public static IGeneralDrivelution Create(DrivelutionOptions? options = null)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming public API types/method signatures (e.g., DriverUpdateOptions -> DrivelutionOptions) is a breaking change for downstream consumers. If backwards compatibility is important, consider adding [Obsolete] shim types (e.g., DriverUpdateOptions inheriting/forwarding to DrivelutionOptions, and a DriverUpdaterFactory wrapper) to provide a migration path.

Copilot uses AI. Check for mistakes.
JusterZhu added a commit that referenced this pull request Feb 9, 2026
* add GeneralUpdate.Drivelution

* Add comprehensive documentation for GeneralUpdate.Drivelution (#139)

* Initial plan

* Add comprehensive README documentation for GeneralUpdate.Drivelution

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Add comprehensive test suite for GeneralUpdate.Drivelution (#140)

* Initial plan

* Add comprehensive test cases for GeneralUpdate.Drivelution

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Address code review feedback: improve test quality and cleanup

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Rename DriverUpdate to Drivelution across codebase (#141)

* Initial plan

* Replace all instances of DriverUpdate with Drivelution

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Update error code prefixes from DU_ to DR_

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Add GetDriversFromDirectoryAsync for local driver discovery (#142)

* Initial plan

* Add GetDriversFromDirectoryAsync method to read driver information from local directory

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Add tests for GetDriversFromDirectoryAsync method

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Fix security issues: prevent command injection and improve certificate parsing

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

* Translate all Chinese annotations to English

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants