@@ -374,22 +374,21 @@ REM End of script
374
374
}
375
375
376
376
377
- static string [ ] ParseArguments ( string [ ] argv , string defaultUrl = null )
378
- {
379
- if defaultURL . Equals ( "input your defualt url here" )
377
+ static string [ ] ParseArguments ( string [ ] argv , string defaultURL = null )
378
+ {
379
+ if ( argv . Length == 0 )
380
380
{
381
- Console . WriteLine ( "Please input your default url in the code ." ) ;
381
+ Console . WriteLine ( "No arguments provided. Please provide the required arguments ." ) ;
382
382
return new string [ ] { "helpModel" , null , null } ;
383
383
}
384
-
385
- Dictionary < string , string > argsDict = new Dictionary < string , string > ( ) ;
386
384
387
- if ( argv . Length == 0 )
385
+ if ( defaultURL . Equals ( "input your defualt url here" ) )
388
386
{
389
- Console . WriteLine ( "No arguments provided. Please provide the required arguments ." ) ;
387
+ Console . WriteLine ( "Attention, please input your default url in the code ." ) ;
390
388
return new string [ ] { "helpModel" , null , null } ;
391
389
}
392
390
391
+ Dictionary < string , string > argsDict = new Dictionary < string , string > ( ) ;
393
392
for ( int i = 0 ; i < argv . Length ; i ++ )
394
393
{
395
394
if ( argv [ i ] . StartsWith ( "-" ) || argv [ i ] . StartsWith ( "/" ) )
@@ -413,7 +412,7 @@ static string[] ParseArguments(string[] argv, string defaultUrl = null)
413
412
}
414
413
415
414
// 设置默认值或获取用户提供的值
416
- string url = argsDict . ContainsKey ( "url" ) ? argsDict [ "url" ] : defaultUrl ;
415
+ string url = argsDict . ContainsKey ( "url" ) ? argsDict [ "url" ] : defaultURL ;
417
416
string version = argsDict . ContainsKey ( "version" ) ? argsDict [ "version" ] : null ;
418
417
string showConfirm = argsDict . ContainsKey ( "showConfirm" ) && argsDict [ "showConfirm" ] ? . ToLower ( ) == "false" ? "false" : "true" ;
419
418
0 commit comments