public DeliveryRuleUrlFileExtensionCondition(UrlFileExtensionMatchConditionParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Parameters = parameters; Name = MatchVariable.UrlFileExtension; }
internal static DeliveryRuleUrlFileExtensionCondition DeserializeDeliveryRuleUrlFileExtensionCondition(JsonElement element) { UrlFileExtensionMatchConditionParameters parameters = default; MatchVariable name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("parameters")) { parameters = UrlFileExtensionMatchConditionParameters.DeserializeUrlFileExtensionMatchConditionParameters(property.Value); continue; } if (property.NameEquals("name")) { name = new MatchVariable(property.Value.GetString()); continue; } } return(new DeliveryRuleUrlFileExtensionCondition(name, parameters)); }
internal DeliveryRuleUrlFileExtensionCondition(MatchVariable name, UrlFileExtensionMatchConditionParameters parameters) : base(name) { Parameters = parameters; Name = name; }