// Token: 0x060009FE RID: 2558 RVA: 0x000217C8 File Offset: 0x0001F9C8 internal override IEnumerable <T> GetObjectsInOrganization <T>(string identityString, ADObjectId rootId, IDirectorySession session, OptionalIdentityData optionalData) { string[] commonNames = AddressListIdParameter.GetCommonNames(identityString); if (commonNames.Length == 1) { ADObjectId rootContainerId = GlobalAddressListIdParameter.GetRootContainerId((IConfigurationSession)session); ADObjectId childId = rootContainerId.GetChildId(commonNames[0]); EnumerableWrapper <T> wrapper = EnumerableWrapper <T> .GetWrapper(base.GetADObjectIdObjects <T>(childId, rootId, session, optionalData), this.GetEnumerableFilter <T>()); if (wrapper.HasElements()) { return(wrapper); } } return(base.GetObjectsInOrganization <T>(identityString, rootId, session, optionalData)); }
internal override IEnumerable <T> GetObjectsInOrganization <T>(string identityString, ADObjectId rootId, IDirectorySession session, OptionalIdentityData optionalData) { IConfigurationSession scSession = session as IConfigurationSession; string[] commonNames = AddressListIdParameter.GetCommonNames(identityString); ADObjectId identity = this.ResolveAddressListId(AddressListIdParameter.GetRootContainerId(scSession), commonNames); EnumerableWrapper <T> wrapper = EnumerableWrapper <T> .GetWrapper(base.GetADObjectIdObjects <T>(identity, rootId, session, optionalData)); if (wrapper.HasElements()) { return(wrapper); } wrapper = EnumerableWrapper <T> .GetWrapper(base.GetObjectsInOrganization <T>(identityString, rootId, session, optionalData)); if (wrapper.HasElements() || commonNames.Length == 1 || !identityString.Contains("*")) { return(wrapper); } Queue <ADObjectId> queue = new Queue <ADObjectId>(); queue.Enqueue(rootId ?? AddressListIdParameter.GetRootContainerId(scSession)); for (int i = 0; i < commonNames.Length - 1; i++) { Queue <ADObjectId> queue2 = new Queue <ADObjectId>(); string name = commonNames[i]; foreach (ADObjectId rootId2 in queue) { QueryFilter filter = base.CreateWildcardOrEqualFilter(ADObjectSchema.Name, name); IEnumerable <T> enumerable = this.PerformSearch <T>(filter, rootId2, session, false); foreach (T t in enumerable) { queue2.Enqueue((ADObjectId)t.Identity); } } queue = queue2; } string name2 = commonNames[commonNames.Length - 1]; List <IEnumerable <T> > list = new List <IEnumerable <T> >(); foreach (ADObjectId rootId3 in queue) { QueryFilter filter2 = base.CreateWildcardOrEqualFilter(ADObjectSchema.Name, name2); IEnumerable <T> item = base.PerformPrimarySearch <T>(filter2, rootId3, session, false, optionalData); list.Add(item); } return(EnumerableWrapper <T> .GetWrapper(list)); }
internal override IEnumerable <T> GetObjects <T>(ADObjectId rootId, IDirectorySession session, IDirectorySession subTreeSession, OptionalIdentityData optionalData, out LocalizedString?notFoundReason) { if (typeof(T) != typeof(AddressBookBase)) { throw new ArgumentException(Strings.ErrorInvalidType(typeof(T).Name), "type"); } if (session == null) { throw new ArgumentNullException("session"); } IConfigurationSession scSession = session as IConfigurationSession; if ("\\" == base.RawIdentity) { notFoundReason = null; ADObjectId rootContainerId = AddressListIdParameter.GetRootContainerId(scSession); return(EnumerableWrapper <T> .GetWrapper(base.GetADObjectIdObjects <T>(rootContainerId, rootId, subTreeSession, optionalData), this.GetEnumerableFilter <T>())); } return(base.GetObjects <T>(rootId, session, subTreeSession, optionalData, out notFoundReason)); }
// Token: 0x06000834 RID: 2100 RVA: 0x0001DE37 File Offset: 0x0001C037 protected AddressBookBaseIdParameter(string identity) { this.rawIdentity = identity; this.addressListIdParameter = AddressListIdParameter.Parse(identity); this.globalAddressListIdParameter = GlobalAddressListIdParameter.Parse(identity); }
internal static ADObjectId GetRootContainerId(IConfigurationSession scSession) { return(AddressListIdParameter.GetRootContainerId(scSession, null)); }