コード例 #1
0
        public ValidationException(ValidationResult validationResult)
            : base(GetMessage(validationResult))
        {
            if (validationResult == null)
            {
                throw new ArgumentNullException(nameof(validationResult));
            }

            ValidationResult = validationResult;
        }
コード例 #2
0
 private static string GetMessage(ValidationResult validationResult)
 {
     return validationResult?.ToString() ?? string.Empty;
 }
コード例 #3
0
 private static string GetMessage(ValidationResult validationResult)
 {
     return validationResult == null ? string.Empty : validationResult.ToString();
 }