protected override object GetProvidedValue()
 {
     if (Mode == BindingMode.Default && TreeInfo.IsEmptyBackExpr() &&
         Calculator.Operands.Count() == 0)
     {
         ActualMode = BindingMode.OneWay;
     }
     if ((ActualMode == BindingMode.TwoWay || ActualMode == BindingMode.OneWayToSource) &&
         TreeInfo.IsEmptyBackExpr())
     {
         if (TreeInfo.IsSimpleExpr())
         {
             Calculator.Operands.FirstOrDefault().Do(x => x.SetMode(true));
         }
         else
         {
             ErrorHandler.Throw(ErrorHelper.Err101_TwoWay(), null);
         }
     }
     if (IsInSetter(TargetProvider) || TargetPropertyType == typeof(BindingBase))
     {
         return(CreateBinding());
     }
     return(CreateBinding().ProvideValue(ServiceProvider));
 }