Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/Cuenta.cs @ 237:51faeabfb9d9
Todos los tests en verde quitando al ponente principal
author | nelopauselli |
---|---|
date | Tue, 04 Oct 2011 21:30:55 -0300 |
parents | 7a2eeb9e9bf9 |
children |
line wrap: on
line source
namespace AltNetHispano.Agendas.Domain { public class Cuenta : Identificable { public virtual Persona Persona { get; set; } public virtual string LogonName { get; set; } public virtual IdentityProviderEnum IdentityProvider { get; set; } protected Cuenta() { } public Cuenta(IdentityProviderEnum identityProvider, string logonName) { LogonName = logonName; IdentityProvider = identityProvider; } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != typeof (Cuenta)) return false; return Equals((Cuenta) obj); } public virtual bool Equals(Cuenta other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.LogonName, LogonName) && Equals(other.IdentityProvider, IdentityProvider); } public override int GetHashCode() { unchecked { return ((LogonName != null ? LogonName.GetHashCode() : 0)*397) ^ IdentityProvider.GetHashCode(); } } } }