Esempio n. 1
0
        static internal bool ArePrincipalsInSameForest(Principal p1, Principal p2)
        {
            string p1DnsForestName = ((ADStoreCtx)p1.GetStoreCtxToUse()).DnsForestName;
            string p2DnsForestName = ((ADStoreCtx)p2.GetStoreCtxToUse()).DnsForestName;

            return(String.Equals(p1DnsForestName, p2DnsForestName, StringComparison.OrdinalIgnoreCase));
        }
Esempio n. 2
0
        internal static bool ArePrincipalsInSameForest(Principal p1, Principal p2)
        {
            string dnsForestName = ((ADStoreCtx)p1.GetStoreCtxToUse()).DnsForestName;
            string str           = ((ADStoreCtx)p2.GetStoreCtxToUse()).DnsForestName;

            return(string.Compare(dnsForestName, str, StringComparison.OrdinalIgnoreCase) == 0);
        }