コード例 #1
0
 /// <summary>
 /// Returns an LdapFilter for Users that were created before the specified date.
 /// </summary>
 /// <param name="firstDate">The first date of the range.</param>
 /// <param name="secondDate">The second date of the range.</param>
 /// <returns>LdapFilter for the Users.</returns>
 public static LdapFilter UsersCreatedBetweenDates(DateTime firstDate, DateTime secondDate) =>
 Users.And(
     LdapFilter.And(
         new LdapFilter("whenCreated", ">=", AdDateTime.ToLdapDateTime(firstDate)),
         new LdapFilter("whenCreated", "<=", AdDateTime.ToLdapDateTime(secondDate))),
     true);
コード例 #2
0
 /// <summary>
 /// Returns an LdapFilter for Users that were created before the specified date.
 /// </summary>
 /// <param name="theDate">The date that will be converted to an Ldap format.</param>
 /// <returns>LdapFilter for the Users.</returns>
 public static LdapFilter UsersCreatedBeforeDate(DateTime theDate) =>
 Users.And(
     new LdapFilter("whenCreated", "<=", AdDateTime.ToLdapDateTime(theDate)), true);