File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
GeneralUpdate.ClientCore/Strategys Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1010using GeneralUpdate . Common . Internal . Pipeline ;
1111using GeneralUpdate . Common . Internal . Strategy ;
1212using GeneralUpdate . Common . Shared . Object ;
13+ using GeneralUpdate . Common . Shared . Object . Enum ;
1314using GeneralUpdate . Common . Shared . Service ;
1415
1516namespace GeneralUpdate . ClientCore . Strategys ;
@@ -28,7 +29,7 @@ public override async Task ExecuteAsync()
2829 {
2930 try
3031 {
31- var status = 0 ;
32+ var status = ReportType . None ;
3233 var patchPath = StorageManager . GetTempDirectory ( Patchs ) ;
3334 foreach ( var version in _configinfo . UpdateVersions )
3435 {
@@ -56,11 +57,11 @@ public override async Task ExecuteAsync()
5657 . UseMiddleware < CompressMiddleware > ( )
5758 . UseMiddleware < HashMiddleware > ( ) ;
5859 await pipelineBuilder . Build ( ) ;
59- status = 2 ;
60+ status = ReportType . Success ;
6061 }
6162 catch ( Exception e )
6263 {
63- status = 3 ;
64+ status = ReportType . Failure ;
6465 EventManager . Instance . Dispatch ( this , new ExceptionEventArgs ( e , e . Message ) ) ;
6566 }
6667 finally
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ static async Task Main(string[] args)
1818 Console . WriteLine ( $ "升级程序初始化,{ DateTime . Now } !") ;
1919 Console . WriteLine ( "当前运行目录:" + Thread . GetDomain ( ) . BaseDirectory ) ;
2020 await Task . Delay ( 2000 ) ;
21- await new GeneralUpdateBootstrap ( )
21+ _ = await new GeneralUpdateBootstrap ( )
2222 //单个或多个更新包下载速度、剩余下载事件、当前下载版本信息通知事件
2323 . AddListenerMultiDownloadStatistics ( OnMultiDownloadStatistics )
2424 //单个或多个更新包下载完成
You can’t perform that action at this time.
0 commit comments