public SelfieDto(Selfie selfie) { this.Id = selfie.Id; this.Titre = selfie.Titre; this.Url = selfie.Url; this.Wookie = selfie.Wookie; }
public async Task <Result> Handle(Message request, CancellationToken cancellationToken, RequestHandlerDelegate <Result> next) { var image = $"{request.Document}/{request.Images.FirstOrDefault(img => img.Equals("selfie.jpeg"))}"; var result = await _service.AnalisyAsync(image); var self = new Selfie(result); var isValid = self.IsValidSelfie(request.Confidence); if (isValid) { return(await next()); } return(new Result(false, "Sua selfie não passou no teste!")); }