Exemple #1
0
        public DeliveryRuleIsDeviceCondition(IsDeviceMatchCondition properties)
        {
            if (properties == null)
            {
                throw new ArgumentNullException(nameof(properties));
            }

            Properties = properties;
            Name       = MatchVariable.IsDevice;
        }
Exemple #2
0
        internal static DeliveryRuleIsDeviceCondition DeserializeDeliveryRuleIsDeviceCondition(JsonElement element)
        {
            IsDeviceMatchCondition parameters = default;
            MatchVariable          name       = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("parameters"))
                {
                    parameters = IsDeviceMatchCondition.DeserializeIsDeviceMatchCondition(property.Value);
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = new MatchVariable(property.Value.GetString());
                    continue;
                }
            }
            return(new DeliveryRuleIsDeviceCondition(name, parameters));
        }
Exemple #3
0
 internal DeliveryRuleIsDeviceCondition(MatchVariable name, IsDeviceMatchCondition properties) : base(name)
 {
     Properties = properties;
     Name       = name;
 }