private void OnBindingException(object sender, BindingEventArgs args)
 {
     if (args.Exception == null)
         return;
     var dataBinding = sender as IDataBinding;
     if (dataBinding != null && args.Action == BindingAction.UpdateSource)
         SetDefaultValue(dataBinding);
 }
 private static void BindingExceptionHandlerImpl(IDataBinding dataBinding, BindingEventArgs bindingEventArgs)
 {
     if (bindingEventArgs.Exception != null)
         Tracer.Error(bindingEventArgs.Exception.Message);
 }
 public static void RaiseBindingException(IDataBinding binding, BindingEventArgs args)
 {
     BindingExceptionHandler?.Invoke(binding, args);
 }
 public void RaiseBindingUpdated(BindingEventArgs e)
 {
     var handler = BindingUpdated;
     if (handler != null) handler(this, e);
 }
 private void OnBindingException(IDataBinding sender, BindingEventArgs args)
 {
     if (args.Exception == null || args.OriginalException == null)
         return;
     UpdateErrors(new object[]
     {
         ValidatesOnExceptionsBehavior.ShowOriginalException
             ? args.OriginalException.Message
             : args.Exception.Message
     }, null);
 }
 private static void OnBindingUpdated(IDataBinding sender, BindingEventArgs args)
 {
     if (args.Exception == null)
     {
         IBindingErrorProvider errorProvider = BindingServiceProvider.ErrorProvider;
         if (errorProvider != null)
             SetErrors(errorProvider, sender, Empty.Array<object>(), null);
     }
     else
     {
         IBindingErrorProvider errorProvider = BindingServiceProvider.ErrorProvider;
         if (errorProvider != null)
             SetErrors(errorProvider, sender,
                 new object[] { ShowOriginalException ? args.OriginalException.Message : args.Exception.Message }, null);
     }
 }
 private static void OnBindingUpdated(IDataBinding sender, BindingEventArgs args)
 {
     IBindingErrorProvider errorProvider = BindingServiceProvider.ErrorProvider;
     if (errorProvider != null)
         SetErrors(errorProvider, sender, Empty.Array<object>(), null);
 }