public DeliveryRuleRequestBodyCondition(RequestBodyMatchConditionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = MatchVariable.RequestBody;
        }
Ejemplo n.º 2
0
        internal static DeliveryRuleRequestBodyCondition DeserializeDeliveryRuleRequestBodyCondition(JsonElement element)
        {
            RequestBodyMatchConditionParameters parameters = default;
            MatchVariable name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = RequestBodyMatchConditionParameters.DeserializeRequestBodyMatchConditionParameters(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleRequestBodyCondition(name, parameters));
        }
 internal DeliveryRuleRequestBodyCondition(MatchVariable name, RequestBodyMatchConditionParameters parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }