Esempio n. 1
0
        public bool Equals(PollResult input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     AnswerText == input.AnswerText ||
                     (AnswerText != null && AnswerText.Equals(input.AnswerText))
                     ) &&
                 (
                     AnswerSlot == input.AnswerSlot ||
                     (AnswerSlot.Equals(input.AnswerSlot))
                 ) &&
                 (
                     LastVoteDate == input.LastVoteDate ||
                     (LastVoteDate != null && LastVoteDate.Equals(input.LastVoteDate))
                 ) &&
                 (
                     Votes == input.Votes ||
                     (Votes.Equals(input.Votes))
                 ) &&
                 (
                     RequestingUserVoted == input.RequestingUserVoted ||
                     (RequestingUserVoted != null && RequestingUserVoted.Equals(input.RequestingUserVoted))
                 ));
        }
Esempio n. 2
0
 public override bool Equals(Object obj)
 {
     if (obj is Problem ob)
     {
         return(Id.Equals(ob.Id) && CategoryId.Equals(ob.CategoryId) && ThemeId.Equals(ob.ThemeId) && Adress.Equals(ob.Adress) &&
                SourceId.Equals(ob.SourceId) && CreateDate.Equals(ob.CreateDate) && AnswerDate.Equals(ob.AnswerDate) &&
                ProblemText.Equals(ob.ProblemText) && ProblemPhotos.Equals(ob.ProblemPhotos) && AnswerText.Equals(ob.AnswerText) &&
                AnswerPhotos.Equals(ob.AnswerPhotos) && StatusId.Equals(ob.StatusId) && DistrictId.Equals(ob.DistrictId) && ChildID.Equals(ob.ChildID) &&
                ParentID.Equals(ob.ParentID) && IspolnitelName.Equals(ob.IspolnitelName) && IspolnitelId.Equals(ob.IspolnitelId));
     }
     return(false);
 }