You've already forked onecmonitor
mirror of
https://github.com/akpaevj/onecmonitor.git
synced 2026-06-13 21:18:17 +02:00
14 lines
431 B
C#
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;
|
|
}
|
|
} |