private Dictionary<string, List<string>> CollectData (LdapEntry baseEntry) { var dict = new Dictionary<string, List<string>> { { ATTRIBUTETYPES, new List<string> () }, { OBJECTCLASSES, new List<string> () }, { DITCONTENTRULES, new List<string> () } }; foreach (var entry in dict) { //get attributes and values for each entry LdapValue[] val = baseEntry.getAttributeValues (entry.Key).ToArray ();// .GetAttributeValues(entry.Key); var list = entry.Value; int count = val.Count (); for (int i = 0; i < count; ++i) list.Add (val [i].StringValue); } return dict; }
public string GetDN (LdapEntry entry) { try { return entry.getDN (); } catch (Exception e) { throw e; } }