Aurora.Services.WebAPIConnector.handleConfig C# (CSharp) Method

handleConfig() private method

private handleConfig ( IConfigSource m_config, string defaultConnectionString ) : bool
m_config IConfigSource
defaultConnectionString string
return bool
        private bool handleConfig(IConfigSource m_config, string defaultConnectionString)
        {
            IConfig config = m_config.Configs["WebAPI"];
            if (config == null)
            {
                m_enabled = false;
                Warn("not loaded, no configuration found.");
                return false;
            }

            m_Handler = config.GetString("Handler", string.Empty);
            m_HandlerPort = config.GetUInt("Port", 0);
            m_TexturePort = config.GetUInt("TextureServerPort", 0);
            m_connectionString = config.GetString("ConnectionString", defaultConnectionString);

            if (Handler == string.Empty || HandlerPort == 0 || TexturePort == 0)
            {
                m_enabled = false;
                Warn("Not loaded, configuration missing.");
                return false;
            }

            m_enabled = true;
            return true;
        }