1
0
mirror of https://github.com/akpaevj/onecmonitor.git synced 2026-06-13 21:18:17 +02:00
Files
2025-07-02 10:32:56 +03:00

14 lines
431 B
C#

using AutoMapper;
using OneSwiss.Common.DTO;
using OneSwiss.Server.Services;
using File = OneSwiss.Server.Models.File;
namespace OneSwiss.Server.AutoMapper;
public class FileMappingAction(FilesProvider filesProvider) : IMappingAction<File, FileDto>
{
public void Process(File source, FileDto destination, ResolutionContext context)
{
destination.Length = filesProvider.GetFileInfo(source.DataPath).Length;
}
}