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

            Properties = properties;
            Name       = DeliveryRuleActionType.UriSigning;
        }
Example #2
0
        internal static UriSigningAction DeserializeUriSigningAction(JsonElement element)
        {
            UriSigningActionProperties parameters = default;
            DeliveryRuleActionType     name       = default;

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