UnixComponentFactory.cs 772 B

12345678910111213141516171819202122232425262728
  1. using System.Collections.Concurrent;
  2. namespace Terminal.Gui.Drivers;
  3. /// <summary>
  4. /// <see cref="IComponentFactory{T}"/> implementation for native unix console I/O.
  5. /// This factory creates instances of internal classes <see cref="UnixInput"/>, <see cref="UnixOutput"/> etc.
  6. /// </summary>
  7. public class UnixComponentFactory : ComponentFactoryImpl<char>
  8. {
  9. /// <inheritdoc />
  10. public override IInput<char> CreateInput ()
  11. {
  12. return new UnixInput ();
  13. }
  14. /// <inheritdoc />
  15. public override IInputProcessor CreateInputProcessor (ConcurrentQueue<char> inputBuffer)
  16. {
  17. return new UnixInputProcessor (inputBuffer);
  18. }
  19. /// <inheritdoc />
  20. public override IOutput CreateOutput ()
  21. {
  22. return new UnixOutput ();
  23. }
  24. }