void Rebuild() { lock (_lock) { // this will throw an exception if there is a duplicate key, but until we support multi-value indices, that's okay Dictionary <TKey, WeakReference <INode <TValue> > > updatedIndex = _nodeTracker.GetAll() .ToDictionary(node => _keyProvider(node.Value.Result), node => new WeakReference <INode <TValue> >(node, false)); _index = updatedIndex; } }
public IEnumerable <Task <TValue> > GetAll() { return(_nodeTracker.GetAll().Select(x => x.Value)); }
public IEnumerable <TValue> GetAll() { return(_nodeTracker.GetAll().Select(x => x.Value.Result)); }