OptionGroupOption.fromXml constructor

OptionGroupOption.fromXml(
  1. XmlElement elem
)

Implementation

factory OptionGroupOption.fromXml(_s.XmlElement elem) {
  return OptionGroupOption(
    defaultPort: _s.extractXmlIntValue(elem, 'DefaultPort'),
    description: _s.extractXmlStringValue(elem, 'Description'),
    engineName: _s.extractXmlStringValue(elem, 'EngineName'),
    majorEngineVersion: _s.extractXmlStringValue(elem, 'MajorEngineVersion'),
    minimumRequiredMinorEngineVersion:
        _s.extractXmlStringValue(elem, 'MinimumRequiredMinorEngineVersion'),
    name: _s.extractXmlStringValue(elem, 'Name'),
    optionGroupOptionSettings: _s
        .extractXmlChild(elem, 'OptionGroupOptionSettings')
        ?.let((elem) => elem
            .findElements('OptionGroupOptionSetting')
            .map((c) => OptionGroupOptionSetting.fromXml(c))
            .toList()),
    optionsDependedOn: _s
        .extractXmlChild(elem, 'OptionsDependedOn')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'OptionName')),
    permanent: _s.extractXmlBoolValue(elem, 'Permanent'),
    persistent: _s.extractXmlBoolValue(elem, 'Persistent'),
    portRequired: _s.extractXmlBoolValue(elem, 'PortRequired'),
  );
}