Files
api-generator/Core/ArgumentsExtractor.cs
2025-10-11 13:08:09 +02:00

29 lines
678 B
C#

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;
}
}