Ejemplo n.º 1
0
        /// <summary>
        /// Values are shared by all subscribers.
        /// </summary>
        public Tuple <UntypedConnectable, Behaviour <A> > Hot()
        {
            var r           = new Behaviour <A>(Value);
            var connectable = Subject.Publish();

            connectable.Subscribe(r.Subject);
            return(Tuple.Create(UntypedConnectable.Create(connectable), r));
        }
Ejemplo n.º 2
0
        public static Tuple <UntypedConnectable, Behaviour <A> > LatelyBound(
            A initial,
            Func <Behaviour <A> > getBinding)
        {
            var connectable = LateObservable.Create(
                () => getBinding().Subject);
            var r = new Behaviour <A>(initial);

            connectable.Subscribe(r.Subject);
            return(Tuple.Create(UntypedConnectable.Create(connectable), r));
        }