ProcessingDocumentsCtx.cs 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO.Abstractions;
  4. using BO.ProcessServer.Business.StatisticCounters;
  5. using BO.ProcessServer.Options;
  6. using Connector.PS;
  7. using Quadarax.Foundation.Core.Json;
  8. namespace BO.ProcessServer.Business.Workers.Contexts
  9. {
  10. internal class ProcessingDocumentsCtx : CfgCtx
  11. {
  12. public IList<SingleDocumentCalculationWorker> Processes { get; }
  13. public IConnectionPS Connection { get; set; }
  14. public IFileSystem FileSystem { get; set; }
  15. public DateTime LastMonitorStatusWrite { get; set; }
  16. public Binder Binder { get; }
  17. public ProcessingDocumentsCtx(Configuration configuration,IList<SingleDocumentCalculationWorker> processes,IConnectionPS connection, IFileSystem fileSystem, Statistics statistics, Pool pool) : base(configuration, statistics, pool)
  18. {
  19. Processes = processes ?? throw new ArgumentNullException(nameof(processes));
  20. Connection = connection ?? throw new ArgumentNullException(nameof(connection));
  21. FileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
  22. LastMonitorStatusWrite = DateTime.Now;
  23. Binder = new Binder(FileSystem);
  24. }
  25. }
  26. }