예제 #1
0
        public DeliveryRuleUrlPathCondition(UrlPathMatchConditionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = MatchVariable.UrlPath;
        }
        internal static DeliveryRuleUrlPathCondition DeserializeDeliveryRuleUrlPathCondition(JsonElement element)
        {
            UrlPathMatchConditionParameters parameters = default;
            MatchVariable name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = UrlPathMatchConditionParameters.DeserializeUrlPathMatchConditionParameters(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleUrlPathCondition(name, parameters));
        }
예제 #3
0
 internal DeliveryRuleUrlPathCondition(MatchVariable name, UrlPathMatchConditionParameters parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }