Пример #1
0
        public UriRewriteAction(UriRewriteActionProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = DeliveryRuleActionType.UriRewrite;
        }
Пример #2
0
        internal static UriRewriteAction DeserializeUriRewriteAction(JsonElement element)
        {
            UriRewriteActionProperties parameters = default;
            DeliveryRuleActionType     name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = UriRewriteActionProperties.DeserializeUriRewriteActionProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new UriRewriteAction(name, parameters));
        }
Пример #3
0
 internal UriRewriteAction(DeliveryRuleActionType name, UriRewriteActionProperties properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }