Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        protected override ChannelProvider <T> Visitor <T>(ThreadStaticChannelProvider <T> provider)
        {
            Trace.WriteLine("ThreadStaticChannelProvider<{0}>".FormatWith(typeof(T).Name));

            return(base.Visitor(provider));
        }
Example #4
0
        protected virtual ChannelProvider <T> Visitor <T>(ThreadStaticChannelProvider <T> provider)
        {
            Visit(provider.InstanceProvider);

            return(provider);
        }