示例#1
0
        public DataBaseService(string path,
                               IFileWorkerFactory fileWorkerFactory,
                               ITableServiceFactory tableServiceFactory,
                               IDbWriterFactory dbWriterFactory)
        {
            _tableServiceFactory = tableServiceFactory;
            _dbWriterFactory     = dbWriterFactory;

            SupportedSources source = ResolvePath(path);

            _fileWorker = fileWorkerFactory.GetFileWorker(new DataBase {
                Settings = new Settings {
                    DefaultSource = source
                }
            });
            DataBase = _fileWorker.GetDataBaseFromFile(path);

            _fileWorker.DataBase = DataBase;
        }