internal static IADOPathNode BuildSearchFilter(IADOPathNode filter, MappingTable <AttributeConverterEntry> attrMapBaseObj, MappingTable <AttributeConverterEntry> attrMapChildObj, CmdletSessionInfo sessionInfo) { BinaryADOPathNode binaryADOPathNode = filter as BinaryADOPathNode; if (binaryADOPathNode == null) { return(null); } else { string ldapFilterString = binaryADOPathNode.LeftNode.GetLdapFilterString(); AttributeConverterEntry attributeConverterEntry = null; if (!attrMapBaseObj.TryGetValue(ldapFilterString, out attributeConverterEntry)) { if (!attrMapChildObj.TryGetValue(ldapFilterString, out attributeConverterEntry)) { string[] strArrays = new string[1]; strArrays[0] = ldapFilterString; return(SearchConverters.ToSearchObjectClientSideFilter(ldapFilterString, strArrays, filter, sessionInfo)); } else { return(attributeConverterEntry.InvokeToSearcherConverter(filter, sessionInfo)); } } else { return(attributeConverterEntry.InvokeToSearcherConverter(filter, sessionInfo)); } } }
internal virtual IADOPathNode BuildSearchFilter(IADOPathNode filter) { if (this.CmdletSessionInfo != null) { MappingTable <AttributeConverterEntry> item = ADFactoryBase <T> .AttributeTable[this.ConnectedStore]; BinaryADOPathNode binaryADOPathNode = filter as BinaryADOPathNode; if (binaryADOPathNode == null) { return(null); } else { string ldapFilterString = binaryADOPathNode.LeftNode.GetLdapFilterString(); AttributeConverterEntry attributeConverterEntry = null; if (!item.TryGetValue(ldapFilterString, out attributeConverterEntry)) { string[] strArrays = new string[1]; strArrays[0] = ldapFilterString; return(SearchConverters.ToSearchUsingSchemaInfo(ldapFilterString, strArrays, filter, this.CmdletSessionInfo)); } else { return(attributeConverterEntry.InvokeToSearcherConverter(filter, this.CmdletSessionInfo)); } } } else { throw new ArgumentNullException(StringResources.SessionRequired); } }