Ejemplo n.º 1
0
        /// <summary>
        /// Used to determine if a given <see cref="deploy"/> is an instance of <see cref="RemoteRouterConfig"/>.
        /// </summary>
        private static Deploy CheckRemoteRouterConfig(Deploy deploy)
        {
            var nodes = deploy.Config.GetStringList("target.nodes").Select(Address.Parse).ToList();

            if (nodes.Any() && deploy.RouterConfig != RouterConfig.NoRouter)
            {
                if (deploy.RouterConfig is Pool)
                {
                    return
                        (deploy.Copy().WithRouterConfig(new RemoteRouterConfig(deploy.RouterConfig.AsInstanceOf <Pool>(), nodes)));
                }
                return(deploy.Copy(scope: Deploy.NoScopeGiven));
            }
            else
            {
                //TODO: return deploy;
                return(deploy.Copy(scope: Deploy.NoScopeGiven));
            }
        }