File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public static void InstallEnvironment(InstallMethod im = InstallMethod.WebClient
8080 /// 异步安装环境
8181 /// <paramref name="im">异步安装方式</paramref>
8282 /// </summary>
83- public static async Task InstallEnvironment ( InstallMethodAsync im = InstallMethodAsync . WebClientAsync )
83+ public static async Task InstallEnvironmentAsync ( InstallMethodAsync im = InstallMethodAsync . WebClientAsync )
8484 {
8585 if ( ! Directory . Exists ( dll_path ) )
8686 Directory . CreateDirectory ( dll_path ) ;
@@ -113,6 +113,9 @@ public enum InstallMethod
113113 WebClient
114114 }
115115
116+ /// <summary>
117+ /// 安装环境下载方式
118+ /// </summary>
116119 public enum InstallMethodAsync
117120 {
118121 WebClientAsync , Http
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ namespace Algorithm.UnitTest
1313 public class 哈希测试
1414 {
1515 [ TestMethod ]
16- public void 环境安装测试 ( )
16+ public async void 环境安装测试 ( )
1717 {
1818 Console . WriteLine ( Interop . Environment . CheckEnvironment ( ) ) ;
1919
@@ -25,8 +25,8 @@ public void 环境安装测试()
2525
2626 Directory . Delete ( Path . GetFullPath ( $ "{ Interop . Environment . dll_path } ") , true ) ;
2727 if ( ! Interop . Environment . CheckEnvironment ( ) )
28- Interop . Environment . InstallEnvironment ( Interop . Environment . InstallMethodAsync . WebClientAsync ) ;
29- Thread . Sleep ( 1000 ) ;
28+ await Interop . Environment . InstallEnvironmentAsync ( Interop . Environment . InstallMethodAsync . WebClientAsync ) ;
29+ Thread . Sleep ( 3000 ) ;
3030 Assert . IsTrue ( Interop . Environment . CheckEnvironment ( ) ) ;
3131 }
3232
You can’t perform that action at this time.
0 commit comments