Beispiel #1
0
        public async Task <decimal> GetDurationOfImageComputation(ImageTypeViewModelM imageViewModel)
        {
            var image           = _imageFactoryCreation.FactoryCreate(imageViewModel);
            var computationType = _computationService.GetComputationType(image.Length, image.Width);

            var computer = _computerDefinitionService.GetComputerDefinition();

            computer.ComputationType = computationType;
            await _imageRepository.Add(new Image(image.Length, image.Width));

            _emailSenderService.SendMessage(image.Id.ToString());

            return(_imageCalculationService.CalculateImage(computationType));
        }