コード例 #1
0
        public Job(string dataDir, uint id = 0, bool readOnly = false)
        {
            if (!Directory.Exists(dataDir))
            {
                throw new Exception("Data directory does not exist.");
            }
            if (id == 0)
            {
                throw new Exception("Job must have non-zero id.");
            }

            _dataDir      = dataDir;
            _dataFilename = _dataDir + @"\" + id.ToString() + ".csv";

            if (readOnly && !File.Exists(_dataFilename))
            {
                throw new FileNotFoundException("File not found: " + _dataFilename);
            }

            _metaData = new MetaData(dataDir, id);
            _summary  = new Summary(dataDir, this);
            // if the summary is rebuilt, it will load all the data,
            // which we can forget for now.
            if (_data != null)
            {
                _data.Dispose(); _data = null;
            }
            _cache = new JobCache(dataDir, this);
        }
コード例 #2
0
ファイル: Job.cs プロジェクト: veanes/z3test
        internal Job(string dataDir)
        {
            if (!Directory.Exists(dataDir))
            {
                throw new Exception("Data directory does not exist.");
            }

            _readOnly = true;
            _dataDir  = dataDir;
            _metaData = null;
            _summary  = null;
            _data     = null;
            _cache    = null;
        }
コード例 #3
0
 public void Dispose()
 {
     RebuildSummary();
     _dataDir      = null;
     _dataFilename = null;
     if (_data != null)
     {
         _data.Dispose();
     }
     _data     = null;
     _metaData = null;
     _summary  = null;
     if (_cache != null)
     {
         _cache.Dispose();
     }
     _cache = null;
 }
コード例 #4
0
ファイル: Job.cs プロジェクト: zeromorphism/z3test
        public void Dispose()
        {
            if (_needSummaryRebuild)
            {
                _summary.Rebuild(this);
                _needSummaryRebuild = false;
            }

            if (_data != null)
            {
                _data.Dispose();
            }
            _data     = null;
            _metaData = null;
            _summary  = null;
            if (_cache != null)
            {
                _cache.Dispose();
            }
            _cache = null;
        }
コード例 #5
0
ファイル: Job.cs プロジェクト: zeromorphism/z3test
        public Job(string dataDir, uint id = 0, bool readOnly = false)
        {
            if (!Directory.Exists(dataDir))
            {
                throw new Exception("Data directory does not exist.");
            }
            if (id == 0)
            {
                throw new Exception("Job must have non-zero id.");
            }

            _readOnly = readOnly;
            _dataDir  = dataDir;
            _metaData = new MetaData(dataDir, id);
            _summary  = new Summary(dataDir, this);
            // if the summary is rebuilt, it will load all the data,
            // which we can forget for now.
            if (_data != null)
            {
                _data.Dispose(); _data = null;
            }
            _cache = new JobCache(dataDir, this);
        }