Пример #1
0
        private void OnValidationResultChanged(object sender, ValidationResultChangedEventArgs e)
        {
            if (!IsValid.GetValueOrDefault(true))
            {
                MvvmValidation.ValidationResult validationResult = Validator.GetResult();

                UpdateValidationSummary(validationResult);
            }
        }
 private void OnValidationResultChanged(object sender, ValidationResultChangedEventArgs e)
 {
     if (!IsValid.GetValueOrDefault(true))
     {
         ValidationResult validationResult = Validator.GetResult();
         Debug.WriteLine(" validation updated: " + validationResult);
         UpdateValidationSummary(validationResult);
     }
 }
Пример #3
0
            public Exception ToException()
            {
                if (IsValid.GetValueOrDefault(true))
                {
                    return(null);
                }

                if (_errorCode == ErrorResponseCode.None)
                {
                    return(new ConnectionException(Message));
                }
                return(new RequestException(ApiKeyRequestType.Metadata, _errorCode, Message));
            }
Пример #4
0
            public Exception ToException(Endpoint endpoint)
            {
                if (IsValid.GetValueOrDefault(true))
                {
                    return(null);
                }

                if (_errorCode.IsSuccess())
                {
                    return(new ConnectionException(Message));
                }
                return(new RequestException(ApiKey.Metadata, _errorCode, endpoint, Message));
            }