public ControlPanelCommandBaseFilter(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 "createdAtGreaterThanOrEqual":
                    this._CreatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

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

                case "createdByIdEqual":
                    this._CreatedByIdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "typeEqual":
                    this._TypeEqual = (ControlPanelCommandType)ParseEnum(typeof(ControlPanelCommandType), propertyNode.InnerText);
                    continue;

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

                case "targetTypeEqual":
                    this._TargetTypeEqual = (ControlPanelCommandTargetType)ParseEnum(typeof(ControlPanelCommandTargetType), propertyNode.InnerText);
                    continue;

                case "targetTypeIn":
                    this._TargetTypeIn = propertyNode.InnerText;
                    continue;

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

                case "statusIn":
                    this._StatusIn = propertyNode.InnerText;
                    continue;
                }
            }
        }
Esempio n. 2
0
 public ControlPanelCommandBaseFilter(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["createdAtGreaterThanOrEqual"] != null)
     {
         this._CreatedAtGreaterThanOrEqual = ParseInt(node["createdAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["createdAtLessThanOrEqual"] != null)
     {
         this._CreatedAtLessThanOrEqual = ParseInt(node["createdAtLessThanOrEqual"].Value <string>());
     }
     if (node["createdByIdEqual"] != null)
     {
         this._CreatedByIdEqual = ParseInt(node["createdByIdEqual"].Value <string>());
     }
     if (node["typeEqual"] != null)
     {
         this._TypeEqual = (ControlPanelCommandType)ParseEnum(typeof(ControlPanelCommandType), node["typeEqual"].Value <string>());
     }
     if (node["typeIn"] != null)
     {
         this._TypeIn = node["typeIn"].Value <string>();
     }
     if (node["targetTypeEqual"] != null)
     {
         this._TargetTypeEqual = (ControlPanelCommandTargetType)ParseEnum(typeof(ControlPanelCommandTargetType), node["targetTypeEqual"].Value <string>());
     }
     if (node["targetTypeIn"] != null)
     {
         this._TargetTypeIn = node["targetTypeIn"].Value <string>();
     }
     if (node["statusEqual"] != null)
     {
         this._StatusEqual = (ControlPanelCommandStatus)ParseEnum(typeof(ControlPanelCommandStatus), node["statusEqual"].Value <string>());
     }
     if (node["statusIn"] != null)
     {
         this._StatusIn = node["statusIn"].Value <string>();
     }
 }
        public ControlPanelCommand(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

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

                case "createdBy":
                    this._CreatedBy = propertyNode.InnerText;
                    continue;

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

                case "updatedBy":
                    this._UpdatedBy = propertyNode.InnerText;
                    continue;

                case "createdById":
                    this._CreatedById = ParseInt(propertyNode.InnerText);
                    continue;

                case "schedulerId":
                    this._SchedulerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "workerId":
                    this._WorkerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "workerConfiguredId":
                    this._WorkerConfiguredId = ParseInt(propertyNode.InnerText);
                    continue;

                case "workerName":
                    this._WorkerName = ParseInt(propertyNode.InnerText);
                    continue;

                case "batchIndex":
                    this._BatchIndex = ParseInt(propertyNode.InnerText);
                    continue;

                case "type":
                    this._Type = (ControlPanelCommandType)ParseEnum(typeof(ControlPanelCommandType), propertyNode.InnerText);
                    continue;

                case "targetType":
                    this._TargetType = (ControlPanelCommandTargetType)ParseEnum(typeof(ControlPanelCommandTargetType), propertyNode.InnerText);
                    continue;

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

                case "cause":
                    this._Cause = propertyNode.InnerText;
                    continue;

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

                case "errorDescription":
                    this._ErrorDescription = propertyNode.InnerText;
                    continue;
                }
            }
        }
 public ControlPanelCommand(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["createdBy"] != null)
     {
         this._CreatedBy = node["createdBy"].Value <string>();
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
     if (node["updatedBy"] != null)
     {
         this._UpdatedBy = node["updatedBy"].Value <string>();
     }
     if (node["createdById"] != null)
     {
         this._CreatedById = ParseInt(node["createdById"].Value <string>());
     }
     if (node["schedulerId"] != null)
     {
         this._SchedulerId = ParseInt(node["schedulerId"].Value <string>());
     }
     if (node["workerId"] != null)
     {
         this._WorkerId = ParseInt(node["workerId"].Value <string>());
     }
     if (node["workerConfiguredId"] != null)
     {
         this._WorkerConfiguredId = ParseInt(node["workerConfiguredId"].Value <string>());
     }
     if (node["workerName"] != null)
     {
         this._WorkerName = ParseInt(node["workerName"].Value <string>());
     }
     if (node["batchIndex"] != null)
     {
         this._BatchIndex = ParseInt(node["batchIndex"].Value <string>());
     }
     if (node["type"] != null)
     {
         this._Type = (ControlPanelCommandType)ParseEnum(typeof(ControlPanelCommandType), node["type"].Value <string>());
     }
     if (node["targetType"] != null)
     {
         this._TargetType = (ControlPanelCommandTargetType)ParseEnum(typeof(ControlPanelCommandTargetType), node["targetType"].Value <string>());
     }
     if (node["status"] != null)
     {
         this._Status = (ControlPanelCommandStatus)ParseEnum(typeof(ControlPanelCommandStatus), node["status"].Value <string>());
     }
     if (node["cause"] != null)
     {
         this._Cause = node["cause"].Value <string>();
     }
     if (node["description"] != null)
     {
         this._Description = node["description"].Value <string>();
     }
     if (node["errorDescription"] != null)
     {
         this._ErrorDescription = node["errorDescription"].Value <string>();
     }
 }