Castle.ActiveRecord.Tests.Model.CompositeModel.AgentKey.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
		public override bool Equals(object obj)
		{
			if (null == obj)
			{
				return false;
			}
			if (ReferenceEquals(this, obj))
			{
				return true;
			}
			if (!(obj is AgentKey))
			{
				return false;
			}
			AgentKey rhs = (AgentKey) obj;
			return (this.orgId == rhs.orgId || (this.orgId != null && this.orgId.Equals(rhs.orgId))) &&
				(this.name == rhs.name || (this.name != null && this.name.Equals(rhs.name)));
		}