예제 #1
0
        /// <summary>
        /// Initializes the specified servers.
        /// </summary>
        /// <param name="rootConfig">The root config.</param>
        /// <param name="servers">The passed in AppServers, which have been setup.</param>
        /// <returns></returns>
        public static bool Initialize(IRootConfig rootConfig, IEnumerable <IAppServer> servers)
        {
            if (rootConfig == null)
            {
                throw new ArgumentNullException("rootConfig");
            }

            var config = new ConfigMockup();

            rootConfig.CopyPropertiesTo(config);

            m_ServerList = new List <IAppServer>(servers.Count());
            m_ServerList.AddRange(servers);
            m_Initialized = true;

            m_Config = config;

            return(true);
        }
        /// <summary>
        /// Initializes the specified servers.
        /// </summary>
        /// <param name="rootConfig">The root config.</param>
        /// <param name="servers">The passed in AppServers, which have been setup.</param>
        /// <returns></returns>
        public static bool Initialize(IRootConfig rootConfig, IEnumerable<IAppServer> servers)
        {
            if (rootConfig == null)
                throw new ArgumentNullException("rootConfig");

            var config = new ConfigMockup();
            rootConfig.CopyPropertiesTo(config);

            m_ServerList = new List<IAppServer>(servers.Count());
            m_ServerList.AddRange(servers);
            m_Initialized = true;

            m_Config = config;

            return true;
        }