コード例 #1
0
        public Router(IMessageClient messageClient, IHttpClient httpClient)
        {
            this.messageClient = messageClient;
            this.httpClient    = httpClient;

            string mqRoutesPath   = Path.Combine(Environment.CurrentDirectory, "Routes", "MQ");
            string httpRoutesPath = Path.Combine(Environment.CurrentDirectory, "Routes", "Http");

            var mqRoutes   = GetRoutes(mqRoutesPath, TransportType.MessageQueue, messageClient);
            var httpRoutes = GetRoutes(httpRoutesPath, TransportType.Http);

            // Sets the Endpoints list to the list containing MQRoutes and adds the HTTP routes to it
            Endpoints = mqRoutes;
            Endpoints.AddRange(httpRoutes);
        }
コード例 #2
0
        public void Combine(ComponentParts parts)
        {
            Markup     += parts.Markup;
            JavaScript += parts.JavaScript;
            ScriptIncludes.AddRange(parts.ScriptIncludes);
            StylesheetIncludes.AddRange(parts.StylesheetIncludes);
            Endpoints.AddRange(parts.Endpoints);

            foreach (var script in parts.ElementScripts)
            {
                if (!ElementScripts.ContainsKey(script.Value.GetHashCode()))
                {
                    ElementScripts.Add(script.Value.GetHashCode(), script.Value);
                }
            }
        }