Ejemplo n.º 1
0
        private async Task ExecuteConsoleCommandDirectoryInfo(Options options)
        {
            var getDirectoryInfoQuery = new GetDirectoryInfoQuery(options);
            var directoryInfo         = await _mediator.Send(getDirectoryInfoQuery);

            var directoryInfoViewModel = new DirectoryInfoViewModel()
            {
                CreationDate     = ConvertingHelper.GetDateString(directoryInfo.CreationDate),
                ModificationDate = ConvertingHelper.GetDateString(directoryInfo.ModificationDate),
                Login            = directoryInfo.Login,
                Name             = directoryInfo.Name,
                Path             = directoryInfo.Path,
                Size             = ConvertingHelper.GetSizeString(directoryInfo.Size)
            };

            _consolePrinter.PrintDirectoryInfo(directoryInfoViewModel);
        }