예제 #1
0
 public DispatchingBindable(IBindable <T> inner, Action <Action> dispatcher)
 {
     Link             = new LinkingBindable <T>(inner);
     Dispatcher       = dispatcher;
     Link.HasChanged += delegate {
         NotifyChange();
     };
 }
예제 #2
0
 public ConvertingBindable(IBindable <TIn> inner, Func <TOut, TIn> convertIn = null, Func <TIn, TOut> convertOut = null)
 {
     Link = new LinkingBindable <TIn>(inner);
     if (convertIn == null && convertOut == null)
     {
         throw Errors.Convertion_bindable_must_have_conversion();
     }
     _convertIn  = convertIn;
     _convertOut = convertOut;
     if (_convertOut != null)
     {
         inner.HasChanged += InnerHasChanged;
     }
 }