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 10
10
using GeneralUpdate . Common . Internal . Pipeline ;
11
11
using GeneralUpdate . Common . Internal . Strategy ;
12
12
using GeneralUpdate . Common . Shared . Object ;
13
+ using GeneralUpdate . Common . Shared . Object . Enum ;
13
14
using GeneralUpdate . Common . Shared . Service ;
14
15
15
16
namespace GeneralUpdate . ClientCore . Strategys ;
@@ -28,7 +29,7 @@ public override async Task ExecuteAsync()
28
29
{
29
30
try
30
31
{
31
- var status = 0 ;
32
+ var status = ReportType . None ;
32
33
var patchPath = StorageManager . GetTempDirectory ( Patchs ) ;
33
34
foreach ( var version in _configinfo . UpdateVersions )
34
35
{
@@ -56,11 +57,11 @@ public override async Task ExecuteAsync()
56
57
. UseMiddleware < CompressMiddleware > ( )
57
58
. UseMiddleware < HashMiddleware > ( ) ;
58
59
await pipelineBuilder . Build ( ) ;
59
- status = 2 ;
60
+ status = ReportType . Success ;
60
61
}
61
62
catch ( Exception e )
62
63
{
63
- status = 3 ;
64
+ status = ReportType . Failure ;
64
65
EventManager . Instance . Dispatch ( this , new ExceptionEventArgs ( e , e . Message ) ) ;
65
66
}
66
67
finally
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ static async Task Main(string[] args)
18
18
Console . WriteLine ( $ "升级程序初始化,{ DateTime . Now } !") ;
19
19
Console . WriteLine ( "当前运行目录:" + Thread . GetDomain ( ) . BaseDirectory ) ;
20
20
await Task . Delay ( 2000 ) ;
21
- await new GeneralUpdateBootstrap ( )
21
+ _ = await new GeneralUpdateBootstrap ( )
22
22
//单个或多个更新包下载速度、剩余下载事件、当前下载版本信息通知事件
23
23
. AddListenerMultiDownloadStatistics ( OnMultiDownloadStatistics )
24
24
//单个或多个更新包下载完成
You can’t perform that action at this time.
0 commit comments