Exemplo n.º 1
0
        public UriRedirectAction(UriRedirectActionProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = DeliveryRuleActionType.UriRedirect;
        }
Exemplo n.º 2
0
        internal static UriRedirectAction DeserializeUriRedirectAction(JsonElement element)
        {
            UriRedirectActionProperties parameters = default;
            DeliveryRuleActionType      name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = UriRedirectActionProperties.DeserializeUriRedirectActionProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new UriRedirectAction(name, parameters));
        }
Exemplo n.º 3
0
 internal UriRedirectAction(DeliveryRuleActionType name, UriRedirectActionProperties properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }