コード例 #1
0
ファイル: StatsService.cs プロジェクト: wdznak/EXProject
        public BasicStatsHelper(string uniqueSymbol, BackgroundStatsQueue processQueue)
        {
            _uniqueSymbol = uniqueSymbol;
            _processQueue = processQueue;
            DateTime now = DateTime.Now;

            _nextInterval = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
            _nextInterval = _nextInterval.AddHours(1);
            //_nextInterval = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0);
            //_nextInterval = _nextInterval.AddMinutes(1);
            _fullPath = System.IO.Path.Combine(_path, _folder);

            if (!System.IO.Directory.Exists(_fullPath))
            {
                System.IO.Directory.CreateDirectory(_fullPath);
            }

            _fullPathWithFileName = Path.Combine(_fullPath, DateTime.Now.ToString("yyyy-MM-dd_HHmmss") + "_" + _uniqueSymbol + ".txt");
            _streamWriter         = new StreamWriter(_fullPathWithFileName);
        }
コード例 #2
0
ファイル: StatsService.cs プロジェクト: wdznak/EXProject
 public StatsService(BackgroundStatsQueue queue, ILogger <StatsService> logger)
 {
     _filesToProcess = queue;
     _logger         = logger;
 }