public virtual void ReadFrom(XElement xE)
 {
     SearchParameters        = null;
     IdeaType                = null;
     RequestType             = null;
     RequestedAttributeTypes = null;
     Paging       = null;
     LocaleCode   = null;
     CurrencyCode = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "searchParameters")
         {
             if (SearchParameters == null)
             {
                 SearchParameters = new List <SearchParameter>();
             }
             var searchParametersItem = InstanceCreator.CreateSearchParameter(xItem);
             searchParametersItem.ReadFrom(xItem);
             SearchParameters.Add(searchParametersItem);
         }
         else if (localName == "ideaType")
         {
             IdeaType = IdeaTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "requestType")
         {
             RequestType = RequestTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "requestedAttributeTypes")
         {
             if (RequestedAttributeTypes == null)
             {
                 RequestedAttributeTypes = new List <AttributeType>();
             }
             RequestedAttributeTypes.Add(AttributeTypeExtensions.Parse(xItem.Value));
         }
         else if (localName == "paging")
         {
             Paging = new Paging();
             Paging.ReadFrom(xItem);
         }
         else if (localName == "localeCode")
         {
             LocaleCode = xItem.Value;
         }
         else if (localName == "currencyCode")
         {
             CurrencyCode = xItem.Value;
         }
     }
 }
Пример #2
0
 public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     Value = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "value")
         {
             Value = IdeaTypeExtensions.Parse(xItem.Value);
         }
     }
 }