Import from internal git
This commit is contained in:
40
Generator/Daos/DotnetDao.cs
Normal file
40
Generator/Daos/DotnetDao.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user