示例#1
0
        internal static LegacyDN CreateSelfRedirectLegacyDN(LegacyDN legacyDN, Guid mailboxGuid)
        {
            string   rdnPrefix;
            string   str;
            LegacyDN parentLegacyDN = legacyDN.GetParentLegacyDN(out rdnPrefix, out str);

            return(parentLegacyDN.GetChildLegacyDN("cn", ExchangeRpcClientAccess.selfRedirectLegacyDNSectionPrefix + mailboxGuid.ToString()).GetChildLegacyDN(rdnPrefix, ExchangeRpcClientAccess.selfRedirectLegacyDNServerPrefix + str));
        }
示例#2
0
 internal static LegacyDN FixFakeRedirectLegacyDNIfNeeded(LegacyDN legacyDN)
 {
     try
     {
         string   rdnPrefix;
         string   text;
         LegacyDN parentLegacyDN = legacyDN.GetParentLegacyDN(out rdnPrefix, out text);
         string   text2;
         string   text3;
         LegacyDN parentLegacyDN2 = parentLegacyDN.GetParentLegacyDN(out text2, out text3);
         if (text3 != null && text3.StartsWith(ExchangeRpcClientAccess.selfRedirectLegacyDNSectionPrefix, StringComparison.OrdinalIgnoreCase) && text != null && text.StartsWith(ExchangeRpcClientAccess.selfRedirectLegacyDNServerPrefix, StringComparison.OrdinalIgnoreCase))
         {
             return(parentLegacyDN2.GetChildLegacyDN(rdnPrefix, text.Substring(ExchangeRpcClientAccess.selfRedirectLegacyDNServerPrefix.Length)));
         }
     }
     catch (FormatException)
     {
     }
     return(legacyDN);
 }
示例#3
0
        internal static LegacyDN CreatePersonalizedServerRedirectLegacyDN(LegacyDN legacyDN, Guid mailboxGuid, string domain)
        {
            LegacyDN parentLegacyDN = legacyDN.GetParentLegacyDN();

            return(parentLegacyDN.GetChildLegacyDN("cn", ExchangeRpcClientAccess.CreatePersonalizedServer(mailboxGuid, domain)));
        }