User.cs
Description du code
User.cs est un fichier du projet BiblioBrol.Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.
Projet BiblioBrol :
Gestion de media en CSharp.
Pour plus d'infos, vous pouvez consulter la brève analyse.
Code source ou contenu du fichier
Code c# (User.cs) (173 lignes)
using System; using System.Collections.Generic; using System.Text; using be.gaudry.bibliobrol.model.identity; namespace be.gaudry.bibliobrol.model { [Serializable] public class User : Actor { #region declarations and constructors private IdentityComplement identityComplement; private Address address; private List<Phone> phones; private List<String> mailAddresses; public User():base() { } public User(int id, String lastName): base(id, lastName) { } #endregion #region identityComplement properties public string FirstName2 { get { return identityComplement.FirstName2; } set { identityComplement.FirstName2 = value; } } public string FirstName3 { get { return identityComplement.FirstName3; } set { identityComplement.FirstName3 = value; } } public string BirthPlace { get { return identityComplement.BirthPlace; } set { identityComplement.BirthPlace = value; } } public string Nationality { get { return identityComplement.Nationality; } set { identityComplement.Nationality = value; } } public string NationalNumber { get { return identityComplement.NationalNumber; } set { identityComplement.NationalNumber = value; } } #endregion #region address properties /* public string Street { get { return address.Street; } set { address.Street = value; } } public string HouseNumber { get { return address.HouseNumber; } set { address.HouseNumber = value; } } public string BoxNumber { get { return address.BoxNumber; } set { address.BoxNumber = value; } } public string ZipCode { get { return address.ZipCode; } set { address.ZipCode = value; } } public string Municipality { get { return address.Municipality; } set { address.Municipality = value; } } public string Country { get { return address.Country; } set { address.Country = value; } }*/ public Address Address { get { return address; } set { address = value; } } #endregion; #region properties public List<Phone> Phones { get { return this.phones; } set { this.phones = value; } } public List<String> MailAddresses { get { return this.mailAddresses; } set { this.mailAddresses = value; } } #endregion #region public methods /// <summary> /// Add a phone into the phones list /// </summary> /// <param name="phone">(Phone) phone to add</param> public void addPhone(Phone phone) { this.phones.Add(phone); } /// <summary> /// Remove a phone from the phones list /// </summary> /// <param name="phone">(Phone) phone to remove</param> /// <returns>false if phone can't be removed (if not exists in the list or if an error occurs)</returns> public bool removePhone(Phone phone) { return phones.Remove(phone); } public void addMailAddress(String mail) { this.mailAddresses.Add(mail); } public bool removeMailAddress(String mail) { return mailAddresses.Remove(mail); } public void setIdentityComplement(IdentityComplement value) { this.identityComplement = value; } public IdentityComplement getIdentityComplement() { return this.identityComplement; } #endregion #region overrided methods public override bool Equals(object o) { return false; User u = (User)o; if (!address.Equals(u.address)) return false; if (!this.getIdentity().Equals(u.getIdentity())) return false; //if (!identityComplement.Equals(u.identityComplement)) // return false; return true; } public override int GetHashCode() { return (address.ToString() + this.getIdentity().ToString()).GetHashCode(); } #endregion } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1731729194 16/11/2024 04:53:14 |
| _ | identity | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | eid | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | LightObjects | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | comparators | 0 octets | 1541007174 31/10/2018 18:32:54 |
| _ | aws | 0 octets | 1541007173 31/10/2018 18:32:53 |
| _ | enums | 0 octets | 1541007175 31/10/2018 18:32:55 |
| _ | dao | 0 octets | 1541007174 31/10/2018 18:32:54 |
Utilisation de l'explorateur de code
- Navigation :
- Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
- Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
- La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
- Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
- Affichage :
- Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
- Actions :
- Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-model//User.cs.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.