public static CameraControlTransport CreateFromXml(XElement xml) { CameraControlTransport result = new CameraControlTransport(); result.Type = (CameraControlTransportType)Enum.Parse(typeof(CameraControlTransportType), xml.Attribute("Type").Value); result.Address = xml.Attribute("Address").Value; return(result); }
public static CameraControlProtocol CreateFromXml(XElement xml) { CameraControlProtocol result = new CameraControlProtocol(); result.Type = (CameraControlProtocolType)Enum.Parse(typeof(CameraControlProtocolType), xml.Attribute("Type").Value); XElement xmlTransport = xml.Element("Transport"); if (xmlTransport != null) { result.Transport = CameraControlTransport.CreateFromXml(xmlTransport); } return(result); }