AnsiEscapeSequence.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. namespace Terminal.Gui.Drivers;
  2. /// <summary>
  3. /// Describes an Ansi escape sequence. This is a 'blueprint'. If you
  4. /// want to send the sequence you should instead use <see cref="AnsiEscapeSequenceRequest"/>
  5. /// </summary>
  6. public class AnsiEscapeSequence
  7. {
  8. /// <summary>
  9. /// Request to send e.g. see
  10. /// <see>
  11. /// <cref>EscSeqUtils.CSI_SendDeviceAttributes.Request</cref>
  12. /// </see>
  13. /// </summary>
  14. public required string Request { get; init; }
  15. /// <summary>
  16. /// <para>
  17. /// The terminator that uniquely identifies the type of response as responded
  18. /// by the console. e.g. for
  19. /// <see>
  20. /// <cref>EscSeqUtils.CSI_SendDeviceAttributes.Request</cref>
  21. /// </see>
  22. /// the terminator is
  23. /// <see>
  24. /// <cref>EscSeqUtils.CSI_SendDeviceAttributes.Terminator</cref>
  25. /// </see>
  26. /// .
  27. /// </para>
  28. /// <para>
  29. /// After sending a request, the first response with matching terminator will be matched
  30. /// to the oldest outstanding request.
  31. /// </para>
  32. /// </summary>
  33. public required string? Terminator { get; init; }
  34. /// <summary>
  35. /// The value expected in the response e.g.
  36. /// <see>
  37. /// <cref>EscSeqUtils.CSI_ReportTerminalSizeInChars.Value</cref>
  38. /// </see>
  39. /// which will have a 't' as terminator but also other different request may return the same terminator with a
  40. /// different value.
  41. /// </summary>
  42. public string? Value { get; init; }
  43. }