QfuEngineContext.cs 747 B

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