Import from internal git
This commit is contained in:
29
Core/ArgumentsExtractor.cs
Normal file
29
Core/ArgumentsExtractor.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Core.Dto;
|
||||
using Core.SpecConfig;
|
||||
|
||||
namespace Core;
|
||||
|
||||
public class ArgumentsExtractor
|
||||
{
|
||||
private ArgumentsDto _args;
|
||||
|
||||
public GenerationType? GenType =>
|
||||
_args.ClientOnly ? GenerationType.Client :
|
||||
_args.ModelsOnly ? GenerationType.Common :
|
||||
_args.ApiOnly ? GenerationType.Server :
|
||||
null;
|
||||
|
||||
public PublishType PublishType =>
|
||||
_args.SafePublish ? PublishType.Safe :
|
||||
_args.ForcePublish ? PublishType.Force :
|
||||
PublishType.No;
|
||||
|
||||
public string Spec => _args.SpecName;
|
||||
public bool ExportPuml => _args.ExportPuml;
|
||||
|
||||
public ArgumentsExtractor(ArgumentsDto args)
|
||||
{
|
||||
_args = args;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user