public static EncyclopeDiaLibrary Load(EncyclopeDiaSpec spec, ILoadMonitor loader) { if (File.Exists(spec.FilePath) && new FileInfo(spec.FilePath).Length > 0) { var library = new EncyclopeDiaLibrary(spec, loader.StreamManager); if (library.Load(loader)) { return(library); } } return(null); }
private EncyclopeDiaLibrary(EncyclopeDiaSpec spec, IStreamManager streamManager) : this(spec) { _pooledSqliteConnection = new PooledSqliteConnection(streamManager.ConnectionPool, FilePath); }
public EncyclopeDiaLibrary(EncyclopeDiaSpec spec) : base(spec) { LibrarySpec = spec; FilePath = spec.FilePath; CachePath = GetLibraryCachePath(FilePath); }