Exemple #1
0
 public EventNotificationTemplateBaseFilter(JToken node) : base(node)
 {
     if (node["idEqual"] != null)
     {
         this._IdEqual = ParseInt(node["idEqual"].Value <string>());
     }
     if (node["idIn"] != null)
     {
         this._IdIn = node["idIn"].Value <string>();
     }
     if (node["partnerIdEqual"] != null)
     {
         this._PartnerIdEqual = ParseInt(node["partnerIdEqual"].Value <string>());
     }
     if (node["partnerIdIn"] != null)
     {
         this._PartnerIdIn = node["partnerIdIn"].Value <string>();
     }
     if (node["systemNameEqual"] != null)
     {
         this._SystemNameEqual = node["systemNameEqual"].Value <string>();
     }
     if (node["systemNameIn"] != null)
     {
         this._SystemNameIn = node["systemNameIn"].Value <string>();
     }
     if (node["typeEqual"] != null)
     {
         this._TypeEqual = (EventNotificationTemplateType)StringEnum.Parse(typeof(EventNotificationTemplateType), node["typeEqual"].Value <string>());
     }
     if (node["typeIn"] != null)
     {
         this._TypeIn = node["typeIn"].Value <string>();
     }
     if (node["statusEqual"] != null)
     {
         this._StatusEqual = (EventNotificationTemplateStatus)ParseEnum(typeof(EventNotificationTemplateStatus), node["statusEqual"].Value <string>());
     }
     if (node["statusIn"] != null)
     {
         this._StatusIn = node["statusIn"].Value <string>();
     }
     if (node["createdAtGreaterThanOrEqual"] != null)
     {
         this._CreatedAtGreaterThanOrEqual = ParseInt(node["createdAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["createdAtLessThanOrEqual"] != null)
     {
         this._CreatedAtLessThanOrEqual = ParseInt(node["createdAtLessThanOrEqual"].Value <string>());
     }
     if (node["updatedAtGreaterThanOrEqual"] != null)
     {
         this._UpdatedAtGreaterThanOrEqual = ParseInt(node["updatedAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["updatedAtLessThanOrEqual"] != null)
     {
         this._UpdatedAtLessThanOrEqual = ParseInt(node["updatedAtLessThanOrEqual"].Value <string>());
     }
 }
        public EventNotificationTemplate(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerId":
                    this._PartnerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "name":
                    this._Name = propertyNode.InnerText;
                    continue;

                case "systemName":
                    this._SystemName = propertyNode.InnerText;
                    continue;

                case "description":
                    this._Description = propertyNode.InnerText;
                    continue;

                case "type":
                    this._Type = (EventNotificationTemplateType)StringEnum.Parse(typeof(EventNotificationTemplateType), propertyNode.InnerText);
                    continue;

                case "status":
                    this._Status = (EventNotificationTemplateStatus)ParseEnum(typeof(EventNotificationTemplateStatus), propertyNode.InnerText);
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAt":
                    this._UpdatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "manualDispatchEnabled":
                    this._ManualDispatchEnabled = ParseBool(propertyNode.InnerText);
                    continue;

                case "automaticDispatchEnabled":
                    this._AutomaticDispatchEnabled = ParseBool(propertyNode.InnerText);
                    continue;

                case "eventType":
                    this._EventType = (EventNotificationEventType)StringEnum.Parse(typeof(EventNotificationEventType), propertyNode.InnerText);
                    continue;

                case "eventObjectType":
                    this._EventObjectType = (EventNotificationEventObjectType)StringEnum.Parse(typeof(EventNotificationEventObjectType), propertyNode.InnerText);
                    continue;

                case "eventConditions":
                    this._EventConditions = new List <Condition>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._EventConditions.Add(ObjectFactory.Create <Condition>(arrayNode));
                    }
                    continue;

                case "contentParameters":
                    this._ContentParameters = new List <EventNotificationParameter>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._ContentParameters.Add(ObjectFactory.Create <EventNotificationParameter>(arrayNode));
                    }
                    continue;

                case "userParameters":
                    this._UserParameters = new List <EventNotificationParameter>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._UserParameters.Add(ObjectFactory.Create <EventNotificationParameter>(arrayNode));
                    }
                    continue;
                }
            }
        }
        public EventNotificationTemplateBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "idEqual":
                    this._IdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "idIn":
                    this._IdIn = propertyNode.InnerText;
                    continue;

                case "partnerIdEqual":
                    this._PartnerIdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerIdIn":
                    this._PartnerIdIn = propertyNode.InnerText;
                    continue;

                case "systemNameEqual":
                    this._SystemNameEqual = propertyNode.InnerText;
                    continue;

                case "systemNameIn":
                    this._SystemNameIn = propertyNode.InnerText;
                    continue;

                case "typeEqual":
                    this._TypeEqual = (EventNotificationTemplateType)StringEnum.Parse(typeof(EventNotificationTemplateType), propertyNode.InnerText);
                    continue;

                case "typeIn":
                    this._TypeIn = propertyNode.InnerText;
                    continue;

                case "statusEqual":
                    this._StatusEqual = (EventNotificationTemplateStatus)ParseEnum(typeof(EventNotificationTemplateStatus), propertyNode.InnerText);
                    continue;

                case "statusIn":
                    this._StatusIn = propertyNode.InnerText;
                    continue;

                case "createdAtGreaterThanOrEqual":
                    this._CreatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAtLessThanOrEqual":
                    this._CreatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtGreaterThanOrEqual":
                    this._UpdatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtLessThanOrEqual":
                    this._UpdatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }
 public EventNotificationTemplate(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["name"] != null)
     {
         this._Name = node["name"].Value <string>();
     }
     if (node["systemName"] != null)
     {
         this._SystemName = node["systemName"].Value <string>();
     }
     if (node["description"] != null)
     {
         this._Description = node["description"].Value <string>();
     }
     if (node["type"] != null)
     {
         this._Type = (EventNotificationTemplateType)StringEnum.Parse(typeof(EventNotificationTemplateType), node["type"].Value <string>());
     }
     if (node["status"] != null)
     {
         this._Status = (EventNotificationTemplateStatus)ParseEnum(typeof(EventNotificationTemplateStatus), node["status"].Value <string>());
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
     if (node["manualDispatchEnabled"] != null)
     {
         this._ManualDispatchEnabled = ParseBool(node["manualDispatchEnabled"].Value <string>());
     }
     if (node["automaticDispatchEnabled"] != null)
     {
         this._AutomaticDispatchEnabled = ParseBool(node["automaticDispatchEnabled"].Value <string>());
     }
     if (node["eventType"] != null)
     {
         this._EventType = (EventNotificationEventType)StringEnum.Parse(typeof(EventNotificationEventType), node["eventType"].Value <string>());
     }
     if (node["eventObjectType"] != null)
     {
         this._EventObjectType = (EventNotificationEventObjectType)StringEnum.Parse(typeof(EventNotificationEventObjectType), node["eventObjectType"].Value <string>());
     }
     if (node["eventConditions"] != null)
     {
         this._EventConditions = new List <Condition>();
         foreach (var arrayNode in node["eventConditions"].Children())
         {
             this._EventConditions.Add(ObjectFactory.Create <Condition>(arrayNode));
         }
     }
     if (node["contentParameters"] != null)
     {
         this._ContentParameters = new List <EventNotificationParameter>();
         foreach (var arrayNode in node["contentParameters"].Children())
         {
             this._ContentParameters.Add(ObjectFactory.Create <EventNotificationParameter>(arrayNode));
         }
     }
     if (node["userParameters"] != null)
     {
         this._UserParameters = new List <EventNotificationParameter>();
         foreach (var arrayNode in node["userParameters"].Children())
         {
             this._UserParameters.Add(ObjectFactory.Create <EventNotificationParameter>(arrayNode));
         }
     }
 }