public SubscriptionWithoutLock(AbstractTableDataSource <TArgs, TData> source, ITableDataSink sink) { _source = source; _sink = sink; Register(); ReportInitialData(); }
protected AbstractTable(Workspace workspace, ITableManagerProvider provider, Guid tableIdentifier, AbstractTableDataSource <TArgs, TData> source) { _workspace = workspace; _provider = provider; this.TableManager = provider.GetTableManager(tableIdentifier); this.Source = source; AddInitialTableSource(workspace); }
public bool OnDataRemoved(object data, AbstractTableDataSource <TItem> tableSource) { var key = tableSource.GetItemKey(data); if (_primary != null && _primary.Key.Equals(key)) { return(true); } if (_sources != null) { _sources.Remove(key); return(_sources.Count == 0); } // they never reported to us before return(false); }
public void OnDataAddedOrChanged(object data, AbstractTableDataSource <TItem> tableSource) { var key = tableSource.GetItemKey(data); if (_primary != null && _primary.Key.Equals(key)) { return; } if (_sources != null) { if (_sources.ContainsKey(key)) { return; } } EnsureSources(); var source = tableSource.CreateTableEntriesSource(data); _sources.Add(source.Key, source); }
public AbstractTableEntriesFactory(AbstractTableDataSource <TData> source) { _source = source; }
public TableEntriesFactory(AbstractTableDataSource <TItem> tableSource, AbstractTableEntriesSource <TItem> entriesSource) { _tableSource = tableSource; _entriesSources = new AggregatedEntriesSource(_tableSource, entriesSource); }
public AggregatedEntriesSource(AbstractTableDataSource <TItem> tableSource, AbstractTableEntriesSource <TItem> primary) { _tableSource = tableSource; _sources = new EntriesSourceCollections(primary); }