public static bool TryCreate(string emailAddress, out EmailAddress result, out string failureReason) { var specification = new EmailAddressSpecification(); if (specification.IsSatisfiedBy(emailAddress)) { result = new EmailAddress(emailAddress); failureReason = string.Empty; return true; } result = null; failureReason = specification.GetReasonsForDissatisfactionSeparatedWithNewLine(); return false; }
protected bool Equals(EmailAddress other) { return emailAddress.Equals(other.emailAddress); }