示例#1
0
        public DeliveryRuleRequestBodyCondition(RequestBodyMatchCondition properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = MatchVariable.RequestBody;
        }
示例#2
0
        internal static DeliveryRuleRequestBodyCondition DeserializeDeliveryRuleRequestBodyCondition(JsonElement element)
        {
            RequestBodyMatchCondition parameters = default;
            MatchVariable             name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = RequestBodyMatchCondition.DeserializeRequestBodyMatchCondition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleRequestBodyCondition(name, parameters));
        }
示例#3
0
 internal DeliveryRuleRequestBodyCondition(MatchVariable name, RequestBodyMatchCondition properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }