Ejemplo n.º 1
0
        private FaceServerInfo GetServerInfo()
        {
            FaceServerInfo server = new FaceServerInfo();

            CONN_STR = AESUtil.AESDecrypt(ConfigurationManager.ConnectionStrings["FaceID"].ToString());
            var strs = CONN_STR.Split(';');

            foreach (var item in strs)
            {
                var index = item.IndexOf('=');
                if (item.Substring(0, index) == "Host")
                {
                    server.Host = item.Substring(index + 1);
                }
                else if (item.Substring(0, index) == "Port")
                {
                    server.Port = int.Parse(item.Substring(index + 1));
                }
                else if (item.Substring(0, index) == "Username")
                {
                    server.Username = item.Substring(index + 1);
                }
                else if (item.Substring(0, index) == "Password")
                {
                    server.Password = item.Substring(index + 1);
                }
            }

            return(server);
        }
Ejemplo n.º 2
0
 static PgUtil()
 {
     CONN_STR = AESUtil.AESDecrypt(ConfigurationManager.ConnectionStrings["NPG"].ToString());
 }