aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/User/IUserDeleteService.cs
blob: ce9448ac542cb3410c1226e236c5d0d1ee2e22a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using System.Threading.Tasks;

namespace Timeline.Services.User
{
    public interface IUserDeleteService
    {
        /// <summary>
        /// Delete a user of given username.
        /// </summary>
        /// <param name="username">Username of the user to delete. Can't be null.</param>
        /// <returns>True if user is deleted, false if user not exist.</returns>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="username"/> is null.</exception>
        /// <exception cref="ArgumentException">Thrown when <paramref name="username"/> is of bad format.</exception>
        /// <exception cref="InvalidOperationOnRootUserException">Thrown when deleting root user.</exception>
        Task<bool> DeleteUser(string username);
    }
}