/// <summary>
 ///     Sets the user lockout end date
 /// </summary>
 /// <param name="manager"></param>
 /// <param name="userId"></param>
 /// <param name="lockoutEnd"></param>
 /// <returns></returns>
 public static IdentityResult SetLockoutEndDate <TUser, TKey>(this UserManager <TUser, TKey> manager, TKey userId,
                                                              DateTimeOffset lockoutEnd)
     where TKey : IEquatable <TKey>
     where TUser : class, IUser <TKey>
 {
     if (manager == null)
     {
         throw new ArgumentNullException("manager");
     }
     return(AsyncHelper.RunSync(() => manager.SetLockoutEndDateAsync(userId, lockoutEnd)));
 }