You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. namespace CacheControl_test.Areas.HelpPage
  3. {
  4. /// <summary>
  5. /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class.
  6. /// </summary>
  7. public class InvalidSample
  8. {
  9. public InvalidSample(string errorMessage)
  10. {
  11. if (errorMessage == null)
  12. {
  13. throw new ArgumentNullException("errorMessage");
  14. }
  15. ErrorMessage = errorMessage;
  16. }
  17. public string ErrorMessage { get; private set; }
  18. public override bool Equals(object obj)
  19. {
  20. InvalidSample other = obj as InvalidSample;
  21. return other != null && ErrorMessage == other.ErrorMessage;
  22. }
  23. public override int GetHashCode()
  24. {
  25. return ErrorMessage.GetHashCode();
  26. }
  27. public override string ToString()
  28. {
  29. return ErrorMessage;
  30. }
  31. }
  32. }