40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using Core;
|
|
using Core.Actions;
|
|
using Core.Settings;
|
|
using Core.SpecConfig;
|
|
using Generator.DataSource.Settings;
|
|
using Generator.Mappers;
|
|
|
|
namespace Generator.Daos;
|
|
|
|
public class DotnetDao : AbstractDao
|
|
{
|
|
|
|
public DotnetDao(ConfigManager confManager)
|
|
: base(confManager, confManager.GetDefArgs().SpecIdentifier)
|
|
{
|
|
}
|
|
|
|
public DotnetConfig GetDotnetGenerate(GenerationType type, ISpecFile file)
|
|
{
|
|
var config = _confManager.Dotnet.Map(_confManager, file);
|
|
config.Type = type;
|
|
return config ;
|
|
}
|
|
|
|
public DotnetPublish GetDotnetPublish(GenerationType type, ISpecFile file)
|
|
{
|
|
var d = GetDotnetGenerate(type, file);
|
|
return new DotnetPublish
|
|
{
|
|
LocalRoot = d.LocalRoot,
|
|
DockerRoot = d.DockerRoot,
|
|
Image = d.BuildImage,
|
|
Registry = d.Registry,
|
|
PackageFolder = d.PackageFolderPath(),
|
|
PackageVersion = file.Version,
|
|
PackageFile = d.PackageFile,
|
|
AuthorizationToken = d.AuthorizationToken,
|
|
};
|
|
}
|
|
} |