public void Should_capture_the_instance_channel_with_thread_provider() { var provider = new DelegateChannelProvider<int>(x => new ConsumerChannel<int>(new SynchronousFiber(), y => { })); var threadProvider = new ThreadStaticChannelProvider<int>(provider); var channel = new InstanceChannel<int>(threadProvider); new ChannelVisitor().Visit(channel); }
public void Should_capture_the_instance_channel_with_thread_provider() { var provider = new DelegateChannelProvider <int>(x => new ConsumerChannel <int>(new SynchronousFiber(), y => { })); var threadProvider = new ThreadStaticChannelProvider <int>(provider); var channel = new InstanceChannel <int>(new SynchronousFiber(), threadProvider); new ChannelVisitor().Visit(channel); }
protected override ChannelProvider <T> Visitor <T>(ThreadStaticChannelProvider <T> provider) { Trace.WriteLine("ThreadStaticChannelProvider<{0}>".FormatWith(typeof(T).Name)); return(base.Visitor(provider)); }
protected virtual ChannelProvider <T> Visitor <T>(ThreadStaticChannelProvider <T> provider) { Visit(provider.InstanceProvider); return(provider); }