Exemplo n.º 1
0
        // Token: 0x06000DCE RID: 3534 RVA: 0x00029590 File Offset: 0x00027790
        private IEnumerable <T> TryGetObjectsFromDC <T>(ADObjectId rootId, IDirectorySession subTreeSession, OptionalIdentityData optionalData) where T : IConfigurable, new()
        {
            if (rootId != null || this.HasEmptyGuid || Datacenter.GetExchangeSku() != Datacenter.ExchangeSku.Enterprise)
            {
                return(EnumerableWrapper <T> .Empty);
            }
            rootId = subTreeSession.GetRootDomainNamingContext();
            if (rootId != null && optionalData != null && optionalData.RootOrgDomainContainerId != null)
            {
                optionalData.RootOrgDomainContainerId = null;
            }
            bool            useGlobalCatalog = subTreeSession.UseGlobalCatalog;
            IEnumerable <T> exactMatchObjects;

            try
            {
                subTreeSession.UseGlobalCatalog = false;
                exactMatchObjects = base.GetExactMatchObjects <T>(rootId, subTreeSession, optionalData);
            }
            finally
            {
                subTreeSession.UseGlobalCatalog = useGlobalCatalog;
            }
            return(exactMatchObjects);
        }