Created
April 3, 2020 16:20
-
-
Save davidelettieri/95ef8dbdb5eae0cd2714a64b366f7b57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result ValidateEmail(Customer c) { ... } | |
Result ValidateNameSurname(Customer c) { ... } | |
Result SendEmail(Customer c) { ... } | |
Result SendEmailToCustomerIfValid(Customer c) { | |
var validateSurname = ValidateNameSurname(c); | |
if(!validateSurname.Success) | |
return validateSurname; | |
var validateEmail = ValidateEmail(c); | |
if(!validateEmail.Success) | |
return validateEmail; | |
return ValidateEmail(c); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment