/// <summary> /// /// </summary> private void Connet() { try { var manifestData = _bundle.GetBundleManifestData(); var serverIp = string.Empty; var serverPort = int.MinValue; foreach (XmlNode childNode in manifestData.ChildNodes) { if (childNode.Name == "ServerIP") { if (childNode.Attributes != null) { serverIp = childNode.Attributes["Value"].Value; } } if (childNode.Name == "ServerPort") { if (childNode.Attributes != null) { serverPort = int.Parse(childNode.Attributes["Value"].Value); } } } this.Connect(serverIp, serverPort); } catch (Exception) { this.Disconnect(); } }
/// <summary> /// /// </summary> /// <param name="nodeName"></param> /// <returns></returns> public string GetManifestConfigValue(string nodeName) { var manifestData = _bundle.GetBundleManifestData(); var rValue = string.Empty; foreach (XmlNode childNode in manifestData.ChildNodes) { if (childNode.Name == nodeName) { if (childNode.Attributes != null) { rValue = childNode.Attributes["Value"].Value; } } } return(rValue.Trim()); }