Beispiel #1
0
        public DeliveryRuleCookiesCondition(CookiesMatchCondition properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = MatchVariable.Cookies;
        }
Beispiel #2
0
        internal static DeliveryRuleCookiesCondition DeserializeDeliveryRuleCookiesCondition(JsonElement element)
        {
            CookiesMatchCondition parameters = default;
            MatchVariable         name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = CookiesMatchCondition.DeserializeCookiesMatchCondition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleCookiesCondition(name, parameters));
        }
Beispiel #3
0
 internal DeliveryRuleCookiesCondition(MatchVariable name, CookiesMatchCondition properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }