|
|
|
@ -33,18 +33,17 @@ namespace MCTGLib
|
|
|
|
|
get => picture;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
picture = value;
|
|
|
|
|
if (picture == null)
|
|
|
|
|
if (string.IsNullOrWhiteSpace(value))
|
|
|
|
|
{
|
|
|
|
|
picture = "PhotoParDefaut";
|
|
|
|
|
throw new ArgumentNullException("Erreur pour la photo d'utilisateur!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Property to get Name of users, without setter because we don't want users
|
|
|
|
|
/// to change their Name.
|
|
|
|
|
/// Property to get Name of users and a setter
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <exception cref="ArgumentNullException" >Setter have Exception which is trigger when Name is null</exception>
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return name; }
|
|
|
|
@ -52,15 +51,26 @@ namespace MCTGLib
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(value))
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentNullException();
|
|
|
|
|
throw new ArgumentNullException("Il y a une erreur de Nom d'utilisateur!");
|
|
|
|
|
}
|
|
|
|
|
name = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Property to get Surname of users and a setter
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <exception cref="ArgumentNullException" >Setter have Exception which is trigger when Surname is null</exception>
|
|
|
|
|
public string Surname
|
|
|
|
|
{
|
|
|
|
|
get { return surname; }
|
|
|
|
|
private set { surname = value; }
|
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(value))
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentNullException("Il y a une erreur de Prénom d'utilisateur");
|
|
|
|
|
}
|
|
|
|
|
surname = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public string Mail
|
|
|
|
|
{
|
|
|
|
|