Exemple #1
0
        private bool TryCreateExchangeGuidArray(out Guid[] exchangeGuid)
        {
            bool result = true;

            exchangeGuid = null;
            int num = 0;

            foreach (ADQueryResult adqueryResult in this.resultDictionary.Values)
            {
                string smtpAddress = adqueryResult.UserResultMapping.SmtpProxyAddress.SmtpAddress;
                Guid   guid;
                if (!SmtpProxyAddress.TryDeencapsulateExchangeGuid(smtpAddress, out guid))
                {
                    result       = false;
                    exchangeGuid = null;
                    break;
                }
                if (exchangeGuid == null)
                {
                    exchangeGuid = new Guid[this.resultDictionary.Count];
                }
                exchangeGuid[num] = guid;
                num++;
            }
            return(result);
        }
Exemple #2
0
        // Token: 0x06000778 RID: 1912 RVA: 0x0001D120 File Offset: 0x0001B320
        internal static bool TryGetExchangeGuidFromEmailAddress(string emailAddress, out Guid exchangeGuid)
        {
            exchangeGuid = Guid.Empty;
            if (string.IsNullOrEmpty(emailAddress) || !SmtpAddress.IsValidSmtpAddress(emailAddress))
            {
                return(false);
            }
            if (SmtpProxyAddress.TryDeencapsulateExchangeGuid(emailAddress, out exchangeGuid))
            {
                return(true);
            }
            SmtpAddress smtpAddress = new SmtpAddress(emailAddress);

            return(!string.IsNullOrEmpty(smtpAddress.Local) && Guid.TryParse(smtpAddress.Local, out exchangeGuid));
        }