public DeliveryRuleRequestSchemeCondition(RequestSchemeMatchConditionParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            Parameters = parameters;
            Name       = MatchVariable.RequestScheme;
        }
Exemplo n.º 2
0
        internal static DeliveryRuleRequestSchemeCondition DeserializeDeliveryRuleRequestSchemeCondition(JsonElement element)
        {
            RequestSchemeMatchConditionParameters parameters = default;
            MatchVariable name = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = RequestSchemeMatchConditionParameters.DeserializeRequestSchemeMatchConditionParameters(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleRequestSchemeCondition(name, parameters));
        }
 internal DeliveryRuleRequestSchemeCondition(MatchVariable name, RequestSchemeMatchConditionParameters parameters) : base(name)
 {
     Parameters = parameters;
     Name       = name;
 }