private ADRawEntry[] GetMemberRawEntriesFromMailbox(IRecipientSession recipientSession, ADUser adUser, MailboxSession mailboxSession)
        {
            GroupMailboxLocator groupLocator      = GroupMailboxLocator.Instantiate(recipientSession, adUser);
            List <string>       exchangeLegacyDNs = new List <string>(10);

            GroupMailboxAccessLayer.Execute("Get-GroupMailbox", recipientSession, mailboxSession, delegate(GroupMailboxAccessLayer accessLayer)
            {
                IEnumerable <UserMailbox> members = accessLayer.GetMembers(groupLocator, false, null);
                foreach (UserMailbox userMailbox in members)
                {
                    exchangeLegacyDNs.Add(userMailbox.Locator.LegacyDn);
                }
            });
            string[]          array = exchangeLegacyDNs.ToArray();
            List <ADRawEntry> list  = new List <ADRawEntry>(array.Length);

            try
            {
                Result <ADRawEntry>[] array2 = recipientSession.FindByExchangeLegacyDNs(array, IdentityDetails.Properties);
                for (int i = 0; i < array2.Length; i++)
                {
                    Result <ADRawEntry> result = array2[i];
                    if (result.Error != null)
                    {
                        this.WriteWarning(Strings.WarningUnableToResolveUser(array[i].ToString(), result.Error.ToString()));
                    }
                    else if (result.Data == null)
                    {
                        base.WriteVerbose(Strings.WarningUnableToResolveUser(array[i].ToString(), string.Empty));
                    }
                    else
                    {
                        list.Add(result.Data);
                    }
                }
            }
            catch (LocalizedException ex)
            {
                base.WriteWarning("Unable to retrieve members details from mailbox due exception: " + ex.Message);
            }
            return(list.ToArray());
        }