TssEngineContext.cs 756 B

12345678910111213141516171819202122232425262728293031
  1. using Quadarax.Foundation.Core.Object;
  2. using Quadarax.Foundation.Core.QConsole.Context;
  3. using System.IO.Abstractions;
  4. namespace qdr.app.tss.client.console
  5. {
  6. internal class TssEngineContext : DisposableObject, IEngineContext
  7. {
  8. private IFileSystem? _fileSystem;
  9. public string Status => throw new NotImplementedException();
  10. public TssEngineContext(IFileSystem fileSystem)
  11. {
  12. _fileSystem = fileSystem;
  13. }
  14. public ICommandContext CreateCommandContext()
  15. {
  16. return new TssCommandContext(_fileSystem ?? new FileSystem());
  17. }
  18. protected override void OnDisposing()
  19. {
  20. _fileSystem = null;
  21. }
  22. }
  23. }