private void UpdateTargetFromSource(object value, CancellationToken cancel)
{
if (value == MvxBindingConstant.DoNothing || cancel.IsCancellationRequested)
return;
if (value == MvxBindingConstant.UnsetValue)
value = _defaultTargetValue;
dispatcher.RequestMainThreadAction(() =>
{
if (cancel.IsCancellationRequested)
return;
try
{
lock (this._targetLocker)
{
this._targetBinding?.SetValue(value);
}
}
catch (Exception exception)
{
MvxBindingTrace.Trace(
MvxTraceLevel.Error,
"Problem seen during binding execution for {0} - problem {1}",
this._bindingDescription.ToString(),
exception.ToLongString());
}
});
}