Ejemplo n.º 1
0
 public virtual void ReadFrom(XElement xE)
 {
     Name                  = null;
     CustomerId            = null;
     CanManageClients      = null;
     CurrencyCode          = null;
     DateTimeZone          = null;
     TestAccount           = null;
     AccountLabels         = null;
     ExcludeHiddenAccounts = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "name")
         {
             Name = xItem.Value;
         }
         else if (localName == "customerId")
         {
             CustomerId = long.Parse(xItem.Value);
         }
         else if (localName == "canManageClients")
         {
             CanManageClients = bool.Parse(xItem.Value);
         }
         else if (localName == "currencyCode")
         {
             CurrencyCode = xItem.Value;
         }
         else if (localName == "dateTimeZone")
         {
             DateTimeZone = xItem.Value;
         }
         else if (localName == "testAccount")
         {
             TestAccount = bool.Parse(xItem.Value);
         }
         else if (localName == "accountLabels")
         {
             if (AccountLabels == null)
             {
                 AccountLabels = new List <AccountLabel>();
             }
             var accountLabelsItem = new AccountLabel();
             accountLabelsItem.ReadFrom(xItem);
             AccountLabels.Add(accountLabelsItem);
         }
         else if (localName == "excludeHiddenAccounts")
         {
             ExcludeHiddenAccounts = bool.Parse(xItem.Value);
         }
     }
 }
Ejemplo n.º 2
0
 public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     Operand = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "operand")
         {
             Operand = new AccountLabel();
             Operand.ReadFrom(xItem);
         }
     }
 }
 public virtual void ReadFrom(XElement xE)
 {
     Labels = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "labels")
         {
             if (Labels == null)
             {
                 Labels = new List <AccountLabel>();
             }
             var labelsItem = new AccountLabel();
             labelsItem.ReadFrom(xItem);
             Labels.Add(labelsItem);
         }
     }
 }