public EsentCrawlQueueService(Uri baseUri, bool resume) { m_DatabaseFileName = Path.GetFullPath("NCrawlQueue{0}\\Queue.edb".FormatWith(baseUri.GetHashCode())); if (!resume && File.Exists(m_DatabaseFileName)) { ClearQueue(); } m_EsentInstance = new EsentInstance(m_DatabaseFileName, (session, dbid) => { EsentTableDefinitions.CreateGlobalsTable(session, dbid); EsentTableDefinitions.CreateQueueTable(session, dbid); }); // Get columns m_EsentInstance.Cursor((session, dbid) => { Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.GlobalsTableName, EsentTableDefinitions.GlobalsCountColumnName, out queueCountColumn); Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.QueueTableName, EsentTableDefinitions.QueueTableDataColumnName, out dataColumn); }); }
public EsentCrawlerHistoryService(string basePath, Uri baseUri, bool resume) { this.m_Resume = resume; this.m_DatabaseFileName = Path.GetFullPath( Path.Combine(basePath, "NCrawlHist{0}\\Hist.edb".FormatWith(baseUri.GetHashCode()))); if (!resume) { this.ClearHistory(); } this.m_EsentInstance = new EsentInstance(this.m_DatabaseFileName, (session, dbid) => { EsentTableDefinitions.CreateGlobalsTable(session, dbid); EsentTableDefinitions.CreateHistoryTable(session, dbid); }); // Get columns this.m_EsentInstance.Cursor((session, dbid) => { Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.GlobalsTableName, EsentTableDefinitions.GlobalsCountColumnName, out this.historyCountColumn); Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.HistoryTableName, EsentTableDefinitions.HistoryTableUrlColumnName, out this.historyUrlColumn); }); }
public EsentCrawlQueueService(string basePath, Uri baseUri, bool resume) { this.m_DatabaseFileName = Path.GetFullPath( Path.Combine(basePath, "NCrawlQueue{0}\\Queue.edb".FormatWith(baseUri.GetHashCode()))); if (!resume && File.Exists(this.m_DatabaseFileName)) { ClearQueue(); } this.m_EsentInstance = new EsentInstance(this.m_DatabaseFileName, (session, dbid) => { EsentTableDefinitions.CreateGlobalsTable(session, dbid); EsentTableDefinitions.CreateQueueTable(session, dbid); }); // Get columns this.m_EsentInstance.Cursor((session, dbid) => { Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.GlobalsTableName, EsentTableDefinitions.GlobalsCountColumnName, out this.queueCountColumn); Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.QueueTableName, EsentTableDefinitions.QueueTableDataColumnName, out this.dataColumn); }); }
public EsentCrawlerHistoryService(Uri baseUri, bool resume) { m_Resume = resume; m_DatabaseFileName = Path.GetFullPath("NCrawlHist{0}\\Hist.edb".FormatWith(baseUri.GetHashCode())); if (!resume) { ClearHistory(); } m_EsentInstance = new EsentInstance(m_DatabaseFileName, (session, dbid) => { EsentTableDefinitions.CreateGlobalsTable(session, dbid); EsentTableDefinitions.CreateHistoryTable(session, dbid); }); // Get columns m_EsentInstance.Cursor((session, dbid) => { Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.GlobalsTableName, EsentTableDefinitions.GlobalsCountColumnName, out historyCountColumn); Api.JetGetColumnInfo(session, dbid, EsentTableDefinitions.HistoryTableName, EsentTableDefinitions.HistoryTableUrlColumnName, out historyUrlColumn); }); }
public MainWindow() { InitializeComponent(); Current = this; DataContext = this; Instance = new EsentInstance("EsentManagementStudio"); Databases = new ObservableCollection<EsentDatabase>(); Databases.CollectionChanged += (sender, e) => OnPropertyChanged(nameof(DatabaseNames)); }