Пример #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));
        }
Пример #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));
        }
Пример #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));
 }
Пример #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));
 }