Skip to content

UpdateReporter<T>() 注入不生效 & ReportUrl 未配置时抛异常 #470

Description

@JusterZhu

问题描述

  1. ReportUrl 未配置时抛异常ProcessInfo 构造函数将 ReportUrl 作为必填参数,未配置时抛出 ArgumentNullException

  2. UpdateReporter\<T\>() 注入不消费LaunchWithStrategy(标准更新路径)未解析 IUpdateReporter,用户通过 UpdateReporter\<T\>() 注册的实现完全不会被使用

  3. HttpUpdateReporter 无参构造缺失:约束 new() 要求无参构造函数,但 HttpUpdateReporter 只有带参构造,调用 UpdateReporter\<HttpUpdateReporter\>() 编译报错

  4. 两条上报路径重复VersionService.Report()IUpdateReporter 两套上报机制并存,AbstractStrategy 绕过 Reporter 直接调 VersionService.Report()

期望行为

  • ReportUrl 未配置时跳过上报,不抛异常
  • UpdateReporter\<T\>() 注入的实现在标准路径下正常消费
  • 上报统一走 IUpdateReporter 一条路径

相关内容

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions