internal GroupFullInfo(XmlNode node) { if (node.Attributes.GetNamedItem("id") != null) { GroupId = node.Attributes.GetNamedItem("id").Value; } if (node.SelectSingleNode("name") != null) { GroupName = node.SelectSingleNode("name").InnerText; } if (node.SelectSingleNode("description") != null) { Description = node.SelectSingleNode("description").InnerXml; } if (node.SelectSingleNode("members") != null) { Members = int.Parse(node.SelectSingleNode("members").InnerText); } if (node.SelectSingleNode("privacy") != null) { Privacy = (PoolPrivacy)int.Parse(node.SelectSingleNode("privacy").InnerText); } if (node.SelectSingleNode("throttle") != null) { XmlNode throttle = node.SelectSingleNode("throttle"); ThrottleInfo = new GroupThrottleInfo(); if (throttle.Attributes.GetNamedItem("count") != null) { ThrottleInfo.Count = int.Parse(throttle.Attributes.GetNamedItem("count").Value); } if (throttle.Attributes.GetNamedItem("mode") != null) { ThrottleInfo.setMode(throttle.Attributes.GetNamedItem("mode").Value); } if (throttle.Attributes.GetNamedItem("remaining") != null) { ThrottleInfo.Remaining = int.Parse(throttle.Attributes.GetNamedItem("remaining").Value); } } }
internal GroupFullInfo(XmlNode node) { if (node.Attributes.GetNamedItem ("id") != null) GroupId = node.Attributes.GetNamedItem ("id").Value; if (node.SelectSingleNode ("name") != null) GroupName = node.SelectSingleNode ("name").InnerText; if (node.SelectSingleNode ("description") != null) Description = node.SelectSingleNode ("description").InnerXml; if (node.SelectSingleNode ("members") != null) Members = int.Parse (node.SelectSingleNode ("members").InnerText); if (node.SelectSingleNode ("privacy") != null) Privacy = (PoolPrivacy)int.Parse (node.SelectSingleNode ("privacy").InnerText); if (node.SelectSingleNode ("throttle") != null) { XmlNode throttle = node.SelectSingleNode ("throttle"); ThrottleInfo = new GroupThrottleInfo (); if (throttle.Attributes.GetNamedItem ("count") != null) ThrottleInfo.Count = int.Parse (throttle.Attributes.GetNamedItem ("count").Value); if (throttle.Attributes.GetNamedItem ("mode") != null) ThrottleInfo.setMode (throttle.Attributes.GetNamedItem ("mode").Value); if (throttle.Attributes.GetNamedItem ("remaining") != null) ThrottleInfo.Remaining = int.Parse(throttle.Attributes.GetNamedItem ("remaining").Value); } }