public AddRequest (string distinguishedName, string objectClass) { DistinguishedName = distinguishedName; Attributes = new DirectoryAttributeCollection (new DirectoryAttribute [0]); throw new NotImplementedException (); }
public AddRequest(string distinguishedName, string objectClass) { DistinguishedName = distinguishedName; Attributes = new DirectoryAttributeCollection(new DirectoryAttribute [0]); throw new NotImplementedException(); }
public void AddRange(DirectoryAttributeCollection attributeCollection) { if (attributeCollection == null) { throw new ArgumentNullException("attributeCollection"); } int count = attributeCollection.Count; for (int i = 0; i < count; i++) { this.Add(attributeCollection[i]); } }
public void AddRange(DirectoryAttributeCollection attributeCollection) { if (attributeCollection == null) { throw new ArgumentNullException("attributeCollection"); } int currentCount = attributeCollection.Count; for (int i = 0; i < currentCount; i = ((i) + (1))) { this.Add(attributeCollection[i]); } }
public void AddRange(DirectoryAttributeCollection attributeCollection) { if (attributeCollection != null) { int count = attributeCollection.Count; for (int i = 0; i < count; i++) { this.Add(attributeCollection[i]); } return; } else { throw new ArgumentNullException("attributeCollection"); } }
public string createUserLdap(User user) { ldapId = new LdapDirectoryIdentifier(HOST, PORT); network = new NetworkCredential(ADMIN, ADMIN_PASS); using (LdapConnection connection = new LdapConnection(ldapId, network, AuthType.Basic)) { try { string[] objectClass = new string[] { "top", "inetOrgPerson", "organizationalPerson", "person" }; connection.SessionOptions.SecureSocketLayer = false; connection.SessionOptions.ProtocolVersion = 3; String dn = DN_CREATE.Replace("{0}", user.email); DirectoryAttributeCollection collection = new DirectoryAttributeCollection() { new DirectoryAttribute("objectclass", objectClass), new DirectoryAttribute("uid",user.email), new DirectoryAttribute("sn", user.lastName), new DirectoryAttribute("cn", user.userName), new DirectoryAttribute("employeeNumber", user.userId), new DirectoryAttribute("departmentNumber", user.userGroup), new DirectoryAttribute("userPassword", user.password) }; AddRequest addMe = new AddRequest(dn, "inetOrgPerson"); addMe.Attributes.AddRange(collection); connection.Bind(); connection.SendRequest(addMe); return "OK"; } catch (LdapException ex) { throw new BusinessException("Ldap error: " + ex.Message); } catch (Exception e) { throw new PlatformException("Ldap error: " + e.Message); } } }
public void AddRange(DirectoryAttributeCollection attributeCollection) { list.Add(attributeCollection.list); }
public void AddRange (DirectoryAttributeCollection attributeCollection) { list.Add (attributeCollection.list); }
public AddRequest (string distinguishedName, params DirectoryAttribute [] attributes) { DistinguishedName = distinguishedName; Attributes = new DirectoryAttributeCollection (attributes); }
public AddRequest() { this.attributeList = new DirectoryAttributeCollection(); }
public AddRequest(string distinguishedName, params DirectoryAttribute [] attributes) { DistinguishedName = distinguishedName; Attributes = new DirectoryAttributeCollection(attributes); }
// // Public // public AddRequest() { _attributeList = new DirectoryAttributeCollection(); }