コード例 #1
0
        public DeliveryRuleCacheKeyQueryStringAction(CacheKeyQueryStringActionDefinition parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = DeliveryRuleActionType.CacheKeyQueryString;
        }
        internal static DeliveryRuleCacheKeyQueryStringAction DeserializeDeliveryRuleCacheKeyQueryStringAction(JsonElement element)
        {
            CacheKeyQueryStringActionDefinition parameters = default;
            DeliveryRuleActionType name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = CacheKeyQueryStringActionDefinition.DeserializeCacheKeyQueryStringActionDefinition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleCacheKeyQueryStringAction(name, parameters));
        }
コード例 #3
0
 internal DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleActionType name, CacheKeyQueryStringActionDefinition parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }