Пример #1
0
        // entry may be null, needs to be get fresh in that case
        internal ConnectorAttribute GetConnectorAttributeFromADEntry(ObjectClass oclass,
            String attributeName, DS.SearchResult searchResult, DirectoryEntry entry)
        {
            Boolean ourEntry = false;
            // Boolean translated = false;
            if (searchResult == null)
            {
                throw new ConnectorException(_configuration.ConnectorMessages.Format(
                    "ex_AttributeNull",
                    "Could not add connector attribute to <null> search result"));
            }

            if (entry == null)
            {
                ourEntry = true;
                entry = searchResult.GetDirectoryEntry();
            }
            try
            {
                return _customHandlers.GetCaFromDe(oclass,
                    attributeName, searchResult, entry);
            }
            finally
            {
                if (ourEntry && entry != null)
                {
                    entry.Dispose();
                }
            }
        }
        internal ConnectorAttribute GetConnectorAttributeFromADEntry(ObjectClass oclass,
            String attributeName, DS.SearchResult searchResult)
        {
            // Boolean translated = false;
            if (searchResult == null)
            {
                throw new ConnectorException(_configuration.ConnectorMessages.Format(
                    "ex_AttributeNull",
                    "Could not add connector attribute to <null> search result"));
            }

            return _customHandlers.GetCaFromDe(oclass,
                attributeName, searchResult);
        }