using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UniRx
{
    public static class ReactiveExtensions
    {
        public static IDisposable NextTo<T>(this IObservable<T> observable, ISubject<T> subject)
        {
            return observable.Subscribe(x => subject.OnNext(x));
        }
        public static IDisposable NextTo<T>(this IObservable<T> observable, IReactiveProperty<T> subject)
        {
            return observable.Subscribe(x => subject.Value = x);
        }
    }
    //public static partial class Observable
    //{
    //    public static IObservable<Unit> Aftern(TimeSpan time)
    //    {
    //        return  Observable.Return(Unit.Default).Delay(time);
    //    }
    //    public static IObservable<Unit> AfternSeconds(float timeInSeconds)
    //    {
    //        return Observable.Return(Unit.Default).Delay(TimeSpan.FromSeconds//(timeInSeconds));
    //    }
    //}
}
