view Agendas/trunk/src/Agendas.Domain/Cuenta.cs @ 288:a6037c6c88d8

Se soluciona bug #198 Bug: Summary incorrecto en Google Calendar. Se parametriza la hora en el mensaje.
author user@MECHUQUE
date Mon, 30 Jan 2012 01:52:47 -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();
			}
		}
	}
}