Beispiel #1
0
        /// <summary>
        /// Creates a channel that discards every value
        /// </summary>
        /// <typeparam name="TIn"></typeparam>
        /// <returns></returns>
        public static IChannel <TIn, TIn> CreateSink <TIn>()
        {
            var buf = new RxBuffer <TIn, TIn>(1, e => e.Where(itm => false));

            return(ChannelForRxBuf(buf));
        }
Beispiel #2
0
        public static IChannel <TIn, TOut> Create <TIn, TOut>(int buffer_size, Func <IObservable <TIn>, IObservable <TOut> > transform)
        {
            var buf = new RxBuffer <TIn, TOut>(buffer_size, transform);

            return(ChannelForRxBuf(buf));
        }
Beispiel #3
0
 private static ManyToManyChannel <TIn, TOut> ChannelForRxBuf <TIn, TOut>(RxBuffer <TIn, TOut> buf)
 {
     return(new ManyToManyChannel <TIn, TOut>(null, RxBuffer <TIn, TOut> .TransformAdd, RxBuffer <TIn, TOut> .Finalize, buf));
 }
Beispiel #4
0
 private static ManyToManyChannel <TIn, TOut> ChannelForRxBuf <TIn, TOut>(RxBuffer <TIn, TOut> buf)
 {
     return(new ManyToManyChannel <TIn, TOut>(null, RxBuffer <TIn, TOut> .TransformAdd, (final) => ((RxBuffer <TIn, TOut>)final).Dispose(), buf));
 }