Esempio n. 1
0
        public static HttpConfig FromXml(XElement element)
        {
            var obj = new HttpConfig();

            obj.Devices.AddRange(element.Elements("Device").Select(element => HttpDeviceConfig.FromXml(element)));
            return(obj);
        }
Esempio n. 2
0
        public static HttpDeviceConfig FromXml(XElement element)
        {
            var obj = new HttpDeviceConfig();

            obj.Name        = (string)element.Attribute(nameof(obj.Name));
            obj.Description = (string)element.Attribute(nameof(obj.Description));
            obj.Type        = (string)element.Attribute(nameof(obj.Type));
            obj.Host        = (string)element.Attribute(nameof(obj.Host));
            obj.Check();
            return(obj);
        }