コード例 #1
0
        public DeliveryRuleRequestMethodCondition(RequestMethodMatchCondition properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = MatchVariable.RequestMethod;
        }
コード例 #2
0
        internal static DeliveryRuleRequestMethodCondition DeserializeDeliveryRuleRequestMethodCondition(JsonElement element)
        {
            RequestMethodMatchCondition parameters = default;
            MatchVariable name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = RequestMethodMatchCondition.DeserializeRequestMethodMatchCondition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleRequestMethodCondition(name, parameters));
        }
コード例 #3
0
 internal DeliveryRuleRequestMethodCondition(MatchVariable name, RequestMethodMatchCondition properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }