Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart

Issue 267393009: Transition barback's infrastructure to an aggregate-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart
diff --git a/pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart b/pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart
index 28f6909c6d5a82f49ecdf7a2559c811414e84659..5eada09b47a0a54ffc4d054b5d783cee6ec7a973 100644
--- a/pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart
+++ b/pkg/barback/lib/src/transformer/declaring_aggregate_transform.dart
@@ -86,14 +86,16 @@ class DeclaringAggregateTransformController extends BaseTransformController {
/// The set of ids that the transformer declares it will emit.
Set<AssetId> get outputIds => transform._outputIds;
- /// The controller for the [DeclaringAggregateTransform.primaryIds] stream.
- StreamController<AssetId> get idController => transform._idController;
+ bool get isDone => transform._idController.isClosed;
DeclaringAggregateTransformController(TransformNode node)
: super(new DeclaringAggregateTransform._(node));
- void close() {
- super.close();
- idController.close();
+ /// Adds a primary input id to the [DeclaringAggregateTransform.primaryIds]
+ /// stream.
+ void addId(AssetId id) => transform._idController.add(id);
+
+ void done() {
+ transform._idController.close();
}
}
« no previous file with comments | « pkg/barback/lib/src/transformer/base_transform.dart ('k') | pkg/barback/lib/src/transformer/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698