Пример #1
0
 protected bool Equals(ClockWorker other)
 {
     return
         (Id != 0 && other.Id != 0 && Id.Equals(other.Id) ||
          StringComparer.CurrentCultureIgnoreCase.Equals(FamilyName, other.FamilyName) &&
          StringComparer.CurrentCultureIgnoreCase.Equals(GivenName, other.GivenName) &&
          DateOfBirth.Date.Equals(other.DateOfBirth.Date));
 }
Пример #2
0
        public ClockWorkUnitCollection(ClockWorker worker, params ClockWorkUnit[] units)
        {
            Worker = worker;

            if (units == null)
            {
                return;
            }
            foreach (var clockWorkUnit in units)
            {
                Add(clockWorkUnit);
            }
        }