public UrlRedirectAction(UrlRedirectActionParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Parameters = parameters; Name = DeliveryRuleActionType.UrlRedirect; }
internal static UrlRedirectAction DeserializeUrlRedirectAction(JsonElement element) { UrlRedirectActionParameters parameters = default; DeliveryRuleActionType name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("parameters")) { parameters = UrlRedirectActionParameters.DeserializeUrlRedirectActionParameters(property.Value); continue; } if (property.NameEquals("name")) { name = new DeliveryRuleActionType(property.Value.GetString()); continue; } } return(new UrlRedirectAction(name, parameters)); }
internal UrlRedirectAction(DeliveryRuleActionType name, UrlRedirectActionParameters parameters) : base(name) { Parameters = parameters; Name = name; }