예제 #1
0
파일: exts.cs 프로젝트: Marwan0/tlplib
        // You should not write to Val when using RxRef
        public static RxRef <A> toRxRef <A>(this PrefVal <A> val)
        {
            var rx = new RxRef <A>(val.value);

            rx.subscribe(v => val.value = v);
            return(rx);
        }
예제 #2
0
        // You should not write to Val when using RxRef
        public RxRef <A> toRxRef()
        {
            var rx = new RxRef <A>(read);

            rx.subscribe(v => write(v));
            return(rx);
        }