示例#1
0
        private static void HandleConnectionStrategy(this ConnectionStrategyConfig connectionStrategyConfig, XmlNode node)
        {
            connectionStrategyConfig.AsyncStart = Convert.ToBoolean(GetAttribute(node, "async-start").Trim());
            var attrValue = GetAttribute(node, "reconnect-mode");

            if (attrValue != null)
            {
                connectionStrategyConfig.ReconnectMode = (ReconnectMode)Enum.Parse(typeof(ReconnectMode), attrValue.Trim(), true);
            }
            foreach (XmlNode child in node.ChildNodes)
            {
                var nodeName = CleanNodeName(child);
                if ("connection-retry".Equals(nodeName))
                {
                    connectionStrategyConfig.ConnectionRetryConfig.HandleConnectionRetry(child);
                }
            }
        }
示例#2
0
 public ClientConfig SetConnectionStrategyConfig(ConnectionStrategyConfig connectionStrategyConfig)
 {
     IsNotNull(connectionStrategyConfig, "connectionStrategyConfig");
     _connectionStrategyConfig = connectionStrategyConfig;
     return(this);
 }