Exemplo n.º 1
0
        public void init(WebServiceRouterConfigSection webServiceRouterConfigSection)
        {
            listenMask = webServiceRouterConfigSection.listenMask;

            rules = new List <WebServiceRouterRuleConfig>();
            var x = webServiceRouterConfigSection.RuleConfigurations;

            foreach (WebServiceRouterRuleConfig rule in x)
            {
                rules.Add(rule);
            }

            Log.InfoFormat("Rules defined: {0}\n\t{1}", rules.Count, String.Join("\n\t", rules));

            if (isEmpty(listenMask))
            {
                throw new ConfigurationErrorsException("listenMask not set");
            }

            if (rules.Count == 0)
            {
                throw new ConfigurationErrorsException("At least one rule must be defined");
            }
        }
Exemplo n.º 2
0
 public Router(WebServiceRouterConfigSection webServiceRouterConfigSection)
 {
     init(webServiceRouterConfigSection);
 }