コード例 #1
0
        protected bool Inspect <TInput, TOutput>(MessageTranslator <TInput, TOutput> element)
            where TOutput : class, TInput
            where TInput : class
        {
            if (typeof(TOutput) == typeof(TMessage))
            {
                InsertAfter = (sink =>
                {
                    return(element
                           .ReplaceOutputSink(sink.TranslateTo <IPipelineSink <TOutput> >())
                           .TranslateTo <IPipelineSink <TMessage> >());
                });

                return(false);
            }

            return(true);
        }