예제 #1
0
        protected override UntypedChannel Visitor(ChannelAdapter channel)
        {
            UntypedChannel original = channel.Output;

            UntypedChannel replacement = Visit(original);

            if (!_added)
            {
                if (replacement.GetType() == typeof(ShuntChannel))
                {
                    replacement = new BroadcastChannel(new[] { _newChannel });
                    _added      = true;
                }
            }

            if (original != replacement)
            {
                channel.ChangeOutputChannel(original, replacement);
            }

            return(channel);
        }
예제 #2
0
        protected override UntypedChannel Visitor(ChannelAdapter channel)
        {
            bool wasAdded = _added;

            channel.ChangeOutputChannel(original =>
            {
                _added = wasAdded;

                UntypedChannel replacement = Visit(original);

                if (!_added)
                {
                    if (replacement.GetType() == typeof(ShuntChannel))
                    {
                        replacement = new BroadcastChannel(new[] { _newChannel });
                        _added      = true;
                    }
                }

                return(replacement);
            });

            return(channel);
        }
예제 #3
0
        protected virtual UntypedChannel Visitor(UntypedChannel channel)
        {
            _log.Warn(x => x.Write("Unknown untyped channel implementation found: {0}", channel.GetType().FullName));

            return(channel);
        }
예제 #4
0
        protected override UntypedChannel Visitor(UntypedChannel channel)
        {
            Trace.WriteLine("UntypedChannel: {0}".FormatWith(channel.GetType().Name));

            return(base.Visitor(channel));
        }