Exemple #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="EvlVLearningRecordCsvBase"/> and has the same value as this instance; otherwise, false.</returns>
 public virtual bool Equals(EvlVLearningRecordCsvBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
Exemple #2
0
        ///<summary>
        /// Determines whether the specified <see cref="EvlVLearningRecordCsvBase"/> instances are considered equal.
        ///</summary>
        ///<param name="Object1">The first <see cref="EvlVLearningRecordCsvBase"/> to compare.</param>
        ///<param name="Object2">The second <see cref="EvlVLearningRecordCsvBase"/> 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(EvlVLearningRecordCsvBase Object1, EvlVLearningRecordCsvBase 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.CourseName != null && Object2.CourseName != null)
            {
                if (Object1.CourseName != Object2.CourseName)
                {
                    equal = false;
                }
            }
            else if (Object1.CourseName == null ^ Object1.CourseName == null)
            {
                equal = false;
            }
            if (Object1.Description != null && Object2.Description != null)
            {
                if (Object1.Description != Object2.Description)
                {
                    equal = false;
                }
            }
            else if (Object1.Description == null ^ Object1.Description == null)
            {
                equal = false;
            }
            if (Object1.Sso != null && Object2.Sso != null)
            {
                if (Object1.Sso != Object2.Sso)
                {
                    equal = false;
                }
            }
            else if (Object1.Sso == null ^ Object1.Sso == null)
            {
                equal = false;
            }
            if (Object1.UserName != null && Object2.UserName != null)
            {
                if (Object1.UserName != Object2.UserName)
                {
                    equal = false;
                }
            }
            else if (Object1.UserName == null ^ Object1.UserName == null)
            {
                equal = false;
            }
            if (Object1.CompletedDate != null && Object2.CompletedDate != null)
            {
                if (Object1.CompletedDate != Object2.CompletedDate)
                {
                    equal = false;
                }
            }
            else if (Object1.CompletedDate == null ^ Object1.CompletedDate == null)
            {
                equal = false;
            }
            if (Object1.Status != null && Object2.Status != null)
            {
                if (Object1.Status != Object2.Status)
                {
                    equal = false;
                }
            }
            else if (Object1.Status == null ^ Object1.Status == null)
            {
                equal = false;
            }
            if (Object1.Courseid != null && Object2.Courseid != null)
            {
                if (Object1.Courseid != Object2.Courseid)
                {
                    equal = false;
                }
            }
            else if (Object1.Courseid == null ^ Object1.Courseid == null)
            {
                equal = false;
            }
            if (Object1.Id != Object2.Id)
            {
                equal = false;
            }
            if (Object1.CreatedDate != null && Object2.CreatedDate != null)
            {
                if (Object1.CreatedDate != Object2.CreatedDate)
                {
                    equal = false;
                }
            }
            else if (Object1.CreatedDate == null ^ Object1.CreatedDate == null)
            {
                equal = false;
            }
            return(equal);
        }