internal override bool?IsInRoleCmdlet(ExchangeRunspaceConfiguration rbacConfiguration) { SendAddress sendAddress = new SendAddress(); PowerShellResults <SendAddressRow> list = sendAddress.GetList(null, null); if (list.Succeeded) { return(new bool?(list.Output.Length > 2)); } base.LogCmdletError(list, "SendAddressAvailable"); return(new bool?(false)); }
public PowerShellResults <SendAddressConfiguration> GetObject(Identity identity) { identity = Identity.FromExecutingUserId(); PowerShellResults <SendAddressConfiguration> @object = base.GetObject <SendAddressConfiguration>("Get-MailboxMessageConfiguration", identity); if (@object.Failed) { return(@object); } SendAddress sendAddress = new SendAddress(); PowerShellResults <SendAddressRow> list = sendAddress.GetList(new SendAddressFilter { AddressId = (@object.Value.SendAddressDefault ?? string.Empty), IgnoreNullOrEmpty = false }, null); if (list.Failed) { @object.MergeErrors <SendAddressRow>(list); return(@object); } @object.Value.SendAddressDefault = list.Value.Value; return(@object); }