Unit.cs 806 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. namespace UniRx
  3. {
  4. [Serializable]
  5. public struct Unit : IEquatable<Unit>
  6. {
  7. static readonly Unit @default = new Unit();
  8. public static Unit Default { get { return @default; } }
  9. public static bool operator ==(Unit first, Unit second)
  10. {
  11. return true;
  12. }
  13. public static bool operator !=(Unit first, Unit second)
  14. {
  15. return false;
  16. }
  17. public bool Equals(Unit other)
  18. {
  19. return true;
  20. }
  21. public override bool Equals(object obj)
  22. {
  23. return obj is Unit;
  24. }
  25. public override int GetHashCode()
  26. {
  27. return 0;
  28. }
  29. public override string ToString()
  30. {
  31. return "()";
  32. }
  33. }
  34. }