using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; namespace BaseCallCenter.UUAPI { public class ApiConfig { static XmlDocument doc = GetConfigInfo(); static XmlNode Root = doc.SelectSingleNode("appSettings"); private static string appid = Root.SelectSingleNode("appid").InnerText; //功能:appid private static string appsecret = Root.SelectSingleNode("appsecret").InnerText; //功能:appsecret private static string openid = Root.SelectSingleNode("openid").InnerText; //功能:appsecret private static string callcenterUrl = Root.SelectSingleNode("callcenterUrl").InnerText; //功能:呼叫中心来电弹屏 /// /// appid /// public static string AppID { get { return ApiConfig.appid; } set { ApiConfig.appid = value; } } /// /// appsecret /// public static string AppSecret { get { return ApiConfig.appsecret; } set { ApiConfig.appsecret = value; } } /// /// openid /// public static string OpenID { get { return ApiConfig.openid; } set { ApiConfig.openid = value; } } /// /// 获取呼叫中心来电弹屏路径 /// public static string CallcenterUrl { get { return ApiConfig.callcenterUrl; } set { ApiConfig.callcenterUrl = value; } } private static XmlDocument GetConfigInfo() { XmlDocument doc = new XmlDocument(); doc.Load(AppDomain.CurrentDomain.BaseDirectory + "/config/uupaotui.xml"); return doc; } } }