Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
 public LdapUser(LdapAttributeSet attributeSet)
     : base(attributeSet)
 {
     Cn = attributeSet.GetAttribute("cn")?.StringValue;
     if (attributeSet.ContainsKey("mail"))
     {
         Mail = attributeSet.GetAttribute("mail")?.StringValue;
     }
 }