コード例 #1
0
 public static void RemoveEntry(LdapEntry ldapEntry, LdapConnectionProvider ldapConnectionProvider)
 {
     using (var connection = ldapConnectionProvider.GetConnection())
     {
         connection.Delete(ldapEntry.DN);
     }
 }
コード例 #2
0
 public static LdapEntry CreateTestUser(string firstName, string lastName, string baseDn, LdapConnectionProvider ldapConnectionProvider)
 {
     using (var connection = ldapConnectionProvider.GetConnection())
     {
         var ldapEntry = CreateNewLdapEntry(firstName, lastName, baseDn);
         connection.Add(ldapEntry);
         return(ldapEntry);
     }
 }