예제 #1
0
        private static void FillBasicResponseInfos(XElement element, PrtgResponse result)
        {
            var version = element.Element("prtg-version");

            if (version != null)
                result.Version = version.Value;

            result.Options = ReadOptions(element.Element("options"));
        }
예제 #2
0
        public PrtgResponse Parse(string xml)
        {
            var result = new PrtgResponse();

            var xdoc = XDocument.Parse(xml);

            var root = GetRootNode(xdoc.Root);

            FillBasicResponseInfos(xdoc.Root, result);

            result.Groups.AddRange(TryReadGroups(root));

            return result;
        }
예제 #3
0
        public void Refresh()
        {
            var xml = _prtgWebClient.SensorsXml();

            _currentData = _parser.Parse(xml);
        }