Exemplo n.º 1
0
        public BaseEntryFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "freeText":
                    this._FreeText = propertyNode.InnerText;
                    continue;

                case "isRoot":
                    this._IsRoot = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText);
                    continue;

                case "categoriesFullNameIn":
                    this._CategoriesFullNameIn = propertyNode.InnerText;
                    continue;

                case "categoryAncestorIdIn":
                    this._CategoryAncestorIdIn = propertyNode.InnerText;
                    continue;

                case "redirectFromEntryId":
                    this._RedirectFromEntryId = propertyNode.InnerText;
                    continue;

                case "orderBy":
                    this._OrderBy = (BaseEntryOrderBy)StringEnum.Parse(typeof(BaseEntryOrderBy), propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemplo n.º 2
0
 public BaseEntryFilter(JToken node) : base(node)
 {
     if (node["freeText"] != null)
     {
         this._FreeText = node["freeText"].Value <string>();
     }
     if (node["excludedFreeTextGroups"] != null)
     {
         this._ExcludedFreeTextGroups = node["excludedFreeTextGroups"].Value <string>();
     }
     if (node["descriptionLike"] != null)
     {
         this._DescriptionLike = node["descriptionLike"].Value <string>();
     }
     if (node["isRoot"] != null)
     {
         this._IsRoot = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isRoot"].Value <string>());
     }
     if (node["categoriesFullNameIn"] != null)
     {
         this._CategoriesFullNameIn = node["categoriesFullNameIn"].Value <string>();
     }
     if (node["categoryAncestorIdIn"] != null)
     {
         this._CategoryAncestorIdIn = node["categoryAncestorIdIn"].Value <string>();
     }
     if (node["redirectFromEntryId"] != null)
     {
         this._RedirectFromEntryId = node["redirectFromEntryId"].Value <string>();
     }
     if (node["orderBy"] != null)
     {
         this._OrderBy = (BaseEntryOrderBy)StringEnum.Parse(typeof(BaseEntryOrderBy), node["orderBy"].Value <string>());
     }
 }