Esempio n. 1
0
        /// <summary>
        /// Makes a clone (deep copy) of this object
        /// </summary>
        /// <returns>TravelImageRating Object</returns>
        public TravelImageRating Clone()
        {
            TravelImageRating rating = new TravelImageRating();

            rating.Id         = Id;
            rating.Rating     = Rating;
            rating.ReviewDate = ReviewDate;
            rating.Comment    = Comment;
            rating.UserName   = UserName;

            if (_image != null)
            {
                rating._image = _image.Clone();
            }

            rating.IsNew      = IsNew;
            rating.IsModified = IsModified;
            return(rating);
        }
Esempio n. 2
0
        /// <summary>
        /// Checks to see if an this object is equal to this object
        /// </summary>
        /// <param name="obj">a obj</param>
        /// <returns>true/false value</returns>
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            TravelImageRating rating = (TravelImageRating)obj;

            if (this.Id != rating.Id)
            {
                return(false);
            }
            return(true);
        }