Skip to content

Commit 7d4ccb6

Browse files
CopilotJusterZhu
andcommitted
Improve obsolete attribute messages with migration guidance
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
1 parent 8b1f43e commit 7d4ccb6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/c#/GeneralUpdate.Drivelution/Core/DriverUpdaterFactory.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public static class DrivelutionFactory
1919
/// 创建适合当前平台的驱动更新器
2020
/// Creates a driver updater suitable for the current platform
2121
/// </summary>
22-
/// <param name="logger">日志记录器(已弃用,保留仅为向后兼容)/ Logger (deprecated, kept for backward compatibility only)</param>
22+
/// <param name="logger">日志记录器(已废弃,内部使用GeneralTracer)/ Logger (deprecated, uses GeneralTracer internally)</param>
2323
/// <param name="options">配置选项(可选)/ Configuration options (optional)</param>
2424
/// <returns>平台特定的驱动更新器实现 / Platform-specific driver updater implementation</returns>
2525
/// <exception cref="PlatformNotSupportedException">当前平台不支持时抛出 / Thrown when current platform is not supported</exception>
26-
[Obsolete("Logger parameter is deprecated. The implementation now uses GeneralTracer for logging.", false)]
26+
[Obsolete("Logger parameter is deprecated and will be ignored. The implementation now uses GeneralTracer for logging. Call Create(null, options) or omit the logger parameter.", false)]
2727
public static IGeneralDrivelution Create(IDrivelutionLogger? logger = null, DrivelutionOptions? options = null)
2828
{
2929
// Detect platform and create appropriate implementation
@@ -63,9 +63,9 @@ public static IGeneralDrivelution Create(IDrivelutionLogger? logger = null, Driv
6363
/// 创建适合当前平台的驱动验证器
6464
/// Creates a driver validator suitable for the current platform
6565
/// </summary>
66-
/// <param name="logger">日志记录器(已弃用,保留仅为向后兼容)/ Logger (deprecated, kept for backward compatibility only)</param>
66+
/// <param name="logger">日志记录器(已废弃,内部使用GeneralTracer)/ Logger (deprecated, uses GeneralTracer internally)</param>
6767
/// <returns>平台特定的驱动验证器实现 / Platform-specific driver validator implementation</returns>
68-
[Obsolete("Logger parameter is deprecated. The implementation now uses GeneralTracer for logging.", false)]
68+
[Obsolete("Logger parameter is deprecated and will be ignored. The implementation now uses GeneralTracer for logging. Call CreateValidator() without parameters.", false)]
6969
public static IDriverValidator CreateValidator(IDrivelutionLogger? logger = null)
7070
{
7171
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -90,9 +90,9 @@ public static IDriverValidator CreateValidator(IDrivelutionLogger? logger = null
9090
/// 创建适合当前平台的驱动备份管理器
9191
/// Creates a driver backup manager suitable for the current platform
9292
/// </summary>
93-
/// <param name="logger">日志记录器(已弃用,保留仅为向后兼容)/ Logger (deprecated, kept for backward compatibility only)</param>
93+
/// <param name="logger">日志记录器(已废弃,内部使用GeneralTracer)/ Logger (deprecated, uses GeneralTracer internally)</param>
9494
/// <returns>平台特定的驱动备份实现 / Platform-specific driver backup implementation</returns>
95-
[Obsolete("Logger parameter is deprecated. The implementation now uses GeneralTracer for logging.", false)]
95+
[Obsolete("Logger parameter is deprecated and will be ignored. The implementation now uses GeneralTracer for logging. Call CreateBackup() without parameters.", false)]
9696
public static IDriverBackup CreateBackup(IDrivelutionLogger? logger = null)
9797
{
9898
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))

0 commit comments

Comments
 (0)