Esempio 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));
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio n. 4
0
        protected virtual Channel <T> Visitor <T>(AsyncResultChannel <T> channel)
        {
            Visit(channel.Output);

            return(channel);
        }