Exemplo n.º 1
0
        public bool Equals(CharacterDto other)
        {
            if (other == null)
            {
                return(false);
            }

            ////Note that SequenceEqual will return false if the items are the same but in different orders.
            return(Id == other.Id &&
                   string.Equals(Name, other.Name) &&
                   string.Equals(Culture, other.Culture) &&
                   Titles.SequenceEqual(other.Titles) &&
                   OtherTitles.SequenceEqual(other.OtherTitles) &&
                   Aliases.SequenceEqual(other.Aliases) &&
                   string.Equals(Born, other.Born) &&
                   string.Equals(Died, other.Died) &&
                   Father == other.Father &&
                   Mother == other.Mother &&
                   Spouse == other.Spouse &&
                   Children.SequenceEqual(other.Children) &&
                   Allegiances.SequenceEqual(other.Allegiances) &&
                   Books.SequenceEqual(other.Books) &&
                   PovBooks.SequenceEqual(other.PovBooks) &&
                   PlayedBy.SequenceEqual(other.PlayedBy) &&
                   TvSeries.SequenceEqual(other.TvSeries));
        }
Exemplo n.º 2
0
        public bool Equals(HouseDto other)
        {
            if (other == null)
            {
                return(false);
            }

            ////Note that SequenceEqual will return false if the items are the same but in different orders.
            return(Id == other.Id &&
                   string.Equals(Name, other.Name) &&
                   Seats.SequenceEqual(other.Seats) &&
                   string.Equals(Region, other.Region) &&
                   string.Equals(CoatOfArms, other.CoatOfArms) &&
                   string.Equals(Words, other.Words) &&
                   Titles.SequenceEqual(other.Titles) &&
                   CurrentLord == other.CurrentLord &&
                   Founder == other.Founder &&
                   string.Equals(Founded, other.Founded) &&
                   Heir == other.Heir &&
                   Overlord == other.Overlord &&
                   string.Equals(DiedOut, other.DiedOut) &&
                   AncestralWeapons.SequenceEqual(other.AncestralWeapons) &&
                   CadetBranches.SequenceEqual(other.CadetBranches));
        }