Esempio n. 1
0
 public int IndexOf(EmailAddress emailAddress)
 {
     for (int i = 0; i < List.Count; i++)
         if (this[i] == emailAddress)    // Found it
             return i;
     return -1;
 }
Esempio n. 2
0
 public EmailAddress Find(EmailAddress emailAddress)
 {
     foreach (EmailAddress emailAddressItem in this)
         if (emailAddressItem == emailAddress)    // Found it
             return emailAddressItem;
     return null;    // Not found
 }
Esempio n. 3
0
 // TODO: If you changed the parameters to Find (above), change them here as well.
 public bool Contains(EmailAddress emailAddress)
 {
     return(Find(emailAddress) != null);
 }
Esempio n. 4
0
 public void Remove(EmailAddress emailAddress)
 {
     List.Remove(emailAddress);
 }
Esempio n. 5
0
 public void Insert(int index, EmailAddress emailAddress)
 {
     List.Insert(index, emailAddress);
 }
Esempio n. 6
0
 // public methods...
 public int Add(EmailAddress emailAddress)
 {
     return(List.Add(emailAddress));
 }
Esempio n. 7
0
 internal static void FillFromDataTable(DataTable table, EmailAddresses items)
 {
     foreach (DataRow row in table.Rows)
     {
         //RecipientList recipientList = new RecipientList(row);
         //recList.CreateEmailAddress(row["EmailAddress"].ToString());
         EmailAddress email = new EmailAddress(row);
         items.Add(email);
     }
 }
Esempio n. 8
0
        /// <summary>
        /// Creates a new recipient email item with a given email address, 
        /// connected to this list, but does not add it to the EmailAddresses collection.
        /// The item is not saved, it has to be explicitly saved.
        /// </summary>
        /// <remarks>
        /// There is no check for a duplicate email address for this
        /// list when creating the work item.
        /// </remarks>
        /// <returns>
        /// A new email address item with an email address connected to this list
        /// </returns>
        public EmailAddress CreateEmailAddress(string email)
        {
            if (_id <= 0)
                throw new ApplicationException("Cannot create email address object for a recipient list that has no id. Save the list first to get the id.");

            EmailAddress emailAddress = new EmailAddress(_id, email);
            return emailAddress;
        }
Esempio n. 9
0
 private static void FillFromDataTable(DataTable table, EmailAddresses emailAddresses)
 {
     foreach (DataRow row in table.Rows)
     {
         EmailAddress emailAddress = new EmailAddress(row);
         emailAddresses.Add(emailAddress);
     }
 }
Esempio n. 10
0
 public void Remove(EmailAddress emailAddress)
 {
     List.Remove(emailAddress);
 }
Esempio n. 11
0
 public void Insert(int index, EmailAddress emailAddress)
 {
     List.Insert(index, emailAddress);
 }
Esempio n. 12
0
 // TODO: If you changed the parameters to Find (above), change them here as well.
 public bool Contains(EmailAddress emailAddress)
 {
     return (Find(emailAddress) != null);
 }
Esempio n. 13
0
 // public methods...
 public int Add(EmailAddress emailAddress)
 {
     return List.Add(emailAddress);
 }