RuleCondition.fromXml constructor

RuleCondition.fromXml(
  1. XmlElement elem
)

Implementation

factory RuleCondition.fromXml(_s.XmlElement elem) {
  return RuleCondition(
    field: _s.extractXmlStringValue(elem, 'Field'),
    hostHeaderConfig: _s
        .extractXmlChild(elem, 'HostHeaderConfig')
        ?.let((e) => HostHeaderConditionConfig.fromXml(e)),
    httpHeaderConfig: _s
        .extractXmlChild(elem, 'HttpHeaderConfig')
        ?.let((e) => HttpHeaderConditionConfig.fromXml(e)),
    httpRequestMethodConfig: _s
        .extractXmlChild(elem, 'HttpRequestMethodConfig')
        ?.let((e) => HttpRequestMethodConditionConfig.fromXml(e)),
    pathPatternConfig: _s
        .extractXmlChild(elem, 'PathPatternConfig')
        ?.let((e) => PathPatternConditionConfig.fromXml(e)),
    queryStringConfig: _s
        .extractXmlChild(elem, 'QueryStringConfig')
        ?.let((e) => QueryStringConditionConfig.fromXml(e)),
    sourceIpConfig: _s
        .extractXmlChild(elem, 'SourceIpConfig')
        ?.let((e) => SourceIpConditionConfig.fromXml(e)),
    values: _s
        .extractXmlChild(elem, 'Values')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
  );
}