/// For now, we define the ProfilPict as a string which is "PhotoParDefaut"
/// when the value is null.
/// </summary>
publicstringProfilPict
{
get=>picture;
set=>picture=value;
}
/// <summary>
/// Property to get Name of users and a setter
/// </summary>
/// <exception cref="ArgumentNullException" >Setter have Exception which is trigger when Name is null</exception>
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Name is null</exception>
publicstringName
{
get{returnname;}
privateset
privateset
{
if(string.IsNullOrWhiteSpace(value))
if(string.IsNullOrWhiteSpace(value))
{
thrownewArgumentNullException("Il y a une erreur de Nom d'utilisateur!");
thrownewArgumentException("Impossible d'avoir un champ Nom vide!");
}
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>
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Surname is null</exception>
publicstringSurname
{
get{returnsurname;}
@ -61,15 +56,16 @@ namespace MCTGLib
{
if(string.IsNullOrWhiteSpace(value))
{
thrownewArgumentNullException("Il y a une erreur de Prénom d'utilisateur.");
thrownewArgumentException("Impossible d'avoir un champ Prénom vide!");
}
surname=value;
}
}
/// <summary>
/// Property to get mail of users and a setter
/// </summary>
/// <exception cref="ArgumentNullException" >User's mail will serve to log the user. So there's no setter, just an init. User will enter one time his email at his
/// <exception cref="ArgumentException" >User's mail will serve to log the user. So there's no setter, just an init. User will enter one time his email at his
/// account creation.</exception>
publicstringMail
{
@ -78,14 +74,46 @@ namespace MCTGLib
{
if(string.IsNullOrWhiteSpace(value))
{
thrownewArgumentNullException("Il y a une erreur de Mail d'utilisateur.");
thrownewArgumentException("Impossible d'avoir un champ Email vide!");
}
mail=value;
}
}
/// <summary>
/// For now, we define the ProfilPict as a string which is "PhotoParDefaut"
/// when the value is null.
/// </summary>
publicstringProfilPict
{
get=>picture;
set=>picture=value;
}
privateList<Priority>priorities;
///<summary>
///Password property
/// </summary>
publicstringPassword
{
get=>password;
privateset
{
stringmodelPassword=@"[a-z]*[A-Z]+$";
if(!string.IsNullOrWhiteSpace(value))
{
thrownewArgumentException("Le mot de passe ne doit pas etre vide ");
}
// if (Regex.IsMatch(value, modelPassword, RegexOptions. )
}
}
/// <summary>
/// This is the list of priorities specific tu the user. This list is initiate