/// <summary> Build the attribuite list from an LdapEntry.
///
/// </summary>
/// <param name="entry">The LdapEntry associated with this add request.
/// </param>
private static RfcAttributeList makeRfcAttrList(LdapEntry entry)
{
// convert Java-API LdapEntry to RFC2251 AttributeList
LdapAttributeSet attrSet = entry.getAttributeSet();
RfcAttributeList attrList = new RfcAttributeList(attrSet.Count);
IEnumerator itr = attrSet.GetEnumerator();
while (itr.MoveNext())
{
LdapAttribute attr = (LdapAttribute)itr.Current;
Asn1SetOf vals = new Asn1SetOf(attr.size());
IEnumerator attrEnum = attr.ByteValues;
while (attrEnum.MoveNext())
{
vals.add(new RfcAttributeValue((sbyte[])attrEnum.Current));
}
attrList.add(new RfcAttributeTypeAndValues(new RfcAttributeDescription(attr.Name), vals));
}
return(attrList);
}