Example #1
0
        private static bool ConfigureAtPath(string path)
        {
            bool ok = true;

            try
            {
                var config = new ConfigFile(path);

                config.AddMinimumConfigValues(RpcUser, RpcPass, RpcPort);
                if (ok = config.Read)
                {
                    RpcUser = config.GetSetting("rpcuser");
                    RpcPass = config.GetSetting("rpcpassword");
                    RpcPort = config.GetSetting("rpcport");
                }
            }
            catch (IOException ex)
            {
                ConfigFile.InvokeNamecoinConfigInfo(string.Format("Failed to read/verify {0}. {1}", path, ex.Message));
                ok = false;
            }
            return(ok);
        }