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.

TextSample.cs 885B

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