public DataMutable(ILens <Data> dataLens)
        {
            _Subscriptions = new CompositeDisposable();
            var d0 = dataLens.Focus(p => p.A).TwoWayBindTo(this, p => p.A);
            var d1 = dataLens.Focus(p => p.B).TwoWayBindTo(this, p => p.B);

            _Subscriptions = new CompositeDisposable(d0, d1);
        }
Пример #2
0
 public static Whole Cons <T, Whole>(this T value, ILens <ImmutableList <T>, Whole> lens)
 => lens.Update(oldHole => value.Cons(oldHole));
Пример #3
0
 public static Whole Update <Hole, Whole>(this ILens <Hole, Whole> lens, Hole newHole)
 => lens.Update(oldHole => newHole);
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Camera"/> class.
 /// </summary>
 /// <param name="stand">The stand which contains the view matrix.</param>
 /// <param name="lens">The lens which contains the projection matrix.</param>
 public Camera(IStand stand, ILens lens)
 {
     Stand = stand;
     Lens = lens;
 }