Example #1
0
        // Token: 0x06000B20 RID: 2848 RVA: 0x0004ED24 File Offset: 0x0004CF24
        private static Dictionary <string, string[]> GetProxyAddresses(string[] upns, UserContext userContext)
        {
            Dictionary <string, string[]> dictionary       = new Dictionary <string, string[]>();
            IRecipientSession             recipientSession = Utilities.CreateADRecipientSession(ConsistencyMode.IgnoreInvalid, userContext);

            Result <OWAMiniRecipient>[] array = recipientSession.FindOWAMiniRecipientByUserPrincipalName(upns);
            for (int i = 0; i < array.Length; i++)
            {
                OWAMiniRecipient data = array[i].Data;
                string           text = data.UserPrincipalName.ToString();
                if (!string.IsNullOrEmpty(text) && !dictionary.ContainsKey(text))
                {
                    dictionary.Add(text, InstantMessageUtilities.GetProxyAddressesForRecipient(data));
                }
            }
            return(dictionary);
        }
Example #2
0
        internal static ProxySettings[] GetProxySettings(string[] upns, IUserContext userContext)
        {
            List <ProxySettings> list             = new List <ProxySettings>();
            IRecipientSession    recipientSession = InstantMessageUtilities.CreateADRecipientSession(ConsistencyMode.IgnoreInvalid, userContext.ExchangePrincipal, userContext.MailboxIdentity.GetOWAMiniRecipient().QueryBaseDN);

            Result <OWAMiniRecipient>[] array = recipientSession.FindOWAMiniRecipientByUserPrincipalName(upns);
            for (int i = 0; i < array.Length; i++)
            {
                OWAMiniRecipient data = array[i].Data;
                string           text = data.UserPrincipalName.ToString();
                if (string.IsNullOrEmpty(text))
                {
                    list.Add(new ProxySettings(text, null));
                }
                else
                {
                    list.Add(new ProxySettings(text, InstantMessageUtilities.GetProxyAddressesForRecipient(data)));
                }
            }
            return(list.ToArray());
        }