jellyfin/MediaBrowser.Controller/Persistence/IUserRepository.cs

42 lines
1.3 KiB
C#
Raw Normal View History

2013-02-20 18:33:05 -07:00
using MediaBrowser.Controller.Entities;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence
{
/// <summary>
/// Provides an interface to implement a User repository
/// </summary>
public interface IUserRepository : IRepository
{
2013-06-20 09:44:24 -07:00
/// <summary>
/// Opens the connection to the repository
/// </summary>
/// <returns>Task.</returns>
2013-09-26 14:20:26 -07:00
Task Initialize();
2013-06-20 09:44:24 -07:00
2013-02-20 18:33:05 -07:00
/// <summary>
/// Deletes the user.
/// </summary>
/// <param name="user">The user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task DeleteUser(User user, CancellationToken cancellationToken);
/// <summary>
/// Saves the user.
/// </summary>
/// <param name="user">The user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task SaveUser(User user, CancellationToken cancellationToken);
/// <summary>
/// Retrieves all users.
/// </summary>
/// <returns>IEnumerable{User}.</returns>
IEnumerable<User> RetrieveAllUsers();
}
}