예제 #1
0
        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));
        }
예제 #2
0
        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);
        }