ExampleInfo.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. namespace Terminal.Gui.Examples;
  2. /// <summary>
  3. /// Contains information about a discovered example application.
  4. /// </summary>
  5. public class ExampleInfo
  6. {
  7. /// <summary>
  8. /// Gets or sets the display name of the example.
  9. /// </summary>
  10. public string Name { get; set; } = string.Empty;
  11. /// <summary>
  12. /// Gets or sets a description of what the example demonstrates.
  13. /// </summary>
  14. public string Description { get; set; } = string.Empty;
  15. /// <summary>
  16. /// Gets or sets the full path to the example's assembly file.
  17. /// </summary>
  18. public string AssemblyPath { get; set; } = string.Empty;
  19. /// <summary>
  20. /// Gets or sets the list of categories this example belongs to.
  21. /// </summary>
  22. public List<string> Categories { get; set; } = new ();
  23. /// <summary>
  24. /// Gets or sets the demo keystroke sequences defined for this example.
  25. /// </summary>
  26. public List<DemoKeyStrokeSequence> DemoKeyStrokes { get; set; } = new ();
  27. /// <summary>
  28. /// Returns a string representation of this example info.
  29. /// </summary>
  30. /// <returns>A string containing the name and description.</returns>
  31. public override string ToString ()
  32. {
  33. return $"{Name}: {Description}";
  34. }
  35. }