public DeliveryRuleCacheExpirationAction(CacheExpirationActionDefinition parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Parameters = parameters; Name = DeliveryRuleActionType.CacheExpiration; }
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)); }
internal DeliveryRuleCacheExpirationAction(DeliveryRuleActionType name, CacheExpirationActionDefinition parameters) : base(name) { Parameters = parameters; Name = name; }