private void ReadVisibleTables()
{
lock (commitLock) {
var tables = StateStore.GetVisibleList();
// For each visible table
foreach (var resource in tables) {
var tableId = resource.TableId;
var sourceName = resource.SourceName;
// TODO: add a table source type?
// Load the master table from the resource information
var source = LoadTableSource(tableId, sourceName);
if (source == null)
throw new InvalidOperationException(String.Format("Table {0} was not found.", sourceName));
source.Open();
tableSources.Add(tableId, source);
}
}
}