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