示例#1
0
        public ShortLink(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = propertyNode.InnerText;
                    continue;

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

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

                case "expiresAt":
                    this._ExpiresAt = ParseInt(propertyNode.InnerText);
                    continue;

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

                case "userId":
                    this._UserId = propertyNode.InnerText;
                    continue;

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

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

                case "fullUrl":
                    this._FullUrl = propertyNode.InnerText;
                    continue;

                case "status":
                    this._Status = (ShortLinkStatus)ParseEnum(typeof(ShortLinkStatus), propertyNode.InnerText);
                    continue;
                }
            }
        }
 public ShortLink(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = node["id"].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["expiresAt"] != null)
     {
         this._ExpiresAt = ParseInt(node["expiresAt"].Value <string>());
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["userId"] != null)
     {
         this._UserId = node["userId"].Value <string>();
     }
     if (node["name"] != null)
     {
         this._Name = node["name"].Value <string>();
     }
     if (node["systemName"] != null)
     {
         this._SystemName = node["systemName"].Value <string>();
     }
     if (node["fullUrl"] != null)
     {
         this._FullUrl = node["fullUrl"].Value <string>();
     }
     if (node["status"] != null)
     {
         this._Status = (ShortLinkStatus)ParseEnum(typeof(ShortLinkStatus), node["status"].Value <string>());
     }
 }
 public ShortLinkBaseFilter(JToken node) : base(node)
 {
     if (node["idEqual"] != null)
     {
         this._IdEqual = 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["updatedAtGreaterThanOrEqual"] != null)
     {
         this._UpdatedAtGreaterThanOrEqual = ParseInt(node["updatedAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["updatedAtLessThanOrEqual"] != null)
     {
         this._UpdatedAtLessThanOrEqual = ParseInt(node["updatedAtLessThanOrEqual"].Value <string>());
     }
     if (node["expiresAtGreaterThanOrEqual"] != null)
     {
         this._ExpiresAtGreaterThanOrEqual = ParseInt(node["expiresAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["expiresAtLessThanOrEqual"] != null)
     {
         this._ExpiresAtLessThanOrEqual = ParseInt(node["expiresAtLessThanOrEqual"].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["userIdEqual"] != null)
     {
         this._UserIdEqual = node["userIdEqual"].Value <string>();
     }
     if (node["userIdIn"] != null)
     {
         this._UserIdIn = node["userIdIn"].Value <string>();
     }
     if (node["systemNameEqual"] != null)
     {
         this._SystemNameEqual = node["systemNameEqual"].Value <string>();
     }
     if (node["systemNameIn"] != null)
     {
         this._SystemNameIn = node["systemNameIn"].Value <string>();
     }
     if (node["statusEqual"] != null)
     {
         this._StatusEqual = (ShortLinkStatus)ParseEnum(typeof(ShortLinkStatus), node["statusEqual"].Value <string>());
     }
     if (node["statusIn"] != null)
     {
         this._StatusIn = node["statusIn"].Value <string>();
     }
 }
        public ShortLinkBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "idEqual":
                    this._IdEqual = 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 "updatedAtGreaterThanOrEqual":
                    this._UpdatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtLessThanOrEqual":
                    this._UpdatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "expiresAtGreaterThanOrEqual":
                    this._ExpiresAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "expiresAtLessThanOrEqual":
                    this._ExpiresAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

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

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

                case "userIdEqual":
                    this._UserIdEqual = propertyNode.InnerText;
                    continue;

                case "userIdIn":
                    this._UserIdIn = propertyNode.InnerText;
                    continue;

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

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

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

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