public static void UpdateAddress(this AddressManagerClient client, Address address)
        {
            if (address == null)
            {
                throw new ArgumentNullException("address");
            }

            client.UpdateAddresses(new Address[] { address });
        }
Exemple #2
0
        public Address Add(Address address)
        {
            if (address == null)
            {
                throw new ArgumentNullException("address");
            }

            address.Type = address.Type ?? DefaultType;

            return Client.AddAddress(address);
        }
Exemple #3
0
 /// <summary>
 /// Only copy those fields that are allowed to change in updates
 /// </summary>
 internal void ApplyChanges(Address source)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source");
     }
     this.DisplayName = source.DisplayName;
     this.Status = source.Status;
     this.Type = source.Type;
     this.UpdateDate = DateTimeHelper.Now;
 }
Exemple #4
0
 internal void CopyFixed(Address source)
 {
     this.EmailAddress = source.EmailAddress;
     this.ID = source.ID;
     this.DomainID = source.DomainID;
     this.CreateDate = source.CreateDate;
     this.UpdateDate = source.UpdateDate;
 }        
 public void UpdateAddresses(Address[] addresses)
 {
     try
     {
         Store.Addresses.Update(addresses);
     }
     catch (Exception ex)
     {
         throw CreateFault("UpdateAddresses", ex);
     }
 }
 public void AddAddresses(Address[] addresses)
 {
     try
     {
         Store.Addresses.Add(addresses);
     }
     catch (Exception ex)
     {
         throw CreateFault("AddAddresses", ex);
     }
 }
 public Address AddAddress(Address address)
 {
     try
     {
         return Store.Addresses.Add(address);
     }
     catch (Exception ex)
     {
         throw CreateFault("AddAddress", ex);
     }
 }
Exemple #8
0
 public void Delete(Address address)
 {
     Client.RemoveAddresses(new[]{address.EmailAddress});
 }
Exemple #9
0
 public Address Update(Address address)
 {
     Client.UpdateAddresses(new[] {address});
     address.UpdateDate = DateTimeHelper.Now;
     return address;
 }