public void ForAllDatabases(Action <DocumentDatabase> action) { action(SystemDatabase); foreach (var value in ResourcesStoresCache .Select(db => db.Value) .Where(value => value.Status == TaskStatus.RanToCompletion)) { action(value.Result); } }