public void Initialize(ObjectId objectId) { this.ThrowIfArgumentNull("objectId", objectId); SendAddressIdentity sendAddressIdentity = objectId as SendAddressIdentity; if (sendAddressIdentity == null) { string message = string.Format("objectId is the wrong type: {0} expected: {1}", objectId.GetType().Name, typeof(SendAddressIdentity).Name, CultureInfo.InvariantCulture); throw new ArgumentException(message, "objectId"); } this.sendAddressIdentity = sendAddressIdentity; this.mailboxIdParameter = this.FromSendAddressIdentity(); }
protected override void InternalStateReset() { TaskLogger.LogEnter(new object[] { this.Identity }); base.InternalStateReset(); if (this.Identity == null) { if (this.AddressId != null) { SendAddressIdentity sendAddressIdentity = new SendAddressIdentity(this.Mailbox.ToString(), this.AddressId); this.Identity = new SendAddressIdParameter(sendAddressIdentity); } else { this.Identity = new SendAddressIdParameter(); } } TaskLogger.LogExit(); }
internal SendAddressIdParameter(SendAddressIdentity sendAddressIdentity) { this.Initialize(sendAddressIdentity); }
public IConfigurable Read <T>(ObjectId identity) where T : IConfigurable, new() { SendAddressIdentity sendAddressIdentity = (SendAddressIdentity)identity; return(this.sendAsDefaultsManager.LookUpSendAddress(sendAddressIdentity.AddressId, this.mailboxIdParameterString, this.userPrincipal.MailboxInfo.PrimarySmtpAddress.ToString(), this.GetAllSendAsSubscriptions())); }