Exemplo n.º 1
0
        void InitRoutes()
        {
            m_router = new MessageRouter(m_diagnostics);
            if (!m_settings.HasRoutes)
            {
                return;
            }

            using (new MethodTracer(Logger))
            {
                m_router.Init(m_settings.IncomingRoutes);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// new copy of router instance
        /// </summary>
        /// <returns></returns>
        public MessageRouter Clone()
        {
            Dictionary <string, Route> routes = new Dictionary <string, Route>(StringComparer.OrdinalIgnoreCase);

            foreach (var mRoute in m_routes)
            {
                routes[mRoute.Key] = mRoute.Value.Clone();
            }

            var messageRouter = new MessageRouter(m_diagnostics, routes);

            return(messageRouter);
        }