Esempio n. 1
0
        public static SendAddress CreateAutomaticSendAddressFor(string mailboxIdParameterString)
        {
            string empty = string.Empty;
            SendAddressIdentity sendAddressIdentity = new SendAddressIdentity(mailboxIdParameterString, empty);

            return(new SendAddress(empty, ClientStrings.AutomaticDisplayName, sendAddressIdentity));
        }
Esempio n. 2
0
 public SendAddress(string addressId, string displayName, SendAddressIdentity sendAddressIdentity) : base(new SimplePropertyBag(SimpleProviderObjectSchema.Identity, SimpleProviderObjectSchema.ObjectState, SimpleProviderObjectSchema.ExchangeVersion))
 {
     if (addressId == null)
     {
         throw new ArgumentNullException("addressId");
     }
     if (displayName == null)
     {
         throw new ArgumentNullException("displayName");
     }
     if (displayName.Length == 0)
     {
         throw new ArgumentException("display name was set to empty", "displayName");
     }
     if (sendAddressIdentity == null)
     {
         throw new ArgumentNullException("sendAddressIdentity");
     }
     this[this.propertyBag.ObjectIdentityPropertyDefinition] = sendAddressIdentity;
     this.propertyBag.ResetChangeTracking();
     this.AddressId   = addressId;
     this.DisplayName = displayName;
 }