using System.IO.Abstractions;
using BO.AppServer.Metadata.Dto;
using Quadarax.Foundation.Core.Value.Extensions;

namespace BO.Console.Extensions
{
    internal static class ArtifactDtoExt
    {
        public static string GetFileName(this ArtifactRDto artifact, IFileSystem fs)
        {
            return artifact.Name + artifact.Extension;
        }

        public static string GetFullFileName(this ArtifactRDto artifact, IFileSystem fs, string basePath)
        {
            return fs.Path.Combine(basePath.EnsurePathNonBackslash(), GetFileName(artifact, fs));
        }
    }
}
