view Agendas/trunk/src/Agendas.Domain/Cuenta.cs @ 219:b9850b647a4e

Agregando alta de ponente durante la carga del evento
author nelopauselli
date Thu, 08 Sep 2011 11:22:10 -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();
			}
		}
	}
}