Novell.Directory.Ldap.LdapEntry.getAttribute C# (CSharp) Method

getAttribute() public method

Returns the attributes matching the specified attrName.
public getAttribute ( System attrName ) : LdapAttribute
attrName System The name of the attribute or attributes to return. /// ///
return LdapAttribute
        public virtual LdapAttribute getAttribute(System.String attrName)
        {
            return attrs.getAttribute(attrName);
        }

Usage Example

示例#1
0
        public static string[] CheckRequiredAttributes(Connection conn, LdapEntry entry)
        {
            List<string> missingAttributes = new List<string> ();

            LdapAttribute objAttr = entry.getAttribute ("objectClass");
            if (objAttr == null)
                return null;

            foreach (string o in objAttr.StringValueArray) {
                if (o.Equals ("top"))
                    continue;

                string[] reqs = conn.Data.GetRequiredAttrs (o);
                if (reqs == null)
                    continue;

                foreach (string r in reqs) {
                    if (r.Equals ("cn"))
                        continue;

                    if (IsAttributeEmpty (entry.getAttribute (r))) {
                        missingAttributes.Add (r);
                        continue;
                    }
                }
            }

            return missingAttributes.ToArray();
        }
All Usage Examples Of Novell.Directory.Ldap.LdapEntry::getAttribute