Ejemplo n.º 1
0
        protected override Channel <T> Visitor <T>(AsyncResultChannel <T> channel)
        {
            Trace.WriteLine("AsyncResultChannel<{0}>, {1}".FormatWith(typeof(T).Name,
                                                                      channel.IsCompleted ? "Complete" : "Pending"));

            return(base.Visitor(channel));
        }
Ejemplo n.º 2
0
        public void Should_capture_the_async_result_channel_and_state()
        {
            var channel = new AsyncResultChannel<int>(new ConsumerChannel<int>(new SynchronousFiber(), y => { }), x => { }, 0);

            new ChannelVisitor().Visit(channel);

            channel.Send(0);

            new ChannelVisitor().Visit(channel);
        }
Ejemplo n.º 3
0
        public void Should_capture_the_async_result_channel_and_state()
        {
            var channel = new AsyncResultChannel <int>(new ConsumerChannel <int>(new SynchronousFiber(), y => { }), x => { }, 0);

            new ChannelVisitor().Visit(channel);

            channel.Send(0);

            new ChannelVisitor().Visit(channel);
        }
Ejemplo n.º 4
0
        protected virtual Channel <T> Visitor <T>(AsyncResultChannel <T> channel)
        {
            Visit(channel.Output);

            return(channel);
        }