BaseCtx.cs 794 B

12345678910111213141516171819202122
  1. using System;
  2. using BO.ProcessServer.Business.StatisticCounters;
  3. using BO.ProcessServer.Options;
  4. using Quadarax.Foundation.Core.Thread;
  5. namespace BO.ProcessServer.Business.Workers.Contexts
  6. {
  7. internal abstract class BaseCtx : IWorkerContext
  8. {
  9. public Statistics Statistics { get; }
  10. public Pool Pool { get; }
  11. public Configuration Configuration { get; }
  12. protected BaseCtx(Configuration configuration, Statistics statistics, Pool pool)
  13. {
  14. Statistics = statistics ?? throw new ArgumentNullException(nameof(statistics));
  15. Pool = pool ?? throw new ArgumentNullException(nameof(pool));
  16. Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
  17. }
  18. }
  19. }