Exemplo n.º 1
0
        public DeliveryRuleUriFileExtensionCondition(UriFileExtensionMatchConditionDefinition parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = MatchVariable.UriFileExtension;
        }
Exemplo n.º 2
0
        internal static DeliveryRuleUriFileExtensionCondition DeserializeDeliveryRuleUriFileExtensionCondition(JsonElement element)
        {
            UriFileExtensionMatchConditionDefinition parameters = default;
            MatchVariable name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = UriFileExtensionMatchConditionDefinition.DeserializeUriFileExtensionMatchConditionDefinition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleUriFileExtensionCondition(name, parameters));
        }
Exemplo n.º 3
0
 internal DeliveryRuleUriFileExtensionCondition(MatchVariable name, UriFileExtensionMatchConditionDefinition parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }