示例#1
0
        public DataProcessor(
            IDiskWorker diskWorker,
            ILog log,
            IShutdownManager shutdownManager,
            string diskPath,
            int warningSizeInGigabytes,
            int maxSizeInGigabytes)
            : base((int)TimeSpan.FromMinutes(90).TotalMilliseconds, log)
        {
            _diskWorker             = diskWorker;
            _log                    = log;
            _diskPath               = diskPath;
            _warningSizeInGigabytes = warningSizeInGigabytes > 0 ? warningSizeInGigabytes : 0;
            _maxSizeInGigabytes     = maxSizeInGigabytes > 0 ? maxSizeInGigabytes : 0;

            shutdownManager.Register(this, 3);

            if (!Directory.Exists(_diskPath))
            {
                Directory.CreateDirectory(_diskPath);
            }

            _dirInfo = new DirectoryInfo(_diskPath);
            Directory.SetCurrentDirectory(_diskPath);
        }
示例#2
0
        public DiskWorker(
            ILog log,
            IShutdownManager shutdownManager)
            : base((int)TimeSpan.FromSeconds(3).TotalMilliseconds, log)
        {
            _log = log;

            shutdownManager.Register(this, 1);
        }
示例#3
0
        public DiskWorker(
            ILog log,
            IShutdownManager shutdownManager,
            bool isHourlyBatched)
            : base((int)TimeSpan.FromSeconds(3).TotalMilliseconds, log)
        {
            _log             = log;
            _isHourlyBatched = isHourlyBatched;

            shutdownManager.Register(this, 1);
        }
 public RabbitMessageSubscriber(
     ILog log,
     IConsole console,
     IDataProcessor dataProcessor,
     IShutdownManager shutdownManager,
     string connectionString,
     string exchangeName)
 {
     _log              = log;
     _console          = console;
     _dataProcessor    = dataProcessor;
     _connectionString = connectionString;
     _exchangeName     = exchangeName;
     shutdownManager.Register(this, 0);
 }
        public AppLifetimeHandler(
            ILogFactory logFactory,
            IHealthNotifier healthNotifier,
            IStartupManager startupManager,
            IShutdownManager shutdownManager,
            IWebHostEnvironment hostingEnvironment)
        {
            _logFactory         = logFactory ?? throw new ArgumentNullException(nameof(logFactory));
            _healthNotifier     = healthNotifier ?? throw new ArgumentNullException(nameof(healthNotifier));
            _startupManager     = startupManager ?? throw new ArgumentNullException(nameof(startupManager));
            _shutdownManager    = shutdownManager ?? throw new ArgumentNullException(nameof(shutdownManager));
            _hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));

            _log = logFactory.CreateLog(this);
        }
示例#6
0
        public AppLifetimeHandler(
            ILogFactory logFactory,
            IHealthNotifier healthNotifier,
            IStartupManager startupManager,
            IShutdownManager shutdownManager,
            IWebHostEnvironment hostingEnvironment,
            IConfigurationRoot configurationRoot,
            IReloadingManager <MonitoringServiceClientSettings> monitoringServiceClientSettings)
        {
            _logFactory         = logFactory ?? throw new ArgumentNullException(nameof(logFactory));
            _healthNotifier     = healthNotifier ?? throw new ArgumentNullException(nameof(healthNotifier));
            _startupManager     = startupManager ?? throw new ArgumentNullException(nameof(startupManager));
            _shutdownManager    = shutdownManager ?? throw new ArgumentNullException(nameof(shutdownManager));
            _hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment));
            _configurationRoot  = configurationRoot ?? throw new ArgumentNullException(nameof(configurationRoot));
            _monitoringServiceClientSettings = monitoringServiceClientSettings ?? throw new ArgumentNullException(nameof(monitoringServiceClientSettings));

            _log = logFactory.CreateLog(this);
        }
示例#7
0
 public Core(
     IApplication application,
     IApplicationMessenger applicationMessenger,
     ICoreMessenger coreMessenger,
     IFrameworkMessenger frameworkMessenger,
     ITimerFactory timerFactory,
     IUpdatePeriodFactory updatePeriodFactory,
     IFramesPerSecondMonitor framesPerSecondMonitor,
     ISystemComponents systemComponents,
     IVeldridWindowUpdater windowUpdater,
     IStartupPropertiesCache propertiesCache,
     ISdl2EventProcessor sdl2EventProcessor,
     IInputMouseKeyboard inputMouseKeyboard,
     IInputGameController inputGameController,
     IGraphics graphics,
     IDrawing drawing,
     IRenderQueue renderQueue,
     IServices services,
     IShutdownManager shutdownManager
     )
 {
     _application            = application;
     _applicationMessenger   = applicationMessenger;
     _coreMessenger          = coreMessenger;
     _frameworkMessenger     = frameworkMessenger;
     _timerFactory           = timerFactory;
     _updatePeriodFactory    = updatePeriodFactory;
     _framesPerSecondMonitor = framesPerSecondMonitor;
     _windowUpdater          = windowUpdater;
     _sdl2EventProcessor     = sdl2EventProcessor;
     _systemComponents       = systemComponents;
     _inputMouseKeyboard     = inputMouseKeyboard;
     _inputGameController    = inputGameController;
     _graphics               = graphics;
     _drawing                = drawing;
     _renderQueue            = renderQueue;
     _services               = services;
     _shutdownManager        = shutdownManager;
     _startUpPropertiesCache = propertiesCache;
 }
        public OrderbookSubscriber(
            string rabbitMqConnectionString,
            string exchangeName,
            int maxBatchCount,
            int minBatchCount,
            string blobStorageConnectionString,
            bool useMessagePack,
            IShutdownManager shutdownManager,
            IConsole console,
            ILog log)
        {
            _rabbitMqConnectionString = rabbitMqConnectionString;
            _exchangeName             = exchangeName;
            _maxBatchCount            = maxBatchCount;
            _minBatchCount            = minBatchCount;
            _useMessagePack           = useMessagePack;
            _storageAccount           = CloudStorageAccount.Parse(blobStorageConnectionString);
            _console = console;
            _log     = log;

            shutdownManager.Add(this);
        }
 public IsAliveController(IHealthService healthService, IShutdownManager shutdownManager)
 {
     _healthService   = healthService;
     _shutdownManager = shutdownManager;
 }