mirror of https://github.com/abpframework/abp.git
6 changed files with 84 additions and 23 deletions
@ -1,7 +1,10 @@ |
|||||
namespace Volo.Abp.Cli.ProjectBuilding.Building; |
namespace Volo.Abp.Cli.ProjectBuilding.Building; |
||||
|
|
||||
public enum Theme |
public enum Theme : byte |
||||
{ |
{ |
||||
LeptonXLite = 0, |
NotSpecified = 0, |
||||
Basic = 1 |
Basic = 1, |
||||
|
Lepton = 2, |
||||
|
LeptonXLite = 3, |
||||
|
LeptonX = 4 |
||||
} |
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
using System; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Volo.Abp.Cli.Utils; |
||||
|
|
||||
|
public static class ExceptionMessageHelper |
||||
|
{ |
||||
|
public static string GetInvalidArgExceptionMessage(string args) |
||||
|
{ |
||||
|
Check.NotNullOrEmpty(args, nameof(args), minLength: 2); |
||||
|
|
||||
|
var exceptionMessageBuilder = new StringBuilder(); |
||||
|
exceptionMessageBuilder.Append("The option you provided for "); |
||||
|
if (args.Contains(" ")) |
||||
|
{ |
||||
|
foreach (var arg in args.Split(' ')) |
||||
|
{ |
||||
|
exceptionMessageBuilder.Append(arg.ToPascalCase()); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
exceptionMessageBuilder.Append(args.ToPascalCase()); |
||||
|
} |
||||
|
|
||||
|
exceptionMessageBuilder.Append(" is invalid!"); |
||||
|
|
||||
|
return exceptionMessageBuilder.ToString(); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue