示例#1
0
        /// <summary>
        /// Returns true if Identification instances are equal
        /// </summary>
        /// <param name="other">Instance of Identification to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Identification other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StaffNumber == other.StaffNumber ||
                     StaffNumber != null &&
                     StaffNumber.Equals(other.StaffNumber)
                     ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     Forenames == other.Forenames ||
                     Forenames != null &&
                     Forenames.Equals(other.Forenames)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     MiddleInitials == other.MiddleInitials ||
                     MiddleInitials != null &&
                     MiddleInitials.Equals(other.MiddleInitials)
                 ) &&
                 (
                     KnownAs == other.KnownAs ||
                     KnownAs != null &&
                     KnownAs.Equals(other.KnownAs)
                 ) &&
                 (
                     Gender == other.Gender ||

                     Gender.Equals(other.Gender)
                 ) &&
                 (
                     DateOfBirth == other.DateOfBirth ||
                     DateOfBirth != null &&
                     DateOfBirth.Equals(other.DateOfBirth)
                 ) &&
                 (
                     Ssn == other.Ssn ||
                     Ssn != null &&
                     Ssn.Equals(other.Ssn)
                 ));
        }
示例#2
0
        public GenomeBase(KnownAs knownAs, S settings)
        {
            KnownAs  = knownAs;
            Settings = settings;

            Report = new R();

            Report.KnownAs = KnownAs;
        }
示例#3
0
        public Genome(KnownAs knownAs, Settings settings)
            : base(knownAs, settings)
        {
            if (Settings.Grid[current] == CellKind.Food)
            {
                Report.FoodCount++;

                gathered.Add(current);
            }

            Report.Route.Add(current);
        }