public DeliveryRuleCookiesCondition(CookiesMatchConditionDefinition parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Parameters = parameters; Name = MatchVariable.Cookies; }
internal static DeliveryRuleCookiesCondition DeserializeDeliveryRuleCookiesCondition(JsonElement element) { CookiesMatchConditionDefinition parameters = default; MatchVariable name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("parameters")) { parameters = CookiesMatchConditionDefinition.DeserializeCookiesMatchConditionDefinition(property.Value); continue; } if (property.NameEquals("name")) { name = new MatchVariable(property.Value.GetString()); continue; } } return(new DeliveryRuleCookiesCondition(name, parameters)); }
internal DeliveryRuleCookiesCondition(MatchVariable name, CookiesMatchConditionDefinition parameters) : base(name) { Parameters = parameters; Name = name; }