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.

ImageSample.cs 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. namespace Authentication_test.Areas.HelpPage
  3. {
  4. /// <summary>
  5. /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class.
  6. /// </summary>
  7. public class ImageSample
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="ImageSample"/> class.
  11. /// </summary>
  12. /// <param name="src">The URL of an image.</param>
  13. public ImageSample(string src)
  14. {
  15. if (src == null)
  16. {
  17. throw new ArgumentNullException("src");
  18. }
  19. Src = src;
  20. }
  21. public string Src { get; private set; }
  22. public override bool Equals(object obj)
  23. {
  24. ImageSample other = obj as ImageSample;
  25. return other != null && Src == other.Src;
  26. }
  27. public override int GetHashCode()
  28. {
  29. return Src.GetHashCode();
  30. }
  31. public override string ToString()
  32. {
  33. return Src;
  34. }
  35. }
  36. }