ConfigurationOptionDescription.fromXml constructor

ConfigurationOptionDescription.fromXml(
  1. XmlElement elem
)

Implementation

factory ConfigurationOptionDescription.fromXml(_s.XmlElement elem) {
  return ConfigurationOptionDescription(
    changeSeverity: _s.extractXmlStringValue(elem, 'ChangeSeverity'),
    defaultValue: _s.extractXmlStringValue(elem, 'DefaultValue'),
    maxLength: _s.extractXmlIntValue(elem, 'MaxLength'),
    maxValue: _s.extractXmlIntValue(elem, 'MaxValue'),
    minValue: _s.extractXmlIntValue(elem, 'MinValue'),
    name: _s.extractXmlStringValue(elem, 'Name'),
    namespace: _s.extractXmlStringValue(elem, 'Namespace'),
    regex: _s
        .extractXmlChild(elem, 'Regex')
        ?.let((e) => OptionRestrictionRegex.fromXml(e)),
    userDefined: _s.extractXmlBoolValue(elem, 'UserDefined'),
    valueOptions: _s
        .extractXmlChild(elem, 'ValueOptions')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    valueType: _s
        .extractXmlStringValue(elem, 'ValueType')
        ?.toConfigurationOptionValueType(),
  );
}