Example #1
0
        public DeliveryRuleCacheKeyQueryStringAction(CacheKeyQueryStringActionProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = DeliveryRuleActionType.CacheKeyQueryString;
        }
Example #2
0
        internal static DeliveryRuleCacheKeyQueryStringAction DeserializeDeliveryRuleCacheKeyQueryStringAction(JsonElement element)
        {
            CacheKeyQueryStringActionProperties parameters = default;
            DeliveryRuleActionType name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = CacheKeyQueryStringActionProperties.DeserializeCacheKeyQueryStringActionProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleCacheKeyQueryStringAction(name, parameters));
        }
Example #3
0
 internal DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleActionType name, CacheKeyQueryStringActionProperties properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }