public UrlRewriteAction(UrlRewriteActionParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } Parameters = parameters; Name = DeliveryRuleActionType.UrlRewrite; }
internal static UrlRewriteAction DeserializeUrlRewriteAction(JsonElement element) { UrlRewriteActionParameters parameters = default; DeliveryRuleAction name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("parameters")) { parameters = UrlRewriteActionParameters.DeserializeUrlRewriteActionParameters(property.Value); continue; } if (property.NameEquals("name")) { name = new DeliveryRuleAction(property.Value.GetString()); continue; } } return(new UrlRewriteAction(name, parameters)); }
internal UrlRewriteAction(DeliveryRuleActionType name, UrlRewriteActionParameters parameters) : base(name) { Parameters = parameters; Name = name; }