Example #1
0
        public DeliveryRuleRequestHeaderAction(HeaderActionProperties properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = DeliveryRuleActionType.ModifyRequestHeader;
        }
Example #2
0
        internal static DeliveryRuleResponseHeaderAction DeserializeDeliveryRuleResponseHeaderAction(JsonElement element)
        {
            HeaderActionProperties parameters = default;
            DeliveryRuleActionType name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = HeaderActionProperties.DeserializeHeaderActionProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new DeliveryRuleActionType(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleResponseHeaderAction(name, parameters));
        }
Example #3
0
 internal DeliveryRuleRequestHeaderAction(DeliveryRuleActionType name, HeaderActionProperties properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }