protected LdapEntryBase(LdapAttributeSet attributeSet) { ObjectClass = attributeSet.GetAttribute("objectClass")?.StringValueArray; if (attributeSet.ContainsKey("distinguishedName")) { Dn = attributeSet.GetAttribute("distinguishedName")?.StringValue; } else if (attributeSet.ContainsKey("dn")) { Dn = attributeSet.GetAttribute("dn")?.StringValue; } else { throw new DistinguishedNameNotInAttributeSetException(); } }
public LdapUser(LdapAttributeSet attributeSet) : base(attributeSet) { Cn = attributeSet.GetAttribute("cn")?.StringValue; if (attributeSet.ContainsKey("mail")) { Mail = attributeSet.GetAttribute("mail")?.StringValue; } }