Esempio n. 1
0
 public void Add(string service, string contact)
 {
     AdditionalContact new_contact = new AdditionalContact();
     new_contact.service = service;
     new_contact.contacts = contact;
     this.parameters.Add(new_contact);
 }
Esempio n. 2
0
        public void Add(string service, string contact)
        {
            AdditionalContact new_contact = new AdditionalContact();

            new_contact.service  = service;
            new_contact.contacts = contact;
            this.parameters.Add(new_contact);
        }
Esempio n. 3
0
 public AdditionalContacts(string data)
 {
     this.parameters = new List<AdditionalContact>();
     string[] splitted = data.Split(';');
     foreach (string splitted_item in splitted)
     {
         try
         {
             if (splitted_item.Length > 0)
             {
                 string[] splitted_item_splitted = splitted_item.Split(':');
                 AdditionalContact contact = new AdditionalContact();
                 contact.service = splitted_item_splitted[0];
                 contact.contacts = splitted_item_splitted[1];
                 parameters.Add(contact);
             }
         }
         catch(Exception e)
         {
             throw new FormatException("Can't deserialize class. Check string format. " + e.Message);
         }
     }
 }
Esempio n. 4
0
 public AdditionalContacts(string data)
 {
     this.parameters = new List <AdditionalContact>();
     string[] splitted = data.Split(';');
     foreach (string splitted_item in splitted)
     {
         try
         {
             if (splitted_item.Length > 0)
             {
                 string[]          splitted_item_splitted = splitted_item.Split(':');
                 AdditionalContact contact = new AdditionalContact();
                 contact.service  = splitted_item_splitted[0];
                 contact.contacts = splitted_item_splitted[1];
                 parameters.Add(contact);
             }
         }
         catch (Exception e)
         {
             throw new FormatException("Can't deserialize class. Check string format. " + e.Message);
         }
     }
 }