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

            Parameters = parameters;
            Name       = DeliveryRuleActionType.CacheExpiration;
        }
コード例 #2
0
        internal static DeliveryRuleCacheExpirationAction DeserializeDeliveryRuleCacheExpirationAction(JsonElement element)
        {
            CacheExpirationActionDefinition parameters = default;
            DeliveryRuleActionType          name       = default;

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