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