public static DirectoryEntryTypeCollection FromDirectoryEntry(DirectoryEntry entry) { List <DirectoryEntryType> types = new List <DirectoryEntryType>(); foreach (string className in DirectoryUtils.GetPropertyValueAsStringArray(entry, "objectClass")) { DirectoryEntryType type = DirectoryEntryType.FromClassName(className); if (type != null) { types.Add(type); } } return(new DirectoryEntryTypeCollection(types)); }
protected override object OnGetValue() { return(DirectoryUtils.GetPropertyValueAsStringArray(Entry, AttributeName)); }