Inheritance: System.IComparable, System.ICloneable, INotifyPropertyChanged
Beispiel #1
0
 ///<summary>
 /// Returns a value indicating whether this instance is equal to a specified object.
 ///</summary>
 ///<param name="toObject">An object to compare to this instance.</param>
 ///<returns>true if toObject is a <see cref="VJobCandidateEducationBase"/> and has the same value as this instance; otherwise, false.</returns>
 public virtual bool Equals(VJobCandidateEducationBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
		///<summary>
		/// Determines whether the specified <see cref="VJobCandidateEducationBase"/> instances are considered equal.
		///</summary>
		///<param name="Object1">The first <see cref="VJobCandidateEducationBase"/> to compare.</param>
		///<param name="Object2">The second <see cref="VJobCandidateEducationBase"/> to compare. </param>
		///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns>
		public static bool Equals(VJobCandidateEducationBase Object1, VJobCandidateEducationBase Object2)
		{
			// both are null
			if (Object1 == null && Object2 == null)
				return true;

			// one or the other is null, but not both
			if (Object1 == null ^ Object2 == null)
				return false;

			bool equal = true;
			if (Object1.JobCandidateId != Object2.JobCandidateId)
				equal = false;
			if (Object1.SafeNameEduLevel != null && Object2.SafeNameEduLevel != null )
			{
				if (Object1.SafeNameEduLevel != Object2.SafeNameEduLevel)
					equal = false;
			}
			else if (Object1.SafeNameEduLevel == null ^ Object1.SafeNameEduLevel == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduStartDate != null && Object2.SafeNameEduStartDate != null )
			{
				if (Object1.SafeNameEduStartDate != Object2.SafeNameEduStartDate)
					equal = false;
			}
			else if (Object1.SafeNameEduStartDate == null ^ Object1.SafeNameEduStartDate == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduEndDate != null && Object2.SafeNameEduEndDate != null )
			{
				if (Object1.SafeNameEduEndDate != Object2.SafeNameEduEndDate)
					equal = false;
			}
			else if (Object1.SafeNameEduEndDate == null ^ Object1.SafeNameEduEndDate == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduDegree != null && Object2.SafeNameEduDegree != null )
			{
				if (Object1.SafeNameEduDegree != Object2.SafeNameEduDegree)
					equal = false;
			}
			else if (Object1.SafeNameEduDegree == null ^ Object1.SafeNameEduDegree == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduMajor != null && Object2.SafeNameEduMajor != null )
			{
				if (Object1.SafeNameEduMajor != Object2.SafeNameEduMajor)
					equal = false;
			}
			else if (Object1.SafeNameEduMajor == null ^ Object1.SafeNameEduMajor == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduMinor != null && Object2.SafeNameEduMinor != null )
			{
				if (Object1.SafeNameEduMinor != Object2.SafeNameEduMinor)
					equal = false;
			}
			else if (Object1.SafeNameEduMinor == null ^ Object1.SafeNameEduMinor == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduGpa != null && Object2.SafeNameEduGpa != null )
			{
				if (Object1.SafeNameEduGpa != Object2.SafeNameEduGpa)
					equal = false;
			}
			else if (Object1.SafeNameEduGpa == null ^ Object1.SafeNameEduGpa == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduGpaScale != null && Object2.SafeNameEduGpaScale != null )
			{
				if (Object1.SafeNameEduGpaScale != Object2.SafeNameEduGpaScale)
					equal = false;
			}
			else if (Object1.SafeNameEduGpaScale == null ^ Object1.SafeNameEduGpaScale == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduSchool != null && Object2.SafeNameEduSchool != null )
			{
				if (Object1.SafeNameEduSchool != Object2.SafeNameEduSchool)
					equal = false;
			}
			else if (Object1.SafeNameEduSchool == null ^ Object1.SafeNameEduSchool == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduLocCountryRegion != null && Object2.SafeNameEduLocCountryRegion != null )
			{
				if (Object1.SafeNameEduLocCountryRegion != Object2.SafeNameEduLocCountryRegion)
					equal = false;
			}
			else if (Object1.SafeNameEduLocCountryRegion == null ^ Object1.SafeNameEduLocCountryRegion == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduLocState != null && Object2.SafeNameEduLocState != null )
			{
				if (Object1.SafeNameEduLocState != Object2.SafeNameEduLocState)
					equal = false;
			}
			else if (Object1.SafeNameEduLocState == null ^ Object1.SafeNameEduLocState == null )
			{
				equal = false;
			}
			if (Object1.SafeNameEduLocCity != null && Object2.SafeNameEduLocCity != null )
			{
				if (Object1.SafeNameEduLocCity != Object2.SafeNameEduLocCity)
					equal = false;
			}
			else if (Object1.SafeNameEduLocCity == null ^ Object1.SafeNameEduLocCity == null )
			{
				equal = false;
			}
			return equal;
		}
		///<summary>
		/// Returns a value indicating whether this instance is equal to a specified object.
		///</summary>
		///<param name="toObject">An object to compare to this instance.</param>
		///<returns>true if toObject is a <see cref="VJobCandidateEducationBase"/> and has the same value as this instance; otherwise, false.</returns>
		public virtual bool Equals(VJobCandidateEducationBase toObject)
		{
			if (toObject == null)
				return false;
			return Equals(this, toObject);
		}
Beispiel #4
0
        ///<summary>
        /// Determines whether the specified <see cref="VJobCandidateEducationBase"/> instances are considered equal.
        ///</summary>
        ///<param name="Object1">The first <see cref="VJobCandidateEducationBase"/> to compare.</param>
        ///<param name="Object2">The second <see cref="VJobCandidateEducationBase"/> to compare. </param>
        ///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns>
        public static bool Equals(VJobCandidateEducationBase Object1, VJobCandidateEducationBase Object2)
        {
            // both are null
            if (Object1 == null && Object2 == null)
            {
                return(true);
            }

            // one or the other is null, but not both
            if (Object1 == null ^ Object2 == null)
            {
                return(false);
            }

            bool equal = true;

            if (Object1.JobCandidateId != Object2.JobCandidateId)
            {
                equal = false;
            }
            if (Object1.SafeNameEduLevel != null && Object2.SafeNameEduLevel != null)
            {
                if (Object1.SafeNameEduLevel != Object2.SafeNameEduLevel)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduLevel == null ^ Object1.SafeNameEduLevel == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduStartDate != null && Object2.SafeNameEduStartDate != null)
            {
                if (Object1.SafeNameEduStartDate != Object2.SafeNameEduStartDate)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduStartDate == null ^ Object1.SafeNameEduStartDate == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduEndDate != null && Object2.SafeNameEduEndDate != null)
            {
                if (Object1.SafeNameEduEndDate != Object2.SafeNameEduEndDate)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduEndDate == null ^ Object1.SafeNameEduEndDate == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduDegree != null && Object2.SafeNameEduDegree != null)
            {
                if (Object1.SafeNameEduDegree != Object2.SafeNameEduDegree)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduDegree == null ^ Object1.SafeNameEduDegree == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduMajor != null && Object2.SafeNameEduMajor != null)
            {
                if (Object1.SafeNameEduMajor != Object2.SafeNameEduMajor)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduMajor == null ^ Object1.SafeNameEduMajor == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduMinor != null && Object2.SafeNameEduMinor != null)
            {
                if (Object1.SafeNameEduMinor != Object2.SafeNameEduMinor)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduMinor == null ^ Object1.SafeNameEduMinor == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduGpa != null && Object2.SafeNameEduGpa != null)
            {
                if (Object1.SafeNameEduGpa != Object2.SafeNameEduGpa)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduGpa == null ^ Object1.SafeNameEduGpa == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduGpaScale != null && Object2.SafeNameEduGpaScale != null)
            {
                if (Object1.SafeNameEduGpaScale != Object2.SafeNameEduGpaScale)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduGpaScale == null ^ Object1.SafeNameEduGpaScale == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduSchool != null && Object2.SafeNameEduSchool != null)
            {
                if (Object1.SafeNameEduSchool != Object2.SafeNameEduSchool)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduSchool == null ^ Object1.SafeNameEduSchool == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduLocCountryRegion != null && Object2.SafeNameEduLocCountryRegion != null)
            {
                if (Object1.SafeNameEduLocCountryRegion != Object2.SafeNameEduLocCountryRegion)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduLocCountryRegion == null ^ Object1.SafeNameEduLocCountryRegion == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduLocState != null && Object2.SafeNameEduLocState != null)
            {
                if (Object1.SafeNameEduLocState != Object2.SafeNameEduLocState)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduLocState == null ^ Object1.SafeNameEduLocState == null)
            {
                equal = false;
            }
            if (Object1.SafeNameEduLocCity != null && Object2.SafeNameEduLocCity != null)
            {
                if (Object1.SafeNameEduLocCity != Object2.SafeNameEduLocCity)
                {
                    equal = false;
                }
            }
            else if (Object1.SafeNameEduLocCity == null ^ Object1.SafeNameEduLocCity == null)
            {
                equal = false;
            }
            return(equal);
        }