internal FreshenThreadRequest(YamsterThread thread, MessagePuller messagePuller) { this.Thread = thread; this.MessagePuller = messagePuller; this.State = FreshenThreadState.Queued; this.Error = null; }
public void ConnectDatabase(EventHandler <SQLiteDataContextUpgradeEventArgs> beforeUpgradeHandler, EventHandler afterUpgradeHandler) { if (this.DatabaseConnected) { throw new InvalidOperationException("The database is already connected"); } this.sqliteMapper = new SQLiteMapper(this.DatabaseFilePath, createIfMissing: true); this.sqliteMapper.Open(); this.yamsterArchiveDb = new YamsterArchiveDb(sqliteMapper, beforeUpgradeHandler, afterUpgradeHandler); this.yamsterCoreDb = new YamsterCoreDb(yamsterArchiveDb); this.yamsterCache = new YamsterCache(this); this.messagePuller = new MessagePuller(this); }