Ejemplo n.º 1
0
 public static CalculatedProperty <TTarget> Create <TS1, TTarget>(
     IProperty <INotifyPropertyChanged, TS1> s1,
     Func <TS1, TTarget> toTarget,
     IProperty <NotifyPropertyChanged, TTarget> target)
 {
     return(new CalculatedProperty <TTarget>(target, t => MultiBinding.Create(s1, toTarget, t)));
 }
Ejemplo n.º 2
0
 public static CalculatedProperty <TTarget> Create <TSource, TTarget>(
     IEnumerable <IProperty <INotifyPropertyChanged, TSource> > sources,
     Func <IEnumerable <TSource>, TTarget> toTarget,
     IProperty <NotifyPropertyChanged, TTarget> target)
 {
     return(new CalculatedProperty <TTarget>(target, t => MultiBinding.Create(sources, toTarget, t)));
 }
Ejemplo n.º 3
0
            internal Exceptional()
            {
                AssertThrow <ArgumentNullException>(
                    () => CalculatedProperty.Create((IProperty <NotifyPropertyChanged, int>)null, v => v, this.GetProperty(o => o.Calculated)).Dispose(),
                    () => CalculatedProperty.Create(this.GetProperty(o => o.Value), null, this.GetProperty(o => o.Calculated)).Dispose(),
                    () => CalculatedProperty.Create(this.GetProperty(o => o.Value), v => v, null).Dispose());

                AssertThrow <ArgumentNullException>(() => MultiBinding.Create(this.GetProperty(o => o.Value), null).Dispose());
            }
Ejemplo n.º 4
0
 public static CalculatedProperty <TTarget> Create <TS1, TS2, TS3, TS4, TTarget>(
     IProperty <INotifyPropertyChanged, TS1> s1,
     IProperty <INotifyPropertyChanged, TS2> s2,
     IProperty <INotifyPropertyChanged, TS3> s3,
     IProperty <INotifyPropertyChanged, TS4> s4,
     Func <TS1, TS2, TS3, TS4, TTarget> toTarget,
     IProperty <NotifyPropertyChanged, TTarget> target)
 {
     return(new CalculatedProperty <TTarget>(target, t => MultiBinding.Create(s1, s2, s3, s4, toTarget, t)));
 }
Ejemplo n.º 5
0
 public static CalculatedProperty <TTarget> Create <TS1, TS2, TS3, TS4, TS5, TS6, TS7, TS8, TTarget>(
     IProperty <INotifyPropertyChanged, TS1> s1,
     IProperty <INotifyPropertyChanged, TS2> s2,
     IProperty <INotifyPropertyChanged, TS3> s3,
     IProperty <INotifyPropertyChanged, TS4> s4,
     IProperty <INotifyPropertyChanged, TS5> s5,
     IProperty <INotifyPropertyChanged, TS6> s6,
     IProperty <INotifyPropertyChanged, TS7> s7,
     IProperty <INotifyPropertyChanged, TS8> s8,
     Func <TS1, TS2, TS3, TS4, TS5, TS6, TS7, TS8, TTarget> toTarget,
     IProperty <NotifyPropertyChanged, TTarget> target)
 {
     return(new CalculatedProperty <TTarget>(
                target, t => MultiBinding.Create(s1, s2, s3, s4, s5, s6, s7, s8, toTarget, t)));
 }
Ejemplo n.º 6
0
 public static CalculatedProperty <T> Create <T>(
     IProperty <INotifyPropertyChanged, T> s1, IProperty <NotifyPropertyChanged, T> target)
 {
     return(new CalculatedProperty <T>(target, t => MultiBinding.Create(s1, t)));
 }