EmployeeTeamSummary.cs 925 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. namespace PRS.Mobile
  4. {
  5. public class EmployeeTeamSummary
  6. {
  7. public Guid ID { get; private set; }
  8. public String Name { get; private set; }
  9. public EmployeeTeamSummary(Guid id, String name)
  10. {
  11. ID = id;
  12. Name = name;
  13. }
  14. }
  15. public class EmployeeTeamSummaryEqualityComparer : IEqualityComparer<EmployeeTeamSummary>
  16. {
  17. public bool Equals(EmployeeTeamSummary x, EmployeeTeamSummary y)
  18. {
  19. if (ReferenceEquals(x, y)) return true;
  20. if (ReferenceEquals(x, null)) return false;
  21. if (ReferenceEquals(y, null)) return false;
  22. if (x.GetType() != y.GetType()) return false;
  23. return x.ID == y.ID;
  24. }
  25. public int GetHashCode(EmployeeTeamSummary obj)
  26. {
  27. return obj.ID.GetHashCode();
  28. }
  29. }
  30. }