public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     SeedUserListId          = null;
     SeedUserListName        = null;
     SeedUserListDescription = null;
     SeedUserListStatus      = null;
     SeedListSize            = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "seedUserListId")
         {
             SeedUserListId = long.Parse(xItem.Value);
         }
         else if (localName == "seedUserListName")
         {
             SeedUserListName = xItem.Value;
         }
         else if (localName == "seedUserListDescription")
         {
             SeedUserListDescription = xItem.Value;
         }
         else if (localName == "seedUserListStatus")
         {
             SeedUserListStatus = UserListMembershipStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "seedListSize")
         {
             SeedListSize = long.Parse(xItem.Value);
         }
     }
 }
Пример #2
0
 public virtual void ReadFrom(XElement xE)
 {
     Id                    = null;
     IsReadOnly            = null;
     Name                  = null;
     Description           = null;
     Status                = null;
     IntegrationCode       = null;
     AccessReason          = null;
     AccountUserListStatus = null;
     MembershipLifeSpan    = null;
     Size                  = null;
     SizeRange             = null;
     SizeForSearch         = null;
     SizeRangeForSearch    = null;
     ListType              = null;
     IsEligibleForSearch   = null;
     IsEligibleForDisplay  = null;
     UserListType          = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "id")
         {
             Id = long.Parse(xItem.Value);
         }
         else if (localName == "isReadOnly")
         {
             IsReadOnly = bool.Parse(xItem.Value);
         }
         else if (localName == "name")
         {
             Name = xItem.Value;
         }
         else if (localName == "description")
         {
             Description = xItem.Value;
         }
         else if (localName == "status")
         {
             Status = UserListMembershipStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "integrationCode")
         {
             IntegrationCode = xItem.Value;
         }
         else if (localName == "accessReason")
         {
             AccessReason = AccessReasonExtensions.Parse(xItem.Value);
         }
         else if (localName == "accountUserListStatus")
         {
             AccountUserListStatus = AccountUserListStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "membershipLifeSpan")
         {
             MembershipLifeSpan = long.Parse(xItem.Value);
         }
         else if (localName == "size")
         {
             Size = long.Parse(xItem.Value);
         }
         else if (localName == "sizeRange")
         {
             SizeRange = SizeRangeExtensions.Parse(xItem.Value);
         }
         else if (localName == "sizeForSearch")
         {
             SizeForSearch = long.Parse(xItem.Value);
         }
         else if (localName == "sizeRangeForSearch")
         {
             SizeRangeForSearch = SizeRangeExtensions.Parse(xItem.Value);
         }
         else if (localName == "listType")
         {
             ListType = UserListTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "isEligibleForSearch")
         {
             IsEligibleForSearch = bool.Parse(xItem.Value);
         }
         else if (localName == "isEligibleForDisplay")
         {
             IsEligibleForDisplay = bool.Parse(xItem.Value);
         }
         else if (localName == "UserList.Type")
         {
             UserListType = xItem.Value;
         }
     }
 }